/* ==========================================================================
   Guillermo Muro Giménez — portfolio
   Paleta «alta montaña»: nieve, noche alpina, azul glaciar y naranja cumbre.
   ========================================================================== */

/* ---------- Tokens: modo claro (por defecto) ---------- */
:root {
  color-scheme: light;
  --bg: #f3f6fa;
  --bg-2: #e9eef5;
  --surface: #ffffff;
  --ink: #0c1a2e;
  --ink-2: #2b3a52;
  --muted: #5b677b;
  --line: rgb(12 26 46 / .1);
  --line-strong: rgb(12 26 46 / .18);
  --accent: #2a63cf;          /* azul glaciar apto para texto */
  --accent-fill: #2f6fde;     /* azul de la marca (README) */
  --accent-soft: rgb(47 111 222 / .09);
  --summit: #f26b1d;          /* naranja cumbre, solo como acento */
  --glass: rgb(255 255 255 / .68);
  --glass-strong: rgb(255 255 255 / .9);
  --glass-edge: rgb(255 255 255 / .75);
  --stage-glow: rgb(47 111 222 / .12);
  --depth-tint: 243 246 250;  /* niebla que aleja las tarjetas laterales */
  --code-bg: #0d1626;
  --code-edge: rgb(12 26 46 / .08);
  --shadow-1: 0 1px 2px rgb(12 26 46 / .05), 0 6px 18px -6px rgb(12 26 46 / .1);
  --shadow-2: 0 2px 6px rgb(12 26 46 / .06), 0 30px 70px -18px rgb(12 26 46 / .32);
  --video-filter: invert(1) sepia(1) hue-rotate(176deg) saturate(2.6) brightness(1.04);
  --video-blend: multiply;
  --video-opacity: .55;
  --flow-line: rgb(47 111 222 / .5);
  --flow-glow: rgb(47 111 222 / .08);
  --flow-halo: .22;
  --node-glow: rgb(255 255 255 / .95);

  --font: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Cascadia Code", "Cascadia Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --spring: var(--ease-out);
  --container: 1200px;
  --nav-h: 64px;
}

/* Muelle críticamente amortiguado (amortiguación 1.0, respuesta 0.4 s) muestreado para CSS */
@supports (transition-timing-function: linear(0, 1)) {
  :root {
    --spring: linear(0, .243 10%, .562 20%, .773 30%, .89 40%, .949 50%, .977 60%, .99 70%, .996 80%, .998 90%, 1);
  }
}

/* ---------- Tokens: modo oscuro ---------- */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #070c16;
  --bg-2: #0b1220;
  --surface: #0f1828;
  --ink: #eaf0f8;
  --ink-2: #c3cedd;
  --muted: #8e9bb0;
  --line: rgb(234 240 248 / .09);
  --line-strong: rgb(234 240 248 / .17);
  --accent: #7aa5ff;
  --accent-fill: #2f6fde;
  --accent-soft: rgb(122 165 255 / .12);
  --summit: #ff8a3d;
  --glass: rgb(14 22 38 / .62);
  --glass-strong: rgb(16 25 42 / .92);
  --glass-edge: rgb(255 255 255 / .1);
  --stage-glow: rgb(63 123 234 / .2);
  --depth-tint: 7 12 22;
  --code-bg: #0c1424;
  --code-edge: rgb(255 255 255 / .08);
  --shadow-1: 0 1px 2px rgb(0 0 0 / .4), 0 8px 22px -8px rgb(0 0 0 / .5);
  --shadow-2: 0 2px 8px rgb(0 0 0 / .45), 0 34px 80px -16px rgb(0 0 0 / .75);
  --video-filter: sepia(.6) hue-rotate(180deg) saturate(2.4) brightness(.92);
  --video-blend: screen;
  --video-opacity: .85;
  --flow-line: rgb(122 177 255 / .82);
  --flow-glow: rgb(70 140 255 / .15);
  --flow-halo: .34;
  --node-glow: rgb(80 150 255 / .34);
}

/* Sin JavaScript: respetar el modo del sistema */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --bg: #070c16;
    --bg-2: #0b1220;
    --surface: #0f1828;
    --ink: #eaf0f8;
    --ink-2: #c3cedd;
    --muted: #8e9bb0;
    --line: rgb(234 240 248 / .09);
    --line-strong: rgb(234 240 248 / .17);
    --accent: #7aa5ff;
    --accent-soft: rgb(122 165 255 / .12);
    --summit: #ff8a3d;
    --glass: rgb(14 22 38 / .62);
    --glass-strong: rgb(16 25 42 / .92);
    --glass-edge: rgb(255 255 255 / .1);
    --stage-glow: rgb(63 123 234 / .2);
    --depth-tint: 7 12 22;
    --code-bg: #0c1424;
    --code-edge: rgb(255 255 255 / .08);
    --shadow-1: 0 1px 2px rgb(0 0 0 / .4), 0 8px 22px -8px rgb(0 0 0 / .5);
    --shadow-2: 0 2px 8px rgb(0 0 0 / .45), 0 34px 80px -16px rgb(0 0 0 / .75);
    --video-filter: sepia(.6) hue-rotate(180deg) saturate(2.4) brightness(.92);
    --video-blend: screen;
    --video-opacity: .85;
    --flow-line: rgb(122 177 255 / .82);
    --flow-glow: rgb(70 140 255 / .15);
    --flow-halo: .34;
    --node-glow: rgb(80 150 255 / .34);
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  font-family: var(--font);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 24px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 400;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -.012em; font-weight: 680; }
p { margin: 0; }
img, svg, video { display: block; max-width: 100%; }
a { color: var(--accent); }
button { font: inherit; color: inherit; }

