/* ============================================================
   Favio Fernández — Portafolio (v9 · Identidad MedicPC clara)
   Base clara + ocre · condensador/circuito · dos tonos + barrita
   Colores oficiales MedicPC: #c48e47 / #222222 / #4a4a4a / #939598
   ============================================================ */

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

:root {
  color-scheme: light;
  /* superficies (claro cálido) */
  --bg: #ffffff;
  --bg-alt: #f6f2ea;
  --surface: #ffffff;
  --surface-2: #faf6ee;
  --line: #e8e1d3;
  --line-2: #d8cdb8;
  --nav-bg: rgba(255,255,255,.78);
  --nav-scrim: rgba(255,255,255,.92);
  /* texto */
  --text: #222222;
  --soft: #4a4a4a;
  --dim: #726d63;
  /* acento ocre */
  --accent: #c48e47;        /* decorativo: barras, nodos, líneas, fills */
  --accent-ink: #986524;    /* texto sobre claro (AA ≥4.5:1) */
  --accent-tint: #f4e8d4;   /* relleno suave */
  --accent-hi: #f0d8a8;      /* pulso de energía (statement) */
  /* tipografía */
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  /* medidas */
  --maxw: 1080px;
  --radius: 12px;
  --radius-lg: 18px;
  --nav-h: 66px;
  --ease: cubic-bezier(.22,.61,.36,1);
  --shadow: 0 20px 50px -30px rgba(80,60,20,.28);
}

/* scope oscuro: sección de cierre (.dark) + modo oscuro global ([data-theme="dark"]) */
.dark, :root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1f1f22;
  --bg-alt: #1f1f22;
  --surface: #26262a;
  --surface-2: #2b2b30;
  --line: rgba(255,255,255,.12);
  --line-2: rgba(255,255,255,.22);
  --text: #f5f4f1;
  --soft: #cfc9bd;
  --dim: #97928a;
  --accent: #d8b06a;
  --accent-ink: #d8b06a;
  --accent-tint: rgba(216,176,106,.14);
  --accent-hi: #f6e6bf;
  --nav-bg: rgba(31,31,34,.72);
  --nav-scrim: rgba(31,31,34,.9);
  --shadow: 0 20px 50px -30px rgba(0,0,0,.6);
  color: var(--text);
}

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 82px; overflow-x: clip; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 3px; border-radius: 4px; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(20px, 5vw, 48px); }

/* ---------- Barra de progreso ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 90;
  background: var(--accent); transform: scaleX(0); transform-origin: 0 50%;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 80;
  background: var(--nav-bg); backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .3s, background .3s;
}
.nav.is-scrolled { border-bottom-color: var(--line); background: var(--nav-scrim); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; height: var(--nav-h); }
.brand { font-family: var(--font-display); font-weight: 800; letter-spacing: -.045em; font-size: 17px; display: inline-flex; align-items: center; gap: 7px; }
.brand__accent { color: var(--accent-ink); }
.brand__cond { width: 22px; height: 22px; flex-shrink: 0; overflow: visible; }
.brand__cond .bc-o, .brand__cond .bc-t, .brand__cond .bc-n { stroke: var(--accent); stroke-width: 13; fill: none; }
.brand__cond .bc-t { stroke-linejoin: round; }
.nav__links { display: flex; gap: 26px; }
.nav__links a { font-family: var(--font-mono); font-size: 12.5px; color: var(--soft); transition: color .2s; }
.nav__links a:hover { color: var(--accent-ink); }
.nav__right { display: flex; align-items: center; gap: 16px; }

.lang-toggle { background: none; border: 0; cursor: pointer; font-family: var(--font-mono); font-size: 12px; color: var(--dim); display: inline-flex; gap: 5px; }
.lang-toggle__opt { transition: color .2s; }
.lang-toggle__opt.is-active { color: var(--accent-ink); }
.lang-toggle__sep { color: var(--line-2); }

.theme-toggle { background: none; border: 0; cursor: pointer; color: var(--dim); display: inline-flex; align-items: center; justify-content: center; padding: 4px; border-radius: 8px; transition: color .2s, background .2s; }
.theme-toggle:hover { color: var(--accent-ink); background: var(--accent-tint); }
.theme-toggle svg { width: 18px; height: 18px; display: block; }
.theme-toggle .ti-sun { display: none; }
.theme-toggle .ti-moon { display: block; }
:root[data-theme="dark"] .theme-toggle .ti-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .ti-moon { display: none; }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 600; font-size: 14px; padding: 11px 20px; border-radius: 8px; cursor: pointer; transition: .2s var(--ease); border: 1px solid transparent; }
.btn--primary { background: var(--accent); color: #241a08; }
.btn--primary:hover { background: #d29b53; transform: translateY(-1px); box-shadow: 0 10px 24px -10px rgba(196,142,71,.7); }
.btn--ghost { border-color: var(--line-2); color: var(--text); background: none; }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent-ink); }
.btn--pill { border-radius: 999px; padding: 9px 18px; border-color: var(--line-2); color: var(--text); font-size: 13px; }
.btn--pill:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- Firma: barrita sobre kicker + dos tonos ---------- */
.section__kicker { position: relative; display: inline-block; padding-top: 22px; font-family: var(--font-mono); font-size: 12px; color: var(--accent-ink); text-transform: uppercase; letter-spacing: .14em; }
.section__kicker::before { content: ""; position: absolute; top: 0; left: 0; width: 54px; height: 4px; background: var(--accent); border-radius: 2px; transform: scaleX(0); transform-origin: 0 50%; transition: transform .7s var(--ease) .1s; }
.reveal.is-visible .section__kicker::before { transform: scaleX(1); }

/* ---------- Hero ---------- */
.hero { min-height: calc(100svh - var(--nav-h)); display: flex; align-items: center; padding: clamp(20px, 3vh, 44px) 0; }
.hero .container { max-width: 1240px; padding: 0 clamp(20px, 4vw, 40px); }
.hero__top { width: 100%; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.hero__intro { min-width: 0; }
.hero__kick { font-family: var(--font-mono); font-size: 12.5px; color: var(--accent-ink); letter-spacing: .04em; display: inline-flex; align-items: center; gap: 10px; margin-bottom: 24px; }
.hero__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-tint); }
.hero__title { font-family: var(--font-display); font-weight: 600; letter-spacing: -.045em; font-size: clamp(46px, 8.5vw, 96px); line-height: .94; color: var(--text); }
.hero__static { display: block; }
.hero__cycleline { display: inline-flex; align-items: baseline; gap: .1em; }
.hero__cycle { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: .04em; color: var(--accent-ink); font-weight: 700; }
.hero__cycle-inner { display: inline-block; will-change: transform; transition: transform .42s var(--ease); }
.hero__cycle-inner.is-out { transform: translateY(-105%); }
.hero__caret { align-self: center; width: .07em; height: .82em; background: var(--accent); border-radius: 1px; animation: heroCaret 1.05s steps(1, end) infinite; }
@keyframes heroCaret { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }
.hero__logo { width: .8em; height: .8em; flex-shrink: 0; transform-origin: center; transition: transform .6s var(--ease); }
.hero__logo .hl-o, .hero__logo .hl-t { stroke: var(--accent-ink); stroke-width: 10; }
.hero__logo .hl-t { stroke-linecap: round; }
.hero__logo .hl-d { fill: var(--accent-ink); }
.hero__accent { color: var(--accent-ink); }
.hero__tagline { font-family: var(--font-display); font-weight: 500; font-size: clamp(17px, 2.4vw, 22px); color: var(--text); margin-top: 22px; letter-spacing: -.01em; }
.hero__term { font-family: var(--font-mono); font-size: clamp(13px, 1.7vw, 15px); color: var(--soft); margin-top: 24px; max-width: 48ch; min-height: 3em; letter-spacing: -.01em; }
.hero__term-prompt, .hero__term-q { color: var(--soft); opacity: .7; }
.hero__term-msg { color: var(--accent-ink); }
.hero__term-caret { display: inline-block; width: .55ch; height: 1.05em; transform: translateY(.16em); background: var(--accent); margin: 0 1px; animation: heroCaret 1.05s steps(1, end) infinite; }
.hero__lead { margin-top: 22px; max-width: 56ch; color: var(--soft); font-size: clamp(15px, 2vw, 17.5px); padding-left: 18px; border-left: 3px solid var(--accent); }
.hero__cta { margin-top: 32px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.hero__link { font-family: var(--font-mono); font-size: 12.5px; color: var(--dim); transition: color .2s, transform .2s var(--ease); }
.hero__link:hover { color: var(--accent-ink); transform: translateX(2px); }

/* condensador (isotipo animado) */
.hero__viz { position: relative; display: flex; justify-content: flex-start; align-items: center; }
.hero__photo { position: relative; z-index: 1; width: min(112%, 640px); margin-left: clamp(-150px, -8.5vw, -90px); }
.hero__photo img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-lg); border: 1px solid var(--line); box-shadow: var(--shadow); }
/* cutout: sin panel ni borde → el recorte va POR ENCIMA de la ficha */
/* variante recortada / fondo blanco que se funde con el hero */
/* cutout completo (aspecto natural, sin recorte lateral) + desvanecido solo abajo */
/* recortes transparentes (blanca en claro, estudio en oscuro): difuminado SOLO abajo; laterales y arriba nítidos */
.hero__photo--cutout img { height: auto; object-fit: contain; border: 0; border-radius: 0; box-shadow: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent 99%);
  mask-image: linear-gradient(to bottom, #000 72%, transparent 99%); }
.hero__photo--cutout .hero-dark { display: none; }
:root[data-theme="dark"] .hero__photo--cutout .hero-light { display: none; }
:root[data-theme="dark"] .hero__photo--cutout .hero-dark { display: block; }
.hero__seal { position: absolute; left: -16px; bottom: 26px; width: 84px; height: 84px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line-2); box-shadow: var(--shadow); display: flex; align-items: center; justify-content: center; z-index: 2; }
.hero__seal .condensador { width: 58px; }
.condensador { width: min(360px, 82%); height: auto; overflow: visible; }
.cond-ring { stroke: var(--line-2); stroke-width: 4; }
.cond-trace { stroke: #ddd2bd; stroke-width: 5; stroke-linecap: round; stroke-dasharray: 90; stroke-dashoffset: 90; animation: condDraw 1.1s var(--ease) forwards; }
.cond-trace:nth-of-type(3) { animation-delay: .12s; }
.cond-trace:nth-of-type(4) { animation-delay: .24s; }
@keyframes condDraw { to { stroke-dashoffset: 0; } }
.cond-charge { stroke: var(--accent); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 6 120; stroke-dashoffset: 126; animation: condCharge 2.4s linear infinite; opacity: .9; }
.cond-charge:nth-of-type(6) { animation-delay: .8s; }
.cond-charge:nth-of-type(7) { animation-delay: 1.6s; }
@keyframes condCharge { from { stroke-dashoffset: 126; } to { stroke-dashoffset: 0; } }
.cond-hub { fill: var(--accent); }
.cond-node { fill: #fff; stroke: var(--accent); stroke-width: 5; transform-box: fill-box; transform-origin: center; animation: nodePulse 2.6s var(--ease) infinite; }
.cond-node[data-node="1"] { animation-delay: .5s; }
.cond-node[data-node="2"] { animation-delay: 1s; }
.cond-node.is-hot { fill: var(--accent-tint); filter: drop-shadow(0 0 6px rgba(196,142,71,.6)); }
@keyframes nodePulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.16); } }
.hero__viz-label { font-family: var(--font-mono); font-size: 11.5px; color: var(--dim); letter-spacing: .08em; }
.hero__viz-mono { color: var(--accent-ink); }

/* stats */
/* métricas = ficha técnica DETRÁS de la foto (z-1), pegada a la derecha, empezando al hombro:
   el recorte (z-2) va por delante y tapa su borde izquierdo → la ficha asoma por el lado */
.hero__stats { position: absolute; right: 0; top: 55%; transform: translateY(-50%); z-index: 3; width: min(300px, 62%); margin: 0; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 30px 60px -24px rgba(60,45,15,.4); padding: 4px 20px; }
.hero__stats li { position: relative; display: flex; align-items: center; gap: 16px; padding: 14px 0 14px 18px; border-bottom: 1px solid var(--line); }
.hero__stats li:last-child { border-bottom: 0; }
.hero__stats li::before { content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 4px; height: 26px; background: var(--accent); border-radius: 2px; }
.hero__statn { flex: 0 0 96px; font-family: var(--font-display); font-weight: 800; font-size: clamp(24px, 3.5vw, 34px); letter-spacing: -.02em; line-height: 1; color: var(--text); }
.hero__statl { color: var(--dim); font-family: var(--font-mono); font-size: 12px; line-height: 1.35; text-transform: uppercase; letter-spacing: .08em; }