::selection { background: color-mix(in oklab, var(--accent-fill) 26%, transparent); }

:focus-visible {
  outline: 2.5px solid var(--accent-fill);
  outline-offset: 3px;
  border-radius: 6px;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.container {
  width: min(100% - 40px, var(--container));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -64px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
  transition: top .2s var(--ease-out);
}
.skip-link:focus { top: 12px; }

/* ---------- Tipografía de sección ---------- */
.display {
  font-size: clamp(3rem, 14.6vw, 6.4rem);
  font-stretch: 114%;
  font-weight: 780;
  line-height: .92;
  letter-spacing: -.045em;
}
.display span { display: block; }
/* A dos columnas el nombre se mide contra su columna, no contra la ventana */
@media (min-width: 861px) {
  .display { font-size: clamp(3rem, min(7.3vw, 11vh), 6.4rem); }
}

.section-title {
  font-size: clamp(2.15rem, 4.6vw, 3.55rem);
  font-stretch: 112%;
  font-weight: 760;
  line-height: 1;
  letter-spacing: -.036em;
}

.section-intro {
  margin-top: 18px;
  max-width: 52ch;
  color: var(--muted);
  font-size: 1.125rem;
  line-height: 1.55;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 1rem;
  font-weight: 620;
  letter-spacing: -.005em;
  text-decoration: none;
  cursor: pointer;
  transition: transform .35s var(--spring), background-color .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
  -webkit-tap-highlight-color: transparent;
}
/* Respuesta en el momento de pulsar, no al soltar */
.btn:active { transform: scale(.97); transition-duration: .08s; }
.btn .icon { width: 18px; height: 18px; }

.btn-primary {
  background: var(--accent-fill);
  color: #fff;
  box-shadow: 0 10px 26px -12px rgb(47 111 222 / .75), inset 0 1px 0 rgb(255 255 255 / .18);
}
.btn-primary:hover { background: #2963cf; }

.btn-quiet {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-quiet:hover { border-color: color-mix(in oklab, var(--ink) 35%, transparent); }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background-color .2s ease, transform .35s var(--spring);
  -webkit-tap-highlight-color: transparent;
}
.icon-btn:hover { background: var(--accent-soft); }
.icon-btn:active { transform: scale(.92); transition-duration: .08s; }

/* ---------- Navegación: píldora translúcida ---------- */
.site-nav {
  position: fixed;
  inset: 12px 0 auto;
  z-index: 50;
  display: flex;
  justify-content: center;
  padding-inline: 12px;
  pointer-events: none;
}

.nav-pill {
  position: relative;
  display: flex;
  align-items: center;
  gap: 2px;
  max-width: 100%;
  padding: 6px;
  border-radius: 999px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid var(--glass-edge);
  box-shadow: 0 10px 34px -14px rgb(12 26 46 / .35);
  pointer-events: auto;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 12px 2px 2px;
  border-radius: 999px;
  color: var(--ink);
  font-weight: 700;
  font-stretch: 108%;
  letter-spacing: -.015em;
  text-decoration: none;
  white-space: nowrap;
}
.nav-brand img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.nav-links {
  display: flex;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav-links a {
  display: block;
  padding: 8px 13px;
  border-radius: 999px;
  color: var(--ink-2);
  font-size: .9375rem;
  font-weight: 540;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .2s ease, color .2s ease;
}
.nav-links a:hover { background: var(--accent-soft); color: var(--ink); }
.nav-links a[aria-current="true"] { background: var(--ink); color: var(--bg); }

.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

.nav-toggle { display: none; }
.nav-toggle .icon-close { display: none; }
.nav-pill[data-open] .nav-toggle .icon-menu { display: none; }
.nav-pill[data-open] .nav-toggle .icon-close { display: block; }

@media (max-width: 940px) {
  .nav-toggle { display: inline-grid; }
  .nav-links {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    flex-direction: column;
    min-width: 232px;
    padding: 8px;
    border-radius: 24px;
    background: var(--glass-strong);
    -webkit-backdrop-filter: blur(26px) saturate(180%);
    backdrop-filter: blur(26px) saturate(180%);
    border: 1px solid var(--glass-edge);
    box-shadow: var(--shadow-2);
    transform-origin: calc(100% - 26px) -10px;   /* nace del botón que lo abre */
    opacity: 0;
    visibility: hidden;
    transform: scale(.94);
    transition: opacity .2s ease, transform .45s var(--spring), visibility 0s linear .45s;
  }
  .nav-links a { padding: 12px 16px; font-size: 1rem; }
  .nav-pill[data-open] .nav-links {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .2s ease, transform .45s var(--spring), visibility 0s;
  }
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  --band-h: 196px;      /* franja inferior donde vive la onda con las apps */
  --node: clamp(30px, 8.6vw, 52px);
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: max(680px, min(100svh, 1000px));
  padding: calc(var(--nav-h) + clamp(28px, 7vh, 72px)) 0 var(--band-h);
  overflow: clip;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(80% 60% at 78% 30%, var(--stage-glow), transparent 65%),
    radial-gradient(60% 50% at 10% 100%, color-mix(in oklab, var(--accent-fill) 7%, transparent), transparent 70%),
    var(--bg);
}

/* ---------- Bucle Microsoft 365: onda con pulsos y las apps encima ---------- */
.flow {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
}
.flow-line { fill: none; stroke: var(--flow-line); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.flow-glow { fill: none; stroke: var(--flow-glow); stroke-width: 14; stroke-linecap: round; stroke-linejoin: round; }
.flow-halo { opacity: var(--flow-halo); }

.flow-nodes {
  position: absolute;
  inset-inline: 0;
  bottom: calc(var(--band-h) * .36);
  z-index: 2;
  display: flex;
  justify-content: space-between;
  width: min(100% - 40px, var(--container));
  margin: 0 auto;
  padding: 0;
  list-style: none;
  pointer-events: none;
}
.flow-nodes li { pointer-events: auto; }

.flow-node {
  position: relative;
  display: grid;
  place-items: center;
  width: var(--node);
  height: var(--node);
  border-radius: 30%;
  text-decoration: none;
  will-change: transform;
  -webkit-tap-highlight-color: transparent;
}
/* Halo de luz sobre el que se apoya cada icono, como los puntos del banner */
.flow-node::before {
  content: "";
  position: absolute;
  inset: -55%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--node-glow), transparent);
  pointer-events: none;
}
.flow-node img {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 6px 12px rgb(12 26 46 / .22));
  transition: transform .45s var(--spring);
}
.flow-node:hover img,
.flow-node:focus-visible img { transform: translateY(-4px) scale(1.08); }
.flow-node:active img { transform: scale(.94); transition-duration: .08s; }
.flow-node:focus-visible { outline-offset: 6px; border-radius: 30%; }

/* Etiqueta con el nombre: aparece al pasar o enfocar */
.flow-node span {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 14px);
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: .8125rem;
  font-weight: 620;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, 6px) scale(.96);
  transition: opacity .18s ease, transform .4s var(--spring);
  pointer-events: none;
}
.flow-node:hover span,
.flow-node:focus-visible span { opacity: 1; transform: translate(-50%, 0); }

.flow-ring {
  position: absolute;
  inset: -8px;
  border-radius: 34%;
  border: 2px solid var(--pulse, #00a4ef);
  opacity: 0;
  pointer-events: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
  align-items: center;
  gap: clamp(32px, 5vw, 80px);
}

.hero-lead {
  margin-top: 28px;
  max-width: 30ch;
  color: var(--ink-2);
  font-size: clamp(1.18rem, 1.7vw, 1.42rem);
  line-height: 1.45;
  letter-spacing: -.008em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.hero-creds {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
}
.hero-creds a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px 6px 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: color-mix(in oklab, var(--surface) 70%, transparent);
  color: var(--ink-2);
  font-size: .875rem;
  text-decoration: none;
  transition: border-color .2s ease, transform .35s var(--spring);
}
.hero-creds a:hover { border-color: var(--line-strong); }
.hero-creds a:active { transform: scale(.98); }
.hero-creds img {
  width: 30px;
  height: 30px;
  padding: 3px;
  border-radius: 50%;
  background: #fff;
  object-fit: contain;
}
.hero-creds strong { color: var(--ink); font-weight: 700; margin-right: 4px; }

.hero-photo {
  justify-self: end;
  width: min(100%, 460px);
  margin: 0;
}
.hero-photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 38px;
  box-shadow:
    0 0 0 1px rgb(255 255 255 / .35) inset,
    0 2px 6px rgb(12 26 46 / .08),
    0 40px 90px -30px rgb(12 26 46 / .55);
}
:root[data-theme="dark"] .hero-photo img {
  box-shadow: 0 2px 8px rgb(0 0 0 / .5), 0 50px 100px -30px rgb(0 0 0 / .9), 0 0 0 1px rgb(255 255 255 / .08);
}