/* entrada del hero */
.hero__content .hero__kick, .hero__content .hero__title, .hero__content .hero__term, .hero__content .hero__cta { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.hero__content.is-loaded .hero__kick { opacity: 1; transform: none; transition-delay: .05s; }
.hero__content.is-loaded .hero__title { opacity: 1; transform: none; transition-delay: .14s; }
.hero__content.is-loaded .hero__term { opacity: 1; transform: none; transition-delay: .34s; }
.hero__content.is-loaded .hero__cta { opacity: 1; transform: none; transition-delay: .46s; }

/* menú CV */
.cvmenu { position: relative; }
.cvmenu summary { list-style: none; } .cvmenu summary::-webkit-details-marker { display: none; }
.cvmenu__list { position: absolute; top: calc(100% + 8px); left: 0; z-index: 20; min-width: 210px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; padding: 6px; box-shadow: var(--shadow); }
.cvmenu__list a { display: block; padding: 9px 12px; border-radius: 7px; font-size: 13.5px; color: var(--soft); transition: .15s; }
.cvmenu__list a:hover { background: var(--surface-2); color: var(--text); }
.cvmenu__list a.is-suggested { color: var(--accent-ink); }

/* ---------- Secciones ---------- */
.section { padding: clamp(60px, 9vw, 100px) 0; border-top: 1px solid var(--line); }
.section--alt { background: var(--bg-alt); }
.section__head { max-width: 62ch; margin-bottom: clamp(36px, 5vw, 54px); }
.section__title { font-family: var(--font-display); font-weight: 500; letter-spacing: -.025em; font-size: clamp(26px, 4.4vw, 42px); line-height: 1.1; margin-top: 14px; text-wrap: balance; color: var(--text); }
.section__title em { font-style: normal; font-weight: 700; color: var(--accent-ink); }
.section__sub { margin-top: 14px; color: var(--soft); font-size: clamp(15px, 2vw, 17px); }

/* ---------- Case study (imagen + narrativa editorial) ---------- */
.cs { display: grid; grid-template-columns: minmax(280px, 340px) 1fr; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; margin-bottom: 30px; box-shadow: var(--shadow); }
.cs:last-child { margin-bottom: 0; }
.cs--flip { grid-template-columns: 1fr minmax(280px, 340px); }
.cs--flip .cs__visual { order: 2; border-right: 0; border-left: 1px solid var(--line); }

.cs__visual { position: relative; min-height: 300px; background: var(--surface-2); border-right: 1px solid var(--line); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.cs__visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cs__shot { z-index: 2; object-fit: cover; object-position: left top; }
.cs__visual:not(.cs__visual--sigma)::after { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(196,142,71,.30), rgba(20,15,8,.34)); mix-blend-mode: multiply; }
.cs__visual--sigma { background: radial-gradient(120% 120% at 30% 20%, #35291b, #201913); }
.cs__cond { width: 64%; max-width: 220px; overflow: visible; position: relative; z-index: 1; }
.cs__cond .csc-ring { stroke: rgba(216,176,106,.32); stroke-width: 10; }
.cs__cond .csc-tr { stroke: rgba(216,176,106,.55); stroke-width: 10; stroke-linejoin: round; }
.cs__cond .csc-node { fill: none; stroke: rgba(216,176,106,.55); stroke-width: 10; }
.cs__arch { width: 74%; max-width: 236px; position: relative; z-index: 1; }
.cs__arch .arch-line path { stroke: rgba(216,176,106,.5); stroke-width: 2; }
.cs__arch .arch-chip rect { fill: rgba(216,176,106,.09); stroke: rgba(216,176,106,.55); stroke-width: 1.5; }
.cs__arch .arch-chip text { fill: #eccf92; font-family: var(--font-mono); font-size: 11px; text-anchor: middle; dominant-baseline: middle; }
.cs__arch .arch-bff { fill: var(--accent); }
.cs__arch .arch-bfft { fill: #201913; font-family: var(--font-display); font-weight: 700; font-size: 15px; text-anchor: middle; dominant-baseline: middle; }
.cs__vlabel { position: absolute; left: 16px; bottom: 14px; z-index: 3; font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em; color: #eccf92; background: rgba(20,15,8,.5); backdrop-filter: blur(4px); padding: 5px 10px; border-radius: 6px; }

.cs__body { padding: clamp(24px, 3.2vw, 42px); }
.cs__eyebrow { font-family: var(--font-mono); font-size: 12px; color: var(--accent-ink); text-transform: uppercase; letter-spacing: .12em; }
.cs__title { font-family: var(--font-display); font-weight: 600; letter-spacing: -.02em; font-size: clamp(21px, 3.2vw, 30px); line-height: 1.12; margin: 12px 0 0; text-wrap: balance; }
.cs__metaline { font-family: var(--font-mono); font-size: 11.5px; color: var(--dim); margin-top: 10px; }
.cs__sub { margin-top: 14px; color: var(--soft); max-width: 62ch; font-size: 15px; }
.cs__facts { margin-top: 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 26px 34px; }
.cs__fact { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.cs.is-visible .cs__fact { opacity: 1; transform: none; }
.cs.is-visible .cs__fact:nth-child(2) { transition-delay: .08s; }
.cs.is-visible .cs__fact:nth-child(3) { transition-delay: .16s; }
.cs.is-visible .cs__fact:nth-child(4) { transition-delay: .24s; }
.cs__fact h4 { font-family: var(--font-mono); font-size: 11.5px; color: var(--accent-ink); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.cs__fact p { color: var(--soft); font-size: 14px; }
.cs__fact ul { display: flex; flex-direction: column; gap: 8px; }
.cs__fact li { color: var(--soft); font-size: 13.5px; padding-left: 18px; position: relative; }
.cs__fact li::before { content: "→"; position: absolute; left: 0; color: var(--accent-ink); }
.cs__more { margin-top: 22px; }
.cs__more-btn { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--accent-ink); border: 1px solid var(--line-2); border-radius: 999px; padding: 8px 16px; transition: .2s; width: fit-content; }
.cs__more-btn::-webkit-details-marker { display: none; }
.cs__more-btn::after { content: "↓"; transition: transform .2s var(--ease); }
.cs__more[open] .cs__more-btn::after { transform: rotate(180deg); }
.cs__more-btn:hover { border-color: var(--accent); background: var(--accent-tint); }
.cs__more .cs__facts { margin-top: 26px; }
.cs__chips { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 10px; }
.cs__chips li { font-family: var(--font-mono); font-size: 12px; color: var(--accent-ink); border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 14px; background: var(--bg); transition: border-color .2s, background .2s; }
.cs__chips li:hover { border-color: var(--accent); background: var(--accent-tint); }

/* ---------- Bento (Trabajo · solo escritorio) ---------- */
.bento { display: none; }
.work-stack { display: block; }
@media (min-width: 900px) {
  .work-stack { display: none; }
  .bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: clamp(12px, 1.4vw, 18px); grid-auto-rows: minmax(142px, auto); }
}
.tile { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(18px, 2vw, 26px); overflow: hidden; box-shadow: var(--shadow); transition: transform .3s var(--ease), border-color .3s; }
.tile:hover { transform: translateY(-4px); border-color: var(--accent); }
.tile__eyebrow { font-family: var(--font-mono); font-size: 11px; color: var(--accent-ink); text-transform: uppercase; letter-spacing: .12em; }
.tile__title { font-family: var(--font-display); font-weight: 600; letter-spacing: -.02em; line-height: 1.14; font-size: clamp(24px, 3vw, 32px); margin-top: 10px; text-wrap: balance; }
.tile__title--sm { font-size: 19px; }
.tile__line { margin-top: 10px; color: var(--soft); font-size: 15px; max-width: 52ch; }
.tile__chips { margin-top: auto; padding-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.tile__chips li { font-family: var(--font-mono); font-size: 11px; color: var(--accent-ink); border: 1px solid var(--line-2); border-radius: 999px; padding: 5px 11px; background: var(--bg); }
.tile__open { margin-top: 16px; align-self: flex-start; cursor: pointer; font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--accent-ink); border: 1px solid var(--line-2); border-radius: 999px; padding: 8px 16px; background: none; transition: .2s; }
.tile__open:hover { border-color: var(--accent); background: var(--accent-tint); }
/* colocación explícita (mismo footprint: 3 filas × 6 col) */
.tile--lg { grid-column: 1 / 5; grid-row: 1 / 3; }        /* SUMMA flagship */
.tile__wm { position: absolute; right: -40px; bottom: -40px; width: 260px; height: 260px; opacity: .5; pointer-events: none; overflow: visible; }
.tile__wm .csc-ring { stroke: var(--accent); stroke-width: 9; opacity: .26; }
.tile__wm .csc-tr { stroke: var(--accent); stroke-width: 9; stroke-linejoin: round; opacity: .5; }
.tile__wm .csc-node { fill: none; stroke: var(--accent); stroke-width: 9; opacity: .5; }
/* flagship con captura de producto */
.tile--flagship { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 42%); gap: clamp(20px, 2.2vw, 34px); align-items: stretch; }
.tile--flagship .tile__main { display: flex; flex-direction: column; min-width: 0; }
.tile__shot { position: relative; align-self: stretch; min-height: 214px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); box-shadow: 0 14px 34px -22px rgba(60,45,15,.5); }
.tile__shot img { width: 100%; height: 100%; object-fit: cover; object-position: left top; }
.tile__shot-label { position: absolute; left: 12px; bottom: 12px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .04em; color: #eccf92; background: rgba(20,15,8,.55); backdrop-filter: blur(4px); padding: 4px 9px; border-radius: 6px; }
/* métrica */
.tile--metric { grid-column: 5 / 7; grid-row: 1 / 2; }    /* −40% arriba-derecha */
.tile__n { font-family: var(--font-display); font-weight: 800; letter-spacing: -.03em; font-size: clamp(40px, 6vw, 64px); color: var(--accent-ink); line-height: 1; }
.tile__nl { margin-top: 8px; font-family: var(--font-mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--dim); }
.tile__ns { margin-top: auto; padding-top: 12px; font-size: 13px; color: var(--soft); }
/* condensador */
.tile--cond { grid-column: span 2; align-items: flex-start; }
.tile--cond svg { width: 60px; height: 60px; overflow: visible; }
.tile--cond .csc-ring { stroke: var(--accent); stroke-width: 10; fill: none; opacity: .4; }
.tile--cond .csc-tr { stroke: var(--accent); stroke-width: 10; fill: none; stroke-linejoin: round; }
.tile--cond .csc-node { stroke: var(--accent); stroke-width: 10; fill: none; }
.tile__cl { margin-top: 14px; font-family: var(--font-display); font-weight: 600; font-size: 16px; line-height: 1.3; }
.tile__cs { margin-top: 6px; font-size: 13px; color: var(--soft); }
/* casos */
.tile--mid { grid-column: span 2; }
/* Glik vertical: columna derecha, filas 2-3 (donde iban condensador + 5→1) */
.tile--tall { grid-column: 5 / 7; grid-row: 2 / 4; }
.tile--tall .tile__visual { height: 150px; flex: none; min-height: 0; margin-bottom: 16px; }
.tile--tall .tile__visual .cs__arch { width: 132px; max-width: 132px; }
.tile--tall .tile__line { font-size: 13.5px; margin-top: 8px; }
.tile--tall .tile__open { margin-top: auto; }
/* MedicPC horizontal: abajo-izquierda, 4 columnas × 1 fila (imagen izq + texto der) */
.tile--wideh { grid-column: 1 / 5; grid-row: 3 / 4; display: grid; grid-template-columns: minmax(0, 38%) minmax(0, 1fr); padding: 0; overflow: hidden; align-items: stretch; }
.tile--wideh .tile__visual--side { margin: 0; height: 100%; min-height: 150px; }
.tile__hbody { padding: clamp(18px, 2vw, 26px); display: flex; flex-direction: column; justify-content: center; }
.tile__hbody .tile__title { margin-top: 8px; }
.tile__hbody .tile__line { font-size: 13.5px; margin-top: 8px; max-width: 46ch; }
.tile__hbody .tile__open { margin-top: 16px; }
.tile__visual { margin: calc(-1 * clamp(18px, 2vw, 26px)) calc(-1 * clamp(18px, 2vw, 26px)) 14px; height: 120px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.tile__visual--sigma { background: radial-gradient(120% 120% at 30% 20%, #35291b, #201913); }
.tile__visual img { width: 100%; height: 100%; object-fit: cover; }
.tile__visual .cs__arch { width: 130px; max-width: 130px; }
/* stat */
.tile--stat { grid-column: span 2; justify-content: center; }
.tile__sn { font-family: var(--font-display); font-weight: 800; font-size: clamp(30px, 4vw, 44px); letter-spacing: -.02em; }
.tile__sn b { color: var(--accent-ink); }
.tile__sl { margin-top: 8px; font-family: var(--font-mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--dim); }

/* Modal de caso */
.cs-modal { position: fixed; inset: 0; z-index: 100; background: rgba(25,20,10,.9); backdrop-filter: blur(6px); display: flex; align-items: flex-start; justify-content: center; padding: clamp(24px, 6vh, 72px) 24px; opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s; overflow-y: auto; }
.cs-modal.is-open { opacity: 1; visibility: visible; }
.cs-modal__panel { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); width: min(920px, 92vw); padding: clamp(26px, 4vw, 48px); }
.cs-modal__close { position: fixed; top: 22px; right: 26px; width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.06); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; transition: .2s; z-index: 2; }
.cs-modal__close:hover { background: var(--accent); border-color: var(--accent); }
.cs-modal__body .cs__eyebrow { display: block; }
.cs-modal__body .cs__title { margin: 12px 0 0; }
.cs-modal__body .cs__facts { margin-top: 26px; }
.cs-modal__body .cs__fact { opacity: 1; transform: none; }

/* ---------- Perfil ---------- */
.about__grid { display: grid; grid-template-columns: 300px 1fr; gap: clamp(30px, 5vw, 64px); align-items: center; }
.about__photo { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 4/5; box-shadow: var(--shadow); }
.about__photo img { width: 100%; height: 100%; object-fit: cover; }
.about__body .section__title { margin-top: 12px; }
.about__text { color: var(--soft); font-size: clamp(15px, 2vw, 17px); margin-top: 18px; max-width: 56ch; }
.about__text:first-of-type { margin-top: 22px; }

/* ---------- KPIs ---------- */
.kpis { margin-top: clamp(40px, 6vw, 64px); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); }
.kpis__label { font-family: var(--font-mono); font-size: 11.5px; color: var(--dim); letter-spacing: .04em; padding: 16px clamp(18px, 3vw, 28px); border-bottom: 1px solid var(--line); background: var(--surface-2); }
.kpis__row { display: grid; grid-template-columns: repeat(4, 1fr); }
.kpis__row li { padding: clamp(20px, 3vw, 30px); border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.kpis__row li:first-child { border-left: 0; }
.kpis__n { font-family: var(--font-display); font-weight: 800; font-size: clamp(24px, 3.6vw, 36px); letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--accent-ink); }
.kpis__l { font-size: 12.5px; color: var(--soft); }

/* ---------- INAC · gerencia a escala nacional (bento 3 col × 2 fila) ---------- */
.inac__bento { margin-top: clamp(32px, 5vw, 52px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 0.92fr); grid-template-rows: auto auto; gap: clamp(12px, 1.5vw, 16px); }
/* col 1 · mapa (arriba) + foto (abajo) */
.inac-map { grid-column: 1; grid-row: 1; aspect-ratio: 5 / 4; margin: 0; position: relative; border-radius: var(--radius-lg); border: 1px solid var(--line); overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.inac-map img { width: 100%; height: 100%; object-fit: cover; object-position: center 42%; }
.inac-map__img--dark { position: absolute; inset: 0; display: none; }
:root[data-theme="dark"] .inac-map__img--light { display: none; }
:root[data-theme="dark"] .inac-map__img--dark { display: block; }
.inac-map__cap { position: absolute; left: 14px; bottom: 12px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em; color: #eccf92; background: rgba(20, 15, 8, .5); backdrop-filter: blur(4px); padding: 5px 10px; border-radius: 6px; }
/* col 2 · cifras (arriba, 2×2) + foto (abajo) */
.inac-metrics { grid-column: 2; grid-row: 1; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); }
.inac-metrics li { padding: clamp(14px, 1.8vw, 20px); border-left: 1px solid var(--line); border-top: 1px solid var(--line); justify-content: center; }
.inac-metrics li:nth-child(-n+2) { border-top: 0; }
.inac-metrics li:nth-child(odd) { border-left: 0; }
.inac-metrics .kpis__n { font-size: clamp(22px, 3vw, 30px); }
/* fotos: una bajo el mapa (col1), otra bajo las cifras (col2) */
.inac-photo { grid-row: 2; aspect-ratio: 4 / 3; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; cursor: zoom-in; background: none; }
.inac-photo--a { grid-column: 1; }
.inac-photo--b { grid-column: 2; }
.inac-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 42%; transition: transform .5s var(--ease); filter: saturate(.9) contrast(1.02); display: block; }
.inac-photo:hover img { transform: scale(1.05); }
/* col 3 · gestión (rectángulo vertical editorial, ocupa las 2 filas) */
.inac-note { grid-column: 3; grid-row: 1 / 3; display: flex; flex-direction: column; justify-content: center; gap: 16px; padding: clamp(22px, 2.6vw, 32px); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.inac-note__label { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--accent-ink); }
.inac-note p { font-size: clamp(15px, 1.5vw, 17.5px); line-height: 1.75; color: var(--soft); border-left: 3px solid var(--accent); padding-left: 16px; }
@media (max-width: 860px) {
  .inac__bento { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .inac-map { grid-column: 1 / 3; grid-row: 1; aspect-ratio: 16 / 10; }
  .inac-metrics { grid-column: 1 / 3; grid-row: 2; }
  .inac-photo--a { grid-column: 1; grid-row: 3; }
  .inac-photo--b { grid-column: 2; grid-row: 3; }
  .inac-note { grid-column: 1 / 3; grid-row: 4; }
}

/* ---------- Trayectoria ---------- */
.tl { display: flex; flex-direction: column; }
.tl__row { display: grid; grid-template-columns: 150px 1fr; gap: clamp(16px, 3vw, 40px); padding: clamp(22px, 3vw, 32px) 0; border-top: 1px solid var(--line); }
.tl__row:first-child { border-top: 0; padding-top: 0; }
.tl__when { padding-top: 3px; }
.tl__date { font-family: var(--font-mono); font-size: 12.5px; color: var(--accent-ink); }
.tl__role { font-family: var(--font-display); font-weight: 700; font-size: clamp(16px, 2.2vw, 20px); letter-spacing: -.01em; }
.tl__org { color: var(--dim); font-size: 13.5px; margin: 4px 0 14px; }
.tl__list { display: flex; flex-direction: column; gap: 7px; }
.tl__list li { color: var(--soft); font-size: 14.5px; padding-left: 18px; position: relative; }
.tl__list li::before { content: ""; position: absolute; left: 0; top: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* ---------- Diseño (evidencia) ---------- */
/* ---------- Web card (producto en vivo, marco navegador + scroll) ---------- */
.webcard { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(24px, 4vw, 52px); align-items: center; margin-bottom: clamp(56px, 8vw, 96px); }
.webcard__frame { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); background: #fff; }
.webcard__bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: #f1ece2; border-bottom: 1px solid var(--line); }
.webcard__dots { display: flex; gap: 6px; flex-shrink: 0; }
.webcard__dots i { width: 11px; height: 11px; border-radius: 50%; background: #cfc7b8; }
.webcard__dots i:nth-child(1) { background: #e6a08a; } .webcard__dots i:nth-child(2) { background: #e6c98a; } .webcard__dots i:nth-child(3) { background: #9ec79a; }
.webcard__url { flex: 1; min-width: 0; font-family: var(--font-mono); font-size: 12px; color: var(--dim); background: #fff; border: 1px solid var(--line); border-radius: 7px; padding: 6px 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.webcard__stage { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.webcard__frame { min-width: 0; }
.webcard__toggle { display: inline-flex; gap: 8px; align-self: flex-start; }
.webcard__vt { font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em; padding: 7px 15px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); color: var(--soft); cursor: pointer; transition: color .2s, background .2s, border-color .2s; }
.webcard__vt:hover { border-color: var(--accent); color: var(--accent-ink); }
.webcard__vt.is-active { background: var(--accent-tint); border-color: var(--accent); color: var(--accent-ink); }
.webcard__view { position: relative; height: 470px; overflow: hidden; background: #10182c; }
/* ancho/alto/escala del iframe los fija el JS (escritorio = render a 1280 escalado; móvil = 390) */
.webcard__view iframe { width: 100%; height: 100%; border: 0; display: block; }
.webcard__view.is-mobile { display: flex; justify-content: center; background: repeating-linear-gradient(45deg, #0d1526, #0d1526 10px, #101a2e 10px, #101a2e 20px); }
.webcard__view.is-mobile iframe { border-left: 1px solid rgba(255,255,255,.08); border-right: 1px solid rgba(255,255,255,.08); }
.webcard__view--img { overflow-y: auto; overflow-x: hidden; background: #fff; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.webcard__view--img::-webkit-scrollbar { width: 10px; }
.webcard__view--img::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 6px; }
.webcard__view--img img { width: 100%; display: block; }
.webcard__role--link { color: var(--accent-ink); text-decoration: none; transition: border-color .2s, background .2s; }
.webcard__role--link:hover { border-color: var(--accent); background: var(--accent-tint); }
.webcard__tag { display: inline-block; font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--accent-ink); border: 1px solid var(--line-2); border-radius: 999px; padding: 5px 12px; }
.webcard__title { font-family: var(--font-display); font-weight: 700; font-size: clamp(22px, 3vw, 30px); letter-spacing: -.02em; margin: 16px 0 12px; }
.webcard__title em { font-style: normal; color: var(--accent-ink); }
.webcard__desc { color: var(--soft); font-size: 15px; max-width: 46ch; }
.webcard__roles { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.webcard__role { font-size: 12.5px; font-weight: 600; color: var(--soft); border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; }

/* ---------- Mockup de teléfono + tarjeta de app ---------- */
.phone { position: relative; width: 210px; aspect-ratio: 9 / 19.5; background: #14161c; border-radius: 30px; padding: 7px; box-shadow: 0 26px 50px -26px rgba(31,26,15,.55); border: 1px solid #2a2c34; flex-shrink: 0; }
.phone__scr { width: 100%; height: 100%; border-radius: 23px; overflow: hidden; background: #000; }
.phone__scr img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.appcard { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 52px); align-items: center; margin-bottom: clamp(56px, 8vw, 96px); }
#design .webcard:last-child, #design .appcard:last-child { margin-bottom: 0; }
.appcard--flip .appcard__visual, .appcard--flip .appcard__art { order: 2; }
.appcard__visual { display: flex; justify-content: center; align-items: flex-start; padding: 8px 0; }
.appcard__visual .phone { width: 196px; }
.appcard__visual .phone:nth-child(1) { position: relative; z-index: 2; }
.appcard__visual .phone:nth-child(2) { margin-left: -58px; margin-top: 50px; position: relative; z-index: 1; }
/* mockup de laptop (Kaboom): pantalla + base dibujadas en CSS */
.laptop { width: 100%; max-width: 460px; }
.laptop__screen { position: relative; cursor: zoom-in; background: #1f1f22; border: 1px solid #2a2c34; border-radius: 12px 12px 4px 4px; padding: 10px 10px 11px; box-shadow: var(--shadow); }
.laptop__screen img { width: 100%; display: block; border-radius: 4px; }
.laptop__base { width: 116%; margin-left: -8%; height: 13px; background: linear-gradient(#e2ddd3, #c6c0b4); border-radius: 0 0 11px 11px; clip-path: polygon(3% 0, 97% 0, 100% 100%, 0 100%); position: relative; box-shadow: 0 12px 22px -14px rgba(31,26,15,.5); }
.laptop__base::before { content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 74px; height: 5px; background: rgba(0,0,0,.16); border-radius: 0 0 7px 7px; }
.dark .laptop__base { background: linear-gradient(#3a3d46, #2a2c34); }
.dark .laptop__base::before { background: rgba(0,0,0,.4); }

.appcard__art { border-radius: 14px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }
.appcard__art { cursor: zoom-in; position: relative; }
.appcard__art img { width: 100%; display: block; }
.appcard__art--conf { cursor: default; }
.appcard__conf { position: absolute; left: 14px; bottom: 14px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em; color: #eccf92; background: rgba(20,15,8,.62); backdrop-filter: blur(4px); padding: 5px 10px; border-radius: 6px; }
.mini-label { font-family: var(--font-mono); font-size: 11.5px; color: var(--dim); letter-spacing: .04em; margin: 48px 0 16px; }

.dgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.dcard { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--surface); cursor: zoom-in; aspect-ratio: 4/3; box-shadow: var(--shadow); }
.dcard img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.dcard:hover img { transform: scale(1.05); }
.dcard__cap { position: absolute; inset: auto 0 0 0; padding: 16px; display: flex; flex-direction: column; gap: 3px; background: linear-gradient(to top, rgba(20,15,5,.82), transparent); }
.dcard__tag { font-family: var(--font-mono); font-size: 11px; color: #e7c98d; text-transform: uppercase; letter-spacing: .06em; }
.dcard__name { font-family: var(--font-display); font-weight: 700; font-size: 16px; color: #fff; }

.field { margin-top: 26px; }
.field__label { font-family: var(--font-mono); font-size: 11.5px; color: var(--dim); margin-bottom: 14px; }
.field__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.field--2 .field__grid { grid-template-columns: repeat(2, 1fr); max-width: 540px; gap: 14px; }
.field__item--tall { aspect-ratio: 3 / 4; }
.field__item { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); cursor: zoom-in; aspect-ratio: 3/2; }
.field__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); filter: saturate(.85) contrast(1.02); }
.field__item:hover img { transform: scale(1.05); }

/* ---------- Stack ---------- */
.stack { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 36px); }
.stack__label { font-family: var(--font-mono); font-size: 12px; color: var(--accent-ink); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.stack__list { display: flex; flex-direction: column; gap: 16px; }
.stack__item { display: flex; flex-direction: column; gap: 2px; }
.stack__name { font-family: var(--font-display); font-weight: 700; font-size: 15px; }
.stack__ctx { color: var(--dim); font-size: 13px; }
.edu { margin-top: clamp(36px, 5vw, 54px); padding-top: clamp(28px, 4vw, 40px); border-top: 1px solid var(--line); }
.edu__list { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; color: var(--soft); font-size: 14.5px; }
.edu__list strong { color: var(--text); font-weight: 700; }

/* ---------- Certificaciones ---------- */
.certs { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.cert { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); cursor: zoom-in; box-shadow: var(--shadow); transition: border-color .25s, transform .25s var(--ease); }
.cert:hover { border-color: var(--accent); transform: translateY(-3px); }
.cert img { width: 100%; aspect-ratio: 3/2; object-fit: cover; border-bottom: 1px solid var(--line); display: block; background: #222; }
.cert__meta { padding: 15px 16px; display: flex; flex-direction: column; gap: 4px; }
.cert__tag { font-family: var(--font-mono); font-size: 11px; color: var(--accent-ink); text-transform: uppercase; letter-spacing: .06em; }
.cert__name { font-family: var(--font-display); font-weight: 700; font-size: 15px; }
#certs .edu { margin-top: clamp(30px, 4vw, 44px); }

/* ---------- Extra ---------- */
.extra { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.extra__card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); transition: border-color .25s, transform .25s var(--ease); }
.extra__card:hover { border-color: var(--accent); transform: translateY(-3px); }
.extra__tag { font-family: var(--font-mono); font-size: 11px; color: var(--accent-ink); text-transform: uppercase; letter-spacing: .06em; }
.extra__title { font-family: var(--font-display); font-weight: 700; font-size: 16px; margin: 10px 0 8px; }
.extra__text { color: var(--soft); font-size: 13.5px; }

/* ---------- Statement (momento oscuro) ---------- */
.statement { background: var(--bg); padding: clamp(72px, 12vw, 140px) 0; border-top: 1px solid var(--line); }
/* header del puente: sello (isotipo chico) + kicker + título + sub */
.statement__seal { display: block; width: 44px; height: 44px; margin-bottom: 22px; }
.statement__seal svg { width: 100%; height: 100%; }
.statement__seal .ss-o, .statement__seal .ss-t, .statement__seal .ss-n { stroke: var(--accent); stroke-width: 11; fill: none; }
.statement__seal .ss-t { stroke-linejoin: round; }
.statement__pre { font-family: var(--font-mono); font-size: 12px; color: var(--accent); text-transform: uppercase; letter-spacing: .16em; margin-bottom: 18px; }
.statement__title { font-family: var(--font-display); font-weight: 500; font-size: clamp(32px, 5vw, 58px); line-height: 1.05; letter-spacing: -.03em; padding-left: 22px; border-left: 4px solid var(--accent); max-width: 20ch; }
.statement__title em { font-style: normal; font-weight: 700; color: var(--accent); }
.statement__sub { margin-top: 20px; color: var(--soft); font-size: clamp(15px, 2vw, 17px); max-width: 52ch; }

/* 3 tarjetas de disciplina (estilo feature-cards, dark) */
.statement__cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2vw, 22px); margin-top: clamp(34px, 5vw, 56px); }
.disc-card { background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.1); border-radius: 16px; padding: clamp(22px, 3vw, 30px); transition: transform .3s var(--ease), border-color .3s, background .3s; }
.disc-card__ic { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 11px; background: rgba(216,176,106,.1); color: var(--accent); margin-bottom: 18px; transition: background .3s, box-shadow .3s; }
.disc-card__ic svg { width: 24px; height: 24px; }
.disc-card__t { font-family: var(--font-display); font-weight: 700; font-size: clamp(19px, 2.2vw, 23px); color: var(--text); }
.disc-card__d { margin-top: 10px; color: var(--soft); font-size: clamp(14px, 1.6vw, 15.5px); line-height: 1.55; }
.disc-card:hover { transform: translateY(-4px); border-color: rgba(216,176,106,.5); background: rgba(255,255,255,.055); }
/* ciclo sutil: la disciplina activa se ilumina (eco del pulso) */
.disc-card.is-active { border-color: rgba(216,176,106,.55); background: rgba(255,255,255,.05); }
.disc-card.is-active .disc-card__ic { background: rgba(216,176,106,.2); box-shadow: 0 0 0 1px rgba(216,176,106,.4), 0 0 22px -6px var(--accent); }

/* ---------- Contacto ---------- */
.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 5vw, 64px); align-items: start; }
.contact__lead { color: var(--soft); font-size: clamp(15px, 2vw, 17px); margin: 18px 0 22px; max-width: 44ch; }
.proof-pill { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; color: var(--soft); border: 1px solid var(--line-2); border-radius: 999px; padding: 8px 16px; transition: .2s; }
.proof-pill:hover { border-color: var(--accent); color: var(--text); }
.proof-pill__star { color: var(--accent); }
.proof-pill__arrow { color: var(--dim); transition: transform .2s var(--ease); }
.proof-pill:hover .proof-pill__arrow { transform: translate(2px, -2px); }
.contact__links { margin-top: 22px; display: flex; flex-direction: column; gap: 8px; }
.contact__links a { color: var(--soft); font-size: 14.5px; transition: color .2s; }
.contact__links a:hover { color: var(--accent-ink); }
.contact__cvlabel { margin-top: 24px; font-family: var(--font-mono); font-size: 11.5px; color: var(--dim); text-transform: uppercase; letter-spacing: .08em; }
.contact__links--cv { margin-top: 10px; }

.form { display: flex; flex-direction: column; gap: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(22px, 3vw, 32px); box-shadow: var(--shadow); }
.form__field { display: flex; flex-direction: column; gap: 7px; }
.form__field span { font-family: var(--font-mono); font-size: 11.5px; color: var(--soft); text-transform: uppercase; letter-spacing: .06em; }
.form__field input, .form__field textarea { background: var(--bg); border: 1px solid var(--line-2); border-radius: 8px; padding: 11px 13px; color: var(--text); font-family: var(--font-body); font-size: 14.5px; transition: border-color .2s; resize: vertical; }
.form__field input:focus, .form__field textarea:focus { outline: none; border-color: var(--accent); }
.form__field input::placeholder, .form__field textarea::placeholder { color: var(--dim); }
.form .btn { width: 100%; padding: 13px; }
.form__note { font-size: 12px; color: var(--dim); text-align: center; }

/* contacto directo: correo + whatsapp */
.contact__card { display: flex; flex-direction: column; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(20px, 3vw, 28px); box-shadow: var(--shadow); }
.contact__method { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--bg); transition: border-color .2s, background .2s, transform .2s; }
.contact__method:hover { border-color: var(--accent); background: var(--accent-tint); transform: translateY(-2px); }
.contact__method-ic { width: 42px; height: 42px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border-radius: 11px; background: var(--accent-tint); color: var(--accent-ink); }
.contact__method-ic svg { width: 21px; height: 21px; }
.contact__method-body { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.contact__method-label { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--dim); }
.contact__method-val { font-size: 15.5px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact__method-arrow { color: var(--accent-ink); flex-shrink: 0; font-size: 15px; }
.contact__cv { width: 100%; gap: 10px; padding: 13px; margin-top: 2px; }
.contact__cv svg { width: 18px; height: 18px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 34px 0; background: var(--bg-alt); }
.footer__inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer__copy { font-family: var(--font-mono); font-size: 12px; color: var(--dim); }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(25,20,10,.9); backdrop-filter: blur(6px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 40px; opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s; }
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox__img { max-width: min(92vw, 1100px); max-height: 82vh; object-fit: contain; border-radius: 10px; }
.lightbox__cap { font-family: var(--font-mono); font-size: 12.5px; color: #e7dfce; }
.lightbox__close { position: absolute; top: 22px; right: 26px; width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.06); color: #fff; font-size: 24px; line-height: 1; cursor: pointer; transition: .2s; }
.lightbox__close:hover { background: var(--accent); border-color: var(--accent); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  /* móvil: el hero deja de ser full-screen (evita el hueco por el centrado vertical) */
  .hero { min-height: auto; display: block; padding: clamp(36px, 7vh, 64px) 0 clamp(32px, 5vh, 56px); }
  .hero .container { max-width: var(--maxw); }
  .hero__top { grid-template-columns: 1fr; gap: 24px; }
  .hero__viz { flex-direction: column; align-items: stretch; }
  .hero__photo { width: min(100%, 340px); margin-left: 0; }
  /* móvil: la ficha vuelve a lista estática debajo de la foto (sin card ni superposición) */
  .hero__stats { position: static; transform: none; top: auto; width: auto; max-width: 100%; margin-top: 20px; padding: 0; background: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; }
  .condensador { width: 200px; }
  .about__grid { grid-template-columns: 1fr; }
  .about__photo { max-width: 260px; aspect-ratio: 1/1; }
  .contact__grid { grid-template-columns: 1fr; }
  .extra { grid-template-columns: repeat(2, 1fr); }
  .stack { grid-template-columns: 1fr; gap: 30px; }
  .webcard { grid-template-columns: 1fr; gap: 24px; }
  .webcard__view { height: 380px; }
  .appcard { grid-template-columns: 1fr; gap: 24px; }
  .appcard--flip .appcard__visual { order: 0; }
  .phone { width: 180px; }
  .statement__cards { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .cs, .cs--flip { grid-template-columns: 1fr; }
  .cs--flip .cs__visual { order: 0; border-left: 0; }
  .cs__visual { min-height: 200px; border-right: 0; border-bottom: 1px solid var(--line); }
  .cs__facts { grid-template-columns: 1fr; gap: 22px; }
}
@media (max-width: 720px) {
  .nav__links { display: none; }
  .kpis__row { grid-template-columns: repeat(2, 1fr); }
  .kpis__row li:nth-child(odd) { border-left: 0; }
  .kpis__row li:nth-child(n+3) { border-top: 1px solid var(--line); }
  .dgrid { grid-template-columns: 1fr; }
  .field__grid { grid-template-columns: 1fr; }
  .certs { grid-template-columns: 1fr; }
  .tl__row { grid-template-columns: 1fr; gap: 10px; }
}
@media (max-width: 460px) {
  .extra { grid-template-columns: 1fr; }
  .hero__stats { max-width: 100%; }
  .kpis__row { grid-template-columns: 1fr; }
  .kpis__row li { border-left: 0; border-top: 1px solid var(--line); }
  .kpis__row li:first-child { border-top: 0; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
  .hero__content .line__in { transform: none; }
  .hero__content .hero__kick, .hero__content .hero__role, .hero__content .hero__lead, .hero__content .hero__cta { opacity: 1; transform: none; }
  .cs__fact { opacity: 1; transform: none; }
  .disc-card { transition: none; }
  .section__kicker::before { transform: scaleX(1); }
  .cond-trace { stroke-dashoffset: 0; }
  .cond-charge { display: none; }
}