/* Una única secuencia orquestada al cargar: texto, foto y, por último, la onda con las apps */
@media (prefers-reduced-motion: no-preference) {
  .js .hero-photo { animation: materialize 1s var(--spring) .12s both; }
  .js .hero-copy > * { animation: rise .9s var(--spring) both; }
  .js .hero-copy > :nth-child(2) { animation-delay: .07s; }
  .js .hero-copy > :nth-child(3) { animation-delay: .14s; }
  .js .hero-copy > :nth-child(4) { animation-delay: .21s; }
  .js .flow { animation: fade-in 1.4s var(--ease-out) .3s both; }
  .js .flow-nodes li { animation: rise .9s var(--spring) both; animation-delay: calc(.45s + var(--i) * .06s); }
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes materialize {
  from { opacity: 0; transform: scale(.94); filter: blur(12px); }
  to   { opacity: 1; transform: none; filter: none; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

@media (max-width: 860px) {
  .hero { --band-h: 150px; min-height: 0; padding-top: calc(var(--nav-h) + 40px); }
  .hero-inner { grid-template-columns: 1fr; gap: 36px; }
  .hero-photo { order: -1; justify-self: start; width: min(100%, 440px); }
  .hero-photo img { border-radius: 30px; }
}

/* ==========================================================================
   MICROSOFT 365 — CARRUSEL 3D
   ========================================================================== */
.apps {
  position: relative;
  padding-block: clamp(80px, 10vw, 136px) clamp(80px, 10vw, 132px);
  overflow: clip;
  background:
    radial-gradient(55% 42% at 50% 52%, var(--stage-glow), transparent 72%),
    var(--bg);
}

.apps-head {
  text-align: center;
  margin-bottom: clamp(44px, 6vw, 76px);
}
.apps-head .section-intro { margin-inline: auto; }

.coverflow {
  --card-w: clamp(244px, 29vw, 372px);
  --card-h: calc(var(--card-w) * 1.25);
  position: relative;
  outline: none;
}
.coverflow:focus-visible .cf-caption { outline: 2.5px solid var(--accent-fill); outline-offset: 4px; }

.cf-track {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Sin JS: tira horizontal con scroll-snap */
.cf-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 0 20px 24px;
  scroll-snap-type: x mandatory;
}
.cf-slide {
  flex: 0 0 var(--card-w);
  height: var(--card-h);
  scroll-snap-align: center;
}
.cf-caption, .cf-controls { display: none; }

/* Con JS: escenario 3D */
.js .coverflow {
  height: calc(var(--card-h) + 92px);
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
.js .cf-track {
  display: block;
  position: relative;
  height: var(--card-h);
  overflow: visible;
  padding: 0;
  perspective: 1500px;
  perspective-origin: 50% 45%;
}
.js .cf-slide {
  position: absolute;
  top: 0;
  left: 50%;
  width: var(--card-w);
  margin-left: calc(var(--card-w) / -2);
  cursor: grab;
  will-change: transform, opacity;
  backface-visibility: hidden;
}
.js .coverflow.is-dragging .cf-slide { cursor: grabbing; }
.js .cf-caption { display: block; }
.js .cf-controls { display: flex; }

.cf-card {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 30px;
  container-type: inline-size;
  color: #fff;
  background:
    radial-gradient(120% 72% at 10% 0%, color-mix(in oklab, var(--a3) 88%, white) 0%, transparent 58%),
    radial-gradient(90% 60% at 100% 100%, color-mix(in oklab, var(--a1) 70%, black) 0%, transparent 72%),
    linear-gradient(162deg, var(--a2) 0%, var(--a1) 100%);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / .28),
    inset 0 0 0 1px rgb(255 255 255 / .1),
    0 34px 60px -28px rgb(8 16 36 / .6);
  -webkit-box-reflect: below 14px linear-gradient(transparent 64%, rgb(255 255 255 / .26));
}
/* Niebla de profundidad: las tarjetas lejanas se funden con el fondo */
.cf-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgb(var(--depth-tint));
  opacity: var(--depth, 0);
  pointer-events: none;
}

.cf-icon {
  position: absolute;
  left: 9cqi;
  top: 9cqi;
  width: 25cqi;
  height: 25cqi;
  filter: drop-shadow(0 1.6cqi 3.2cqi rgb(0 0 0 / .32));
  pointer-events: none;
}
.cf-ghost {
  position: absolute;
  right: -20cqi;
  top: -12cqi;
  width: 82cqi;
  height: 82cqi;
  opacity: .11;
  filter: brightness(0) invert(1);
  pointer-events: none;
}

/* ---------- Escenas: mini interfaces dentro de cada tarjeta ---------- */
.scene {
  position: absolute;
  left: 8cqi;
  right: 8cqi;
  bottom: 8cqi;
  padding: 5cqi;
  border-radius: 6.5cqi;
  background: rgb(255 255 255 / .13);
  border: 1px solid rgb(255 255 255 / .24);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .22), 0 3cqi 8cqi -3cqi rgb(0 0 0 / .35);
  font-size: 3.6cqi;
  line-height: 1.3;
  pointer-events: none;
}
.scene svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.scene b {
  display: block;
  height: 2.6cqi;
  width: var(--w, 50%);
  border-radius: 99px;
  background: rgb(255 255 255 / .55);
}

.sc-rows { margin: 0; padding: 0; list-style: none; }
.sc-rows li {
  display: flex;
  align-items: center;
  gap: 3cqi;
  padding: 2.6cqi 0;
}
.sc-rows li + li { border-top: 1px solid rgb(255 255 255 / .14); }
.sc-rows b { flex: 0 1 var(--w); }
.sc-glyph { width: 6.4cqi; height: 6.4cqi; flex: none; opacity: .9; }
.sc-ok {
  width: 5.6cqi;
  height: 5.6cqi;
  margin-left: auto;
  padding: .9cqi;
  flex: none;
  border-radius: 50%;
  background: #3ddc97;
  color: #053321;
  stroke-width: 3.2 !important;
}

.sc-label {
  display: flex;
  align-items: center;
  gap: 1.8cqi;
  margin-top: 3cqi;
  font-weight: 650;
  letter-spacing: .01em;
}
.sc-label svg { width: 5.2cqi; height: 5.2cqi; }
.sc-label--top { margin: 0 0 1.4cqi; justify-content: center; }

/* Teams */
.sc-meet { display: grid; grid-template-columns: 1fr 1fr; gap: 2.4cqi; }
.sc-tile {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  border-radius: 3cqi;
  background: rgb(255 255 255 / .12);
}
.sc-tile i { width: 11cqi; aspect-ratio: 1; border-radius: 50%; background: var(--c); }
.sc-tile--talk { box-shadow: inset 0 0 0 .7cqi rgb(255 255 255 / .9); }
.sc-bar { display: flex; justify-content: center; gap: 2.4cqi; margin-top: 3.4cqi; }
.sc-bar i { width: 7cqi; height: 7cqi; border-radius: 50%; background: rgb(255 255 255 / .24); }
.sc-bar .sc-end { width: 12cqi; border-radius: 99px; background: #e5484d; }

/* SharePoint */
.sc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 2.6cqi;
  border-bottom: 1px solid rgb(255 255 255 / .18);
}
.sc-head b { height: 3.2cqi; background: rgb(255 255 255 / .85); }
.sc-people { display: flex; }
.sc-people i {
  width: 6.4cqi;
  aspect-ratio: 1;
  margin-left: -1.6cqi;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 0 .6cqi color-mix(in oklab, var(--a2) 75%, black);
}

/* Exchange */
.sc-route { display: flex; align-items: center; gap: 2.4cqi; margin-bottom: 1.6cqi; }
.sc-node {
  display: grid;
  place-items: center;
  width: 11cqi;
  height: 11cqi;
  flex: none;
  border-radius: 50%;
  background: rgb(255 255 255 / .16);
  border: 1px solid rgb(255 255 255 / .3);
}
.sc-node svg { width: 5.8cqi; height: 5.8cqi; }
.sc-node--hi { background: #fff; color: var(--a2); border-color: #fff; }
.sc-track {
  position: relative;
  flex: 1;
  height: 1.3cqi;
  overflow: hidden;
  border-radius: 99px;
  background: rgb(255 255 255 / .2);
}
.sc-track i {
  position: absolute;
  inset: 0 26% 0 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgb(255 255 255 / .35), #fff);
}

/* Intune */
.sc-split { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 5cqi; }
.sc-ring { position: relative; width: 25cqi; aspect-ratio: 1; }
.sc-ring > svg:first-child { width: 100%; height: 100%; transform: rotate(-90deg); }
.sc-ring-track { fill: none; stroke: rgb(255 255 255 / .2); stroke-width: 3.6; }
.sc-ring-value { fill: none; stroke: #3ddc97; stroke-width: 3.6; stroke-linecap: round; stroke-dasharray: 100 0; }
.sc-ring-check { position: absolute; inset: 30%; width: 40%; height: 40%; color: #fff; stroke-width: 3 !important; }
.sc-devices { margin: 0; padding: 0; list-style: none; }
.sc-devices li { display: flex; align-items: center; gap: 2.2cqi; padding: 2.2cqi 0; font-weight: 600; }
.sc-devices li + li { border-top: 1px solid rgb(255 255 255 / .14); }
.sc-devices li > svg:first-child { width: 6cqi; height: 6cqi; flex: none; }

/* Entra ID */
.sc-flow { display: flex; align-items: flex-start; }
.sc-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.8cqi;
  font-size: 3.2cqi;
  font-weight: 650;
}
.sc-step i {
  display: grid;
  place-items: center;
  width: 13cqi;
  height: 13cqi;
  border-radius: 50%;
  background: rgb(255 255 255 / .16);
  border: 1px solid rgb(255 255 255 / .32);
}
.sc-step svg { width: 6.6cqi; height: 6.6cqi; }
.sc-step--hi i { background: #fff; color: var(--a2); border-color: #fff; }
.sc-link { flex: 1; margin-top: 6.5cqi; border-top: .55cqi dashed rgb(255 255 255 / .55); }
.sc-flow + .sc-label { justify-content: center; margin-top: 4cqi; opacity: .9; }

/* Defender */
.sc-sev {
  width: 2.8cqi;
  height: 2.8cqi;
  flex: none;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 0 .9cqi color-mix(in oklab, var(--c) 30%, transparent);
}
.sc-rows em {
  margin-left: auto;
  padding: .8cqi 2.2cqi;
  border-radius: 99px;
  background: rgb(61 220 151 / .22);
  color: #c8f7e1;
  font-size: 3cqi;
  font-style: normal;
  font-weight: 650;
}

/* ---------- Pie del carrusel ---------- */
.cf-caption {
  position: absolute;
  left: 50%;
  top: calc(var(--card-h) - 28px);
  z-index: 300;
  margin: 0;
  padding: 12px 26px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(18px) saturate(170%);
  backdrop-filter: blur(18px) saturate(170%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  font-weight: 720;
  font-stretch: 106%;
  letter-spacing: -.02em;
  white-space: nowrap;
  pointer-events: none;
}
.cf-caption span { display: block; }

.cf-controls {
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 8px;
}
.cf-arrow { border: 1px solid var(--line-strong); }
.cf-arrow .icon { width: 19px; height: 19px; }
.cf-dots { display: flex; align-items: center; gap: 4px; }
.cf-dot {
  position: relative;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.cf-dot::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 11px;
  height: 11px;
  border-radius: 99px;
  border: 1.5px solid color-mix(in oklab, var(--ink) 55%, transparent);
  transform: translate(-50%, -50%);
  transition: width .45s var(--spring), background-color .2s ease, border-color .2s ease;
}
.cf-dot[aria-current="true"]::before {
  width: 24px;
  background: var(--ink);
  border-color: var(--ink);
}

/* ---------- Detalle de la app activa ---------- */
.cf-details {
  display: grid;
  max-width: 820px;
  margin: clamp(36px, 5vw, 56px) auto 0;
}
.cf-detail {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.4fr);
  align-content: start;
  gap: 18px 40px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.cf-detail + .cf-detail { margin-top: 48px; }
.js .cf-detail { grid-area: 1 / 1; margin-top: 0; }
.js .cf-detail:not(.is-active) { visibility: hidden; opacity: 0; }

.cf-detail-head { display: flex; align-items: center; gap: 14px; align-self: start; }
.cf-detail-head img { width: 44px; height: 44px; }
.cf-detail-head h3 { font-size: 1.375rem; font-stretch: 106%; font-weight: 720; letter-spacing: -.02em; }
.cf-detail-head p { color: var(--muted); font-size: .9375rem; margin-top: 2px; }
.cf-detail-body > p { color: var(--ink-2); font-size: 1.0625rem; }

.checks { margin: 16px 0 0; padding: 0; list-style: none; }
.checks li {
  position: relative;
  padding: 7px 0 7px 30px;
  color: var(--ink);
}
.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4L18 8.5'/%3E%3C/svg%3E") center / 14px no-repeat,
    var(--accent-fill);
}

@media (max-width: 720px) {
  .cf-detail { grid-template-columns: 1fr; }
}

/* ==========================================================================
   SOBRE MÍ
   ========================================================================== */
.about {
  padding-block: clamp(80px, 10vw, 136px);
  background: var(--bg-2);
}
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: start;
}
.about-lead {
  margin-top: 26px;
  max-width: 34ch;
  font-size: clamp(1.25rem, 1.9vw, 1.5rem);
  line-height: 1.45;
  letter-spacing: -.012em;
}

.focus-list { margin: 40px 0 0; }
.focus-list > div {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr);
  gap: 18px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.focus-list dt { font-weight: 700; }
.focus-list dd { margin: 0; color: var(--ink-2); }

.manifest {
  position: sticky;
  top: calc(var(--nav-h) + 40px);
  margin: 0;
  overflow: hidden;
  border-radius: 24px;
  background: var(--code-bg);
  border: 1px solid var(--code-edge);
  box-shadow: var(--shadow-2);
  color: #d9e3f1;
}
.manifest-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 18px;
  border-bottom: 1px solid rgb(255 255 255 / .07);
  color: #8fa1bb;
  font: 500 .8125rem/1 var(--mono);
}
.manifest-dots { display: flex; gap: 7px; }
.manifest-dots i { width: 11px; height: 11px; border-radius: 50%; background: rgb(255 255 255 / .16); }
.manifest pre {
  margin: 0;
  padding: 20px 22px 24px;
  overflow-x: auto;
  font: 400 .84rem/1.75 var(--mono);
  tab-size: 2;
}
.y-k { color: #8cc4ff; }
.y-v { color: #ffd59a; }
.y-t { color: #9be8c7; }
.y-c { color: #5f7290; }

@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .manifest { position: static; }
}
@media (max-width: 520px) {
  .focus-list > div { grid-template-columns: 1fr; gap: 4px; }
}

/* ==========================================================================
   EXPERIENCIA
   ========================================================================== */
.experience { padding-block: clamp(80px, 10vw, 136px); }

.timeline { margin: 48px 0 0; padding: 0; list-style: none; }
.tl-item {
  display: grid;
  grid-template-columns: 13rem minmax(0, 1fr);
  gap: 18px clamp(24px, 4vw, 64px);
  padding-block: 40px;
  border-top: 1px solid var(--line);
}
.tl-when {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-left: 22px;
  color: var(--ink-2);
  font-weight: 620;
  font-variant-numeric: tabular-nums;
}
/* Hito de la línea temporal; el más reciente en naranja cumbre */
.tl-when::before {
  content: "";
  position: absolute;
  left: 0;
  top: .5em;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--muted);
}
.tl-item:first-child .tl-when::before { border-color: var(--summit); background: var(--summit); }
.tl-span { color: var(--muted); font-weight: 400; font-size: .9375rem; }

.tl-company {
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  font-stretch: 110%;
  font-weight: 740;
  letter-spacing: -.03em;
}
.tl-company a { color: inherit; text-decoration: none; }
.tl-company a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.tl-role { margin-top: 8px; font-size: 1.125rem; font-weight: 640; }
.tl-meta { margin-top: 2px; color: var(--muted); font-size: .9375rem; }
.tl-summary { margin-top: 18px; max-width: 64ch; color: var(--ink-2); }
.tl-note { margin-top: 10px; color: var(--ink-2); }

.tl-areas {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}
.tl-areas li {
  padding: 20px 22px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.tl-areas h4 { margin-bottom: 6px; font-size: 1rem; font-weight: 700; }
.tl-areas p { color: var(--ink-2); font-size: .9375rem; line-height: 1.55; }

.tl-roles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px clamp(24px, 4vw, 48px);
  margin-top: 4px;
}
.tl-roleblock > .tl-role:first-child { margin-top: 10px; }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}
.tags li {
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--ink-2);
  font-size: .8125rem;
  font-weight: 540;
}

@media (max-width: 860px) {
  .tl-item { grid-template-columns: 1fr; padding-block: 32px; }
  .tl-areas, .tl-roles { grid-template-columns: 1fr; }
}

/* ==========================================================================
   CERTIFICACIONES
   ========================================================================== */
.certs {
  padding-block: clamp(80px, 10vw, 136px);
  background: var(--bg-2);
}
.cert-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
  margin: 48px 0 0;
  padding: 0;
  list-style: none;
}
.cert {
  grid-column: span 3;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px;
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
}
.cert--featured {
  grid-column: span 6;
  flex-direction: row;
  align-items: center;
  gap: 26px;
  padding: 26px;
}
/* Flex y no grid: así el max-height en % se resuelve contra la altura fija de la placa */
.cert-plate {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  height: 108px;
  border-radius: 16px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgb(12 26 46 / .07);
}
.cert--featured .cert-plate { width: 150px; height: 150px; border-radius: 24px; }
.cert-plate img { width: auto; height: auto; max-width: 72%; max-height: 80%; object-fit: contain; }
.cert--featured .cert-plate img { max-width: 78%; }
.cert-plate--wide img { max-width: 70%; }
.cert-wordmark {
  color: #1b4fa8;
  font-size: 1.4rem;
  font-weight: 800;
  font-stretch: 104%;
  letter-spacing: -.02em;
}

.cert-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.cert-issuer { color: var(--muted); font-size: .875rem; }
.cert h3 { margin: 4px 0 8px; font-size: 1.0625rem; font-weight: 700; letter-spacing: -.012em; }
.cert--featured h3 { font-size: 1.4rem; font-stretch: 106%; letter-spacing: -.022em; }
.cert-date { color: var(--ink-2); font-size: .9375rem; font-variant-numeric: tabular-nums; }
.cert-id { margin-top: 2px; color: var(--muted); font-size: .8125rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.cert-actions { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: auto; padding-top: 14px; }
.cert-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
  border: 0;
  background: none;
  color: var(--accent);
  font-size: .9375rem;
  font-weight: 620;
  text-decoration: none;
  cursor: pointer;
}
.cert-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.cert-link .icon { width: 16px; height: 16px; }

@media (max-width: 1100px) {
  .cert-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .cert { grid-column: span 2; }
  .cert--featured { grid-column: span 6; }   /* después de .cert: misma especificidad, gana el orden */
}
@media (max-width: 760px) {
  .cert-grid { grid-template-columns: 1fr; }
  .cert, .cert--featured { grid-column: auto; flex-direction: row; align-items: flex-start; gap: 18px; padding: 18px; }
  .cert-plate, .cert--featured .cert-plate { width: 92px; height: 92px; border-radius: 18px; }
  .cert--featured h3 { font-size: 1.125rem; }
  .cert-wordmark { font-size: .95rem; }
}

/* Visor de diplomas */
.viewer {
  width: min(100% - 32px, 980px);
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  overflow: visible;
}
.viewer::backdrop {
  background: rgb(5 10 20 / .55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.viewer-panel {
  padding: 16px;
  border-radius: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-2);
}
.viewer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 2px 2px 12px 8px; }
.viewer-head h3 { font-size: 1.125rem; }
.viewer-img {
  width: 100%;
  height: auto;
  max-height: 72vh;
  object-fit: contain;
  border-radius: 16px;
  background: #fff;
}
.viewer-meta { margin: 12px 8px 4px; color: var(--muted); font-size: .9375rem; }

/* ==========================================================================
   STACK y FORMACIÓN: ficha técnica
   ========================================================================== */
.stack { padding-block: clamp(80px, 10vw, 136px) clamp(56px, 7vw, 96px); }
.stack-grid, .edu-grid {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 2fr);
  gap: 24px clamp(32px, 6vw, 96px);
  align-items: start;
}
.stack-head { position: sticky; top: calc(var(--nav-h) + 40px); }

.specs { margin: 0; }
.spec {
  display: grid;
  grid-template-columns: 13rem minmax(0, 1fr);
  gap: 8px 28px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.spec:last-child { border-bottom: 1px solid var(--line); }
.spec dt { font-weight: 700; }
.spec dd { margin: 0; }
.spec ul { margin: 0; padding: 0; list-style: none; columns: 2 11rem; column-gap: 28px; }
.spec li { padding: 3px 0; color: var(--ink-2); break-inside: avoid; }

.education { padding-block: clamp(56px, 7vw, 96px) clamp(80px, 10vw, 136px); }
.edu-list { margin: 0; padding: 0; list-style: none; }
.edu-list li {
  display: grid;
  grid-template-columns: 8rem minmax(0, 1fr);
  gap: 6px 28px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.edu-list li:last-child { border-bottom: 1px solid var(--line); }
.edu-years { color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.edu-list h3 { font-size: 1.125rem; font-weight: 700; }
.edu-list p { margin-top: 2px; color: var(--ink-2); }

@media (max-width: 860px) {
  .stack-grid, .edu-grid { grid-template-columns: 1fr; }
  .stack-head { position: static; }
  .spec { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .edu-list li { grid-template-columns: 1fr; }
}

/* ==========================================================================
   CONTACTO y PIE
   ========================================================================== */
.contact {
  position: relative;
  isolation: isolate;
  padding-block: clamp(96px, 12vw, 168px) clamp(240px, 24vw, 330px);
  overflow: clip;
  text-align: center;
}
/* Fondo de «Hablemos»: la malla de puntos de MotionSites, sin controles, que se funde con el pie */
.contact-media {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(60% 70% at 50% 110%, var(--stage-glow), transparent 70%),
    var(--bg-2);
  -webkit-mask-image: linear-gradient(to bottom, #000 84%, transparent);
  mask-image: linear-gradient(to bottom, #000 84%, transparent);
}
/* La cresta de la malla asoma en el margen inferior, por debajo de los enlaces */
.contact-video {
  position: absolute;
  left: 50%;
  top: calc(100% - 80px);
  width: max(118%, 1500px);
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transform: translate(-50%, -50%);
  opacity: 0;
  filter: var(--video-filter);
  mix-blend-mode: var(--video-blend);
  -webkit-mask-image: radial-gradient(58% 54% at 50% 50%, #000 42%, transparent 80%);
  mask-image: radial-gradient(58% 54% at 50% 50%, #000 42%, transparent 80%);
  transition: opacity 1.6s var(--ease-out);
}
.contact-video.is-ready { opacity: var(--video-opacity); }
@media (max-width: 760px) {
  .contact-video { top: calc(100% - 95px); width: 1100px; }
}
.contact-inner { display: flex; flex-direction: column; align-items: center; }
.contact-avatar img {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 6px var(--bg-2), 0 0 0 7px var(--line-strong), var(--shadow-2);
}
.contact .section-title {
  margin-top: 30px;
  font-size: clamp(2.8rem, 8vw, 5.6rem);
  letter-spacing: -.045em;
}
.contact-lead {
  max-width: 32ch;
  margin: 18px auto 34px;
  color: var(--ink-2);
  font-size: clamp(1.18rem, 1.8vw, 1.42rem);
  line-height: 1.45;
}
.contact-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.contact-links { display: flex; gap: 26px; justify-content: center; margin: 30px 0 0; padding: 0; list-style: none; }
.contact-links a { font-weight: 620; text-decoration: none; }
.contact-links a:hover { text-decoration: underline; text-underline-offset: 4px; }

.site-footer {
  padding: 30px 0 44px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .875rem;
}
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 40px; }
.site-footer a { color: inherit; text-underline-offset: 2px; }

/* Aviso breve (copiar enlace) */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 80;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: .9375rem;
  font-weight: 620;
  box-shadow: var(--shadow-2);
  opacity: 0;
  transform: translate(-50%, 18px) scale(.97);
  pointer-events: none;
  transition: opacity .22s ease, transform .5s var(--spring);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ==========================================================================
   Cambio de tema con View Transitions (revelado circular desde el botón)
   ========================================================================== */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

/* ==========================================================================
   Accesibilidad: movimiento, transparencia y contraste
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
  .js .cf-slide { will-change: auto; }
}

@media (prefers-reduced-transparency: reduce) {
  .nav-pill, .nav-links, .cf-caption, .hero-creds a {
    background: var(--surface);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

@media (prefers-contrast: more) {
  :root { --line: rgb(12 26 46 / .4); --line-strong: rgb(12 26 46 / .6); --muted: #3f4a5c; }
  :root[data-theme="dark"] { --line: rgb(234 240 248 / .4); --line-strong: rgb(234 240 248 / .6); --muted: #b7c2d3; }
  .nav-pill { background: var(--surface); border-color: var(--ink); }
}
