/* ══════════════════════════════════════════════════════════════════
   JAE-PORTFOLIO · terminal editorial
   ══════════════════════════════════════════════════════════════════ */

/* ── fuentes auto-alojadas · sin Google, sin round-trips externos ── */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url('assets/fonts/fraunces-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
                 U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
                 U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
                 U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url('assets/fonts/fraunces-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC,
                 U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
                 U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
                 U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('assets/fonts/jetbrains-mono-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
                 U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
                 U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
                 U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('assets/fonts/jetbrains-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC,
                 U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
                 U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
                 U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* palette · warm paper on deep black + amber phosphor */
  --bg:          #0a0a0b;
  --bg-2:        #111113;
  --bg-3:        #16161a;
  --ink:         #f3ebd8;
  --ink-dim:     #a59d89;
  --ink-mute:    #6a6356;
  --rule:        #26241d;
  --rule-soft:   #1a1915;
  --amber:       #ffb627;
  --amber-dim:   #c98a1a;
  --amber-soft:  rgba(255, 182, 39, 0.18);
  --ok:          #7fd37f;
  --danger:      #e5484d;

  /* type */
  --f-display: "Fraunces", "Iowan Old Style", "Apple Garamond", "Palatino",
               "Palatino Linotype", Georgia, serif;
  --f-mono:    "JetBrains Mono", ui-monospace, "SFMono-Regular",
               "SF Mono", Menlo, Consolas, monospace;
  --f-sans:    system-ui, sans-serif; /* DM Sans eliminada — no se usaba */

  /* rhythm */
  --page-max: 1320px;
  --pad: clamp(20px, 4vw, 64px);
  --gap: clamp(24px, 3vw, 48px);

  /* motion */
  --ease: cubic-bezier(.2, .7, .1, 1);
}

/* ── base ── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
img, svg { display: block; max-width: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-display);
  font-weight: 360;
  font-optical-sizing: auto;
  --fv-body:    "SOFT" 30, "opsz" 32;   /* cuerpo / texto corrido  */
  --fv-display: "SOFT" 50, "opsz" 96;   /* titulares / display     */
  font-variation-settings: var(--fv-body);
  font-size: clamp(16px, 1.05vw + 12px, 19px);
  line-height: 1.55;
  letter-spacing: 0.005em;
  font-feature-settings: "ss01", "ss02", "tnum" 0;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100svh;
  position: relative;
}

.mono {
  font-family: var(--f-mono);
  font-weight: 400;
  font-variation-settings: normal;
  letter-spacing: 0.01em;
  font-feature-settings: "tnum" 1, "zero" 1;
}

a { color: inherit; text-decoration: none; }
a:focus-visible {
  outline: 1px solid var(--amber);
  outline-offset: 3px;
}
em { font-style: italic; }

.ok     { color: var(--ok); }
.blink  { animation: blink 1.05s steps(1, end) infinite; color: var(--amber); }
@keyframes blink { 50% { opacity: 0; } }

/* ═══════════ fx overlays ═══════════ */

.fx-grain {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 9000;
  will-change: transform;
  transform: translateZ(0);
  opacity: .055;
  /* sin mix-blend-mode: overlay — impide promoción a capa GPU y fuerza blending
     por software en cada repaint; la diferencia visual a esta opacidad es nula */
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .7 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 200px 200px;
}

.fx-scanlines {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 9001;
  will-change: transform;
  transform: translateZ(0);
  opacity: .06;
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 0,
    rgba(255, 255, 255, 0) 2px,
    rgba(255, 255, 255, .5) 3px,
    rgba(255, 255, 255, 0) 4px
  );
}

.fx-vignette {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 9002;
  will-change: transform;
  transform: translateZ(0);
  background: radial-gradient(
    ellipse at 50% 45%,
    transparent 45%,
    rgba(0, 0, 0, .55) 110%
  );
}

/* engineering grid rails */
.grid-rails {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  max-width: var(--page-max);
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding-inline: var(--pad);
}
.grid-rails span {
  border-right: 1px solid var(--rule-soft);
}
.grid-rails span:last-child { border-right: none; }

/* ═══════════ status bar ═══════════ */

.statusbar {
  position: sticky; top: 0; z-index: 100;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 14px var(--pad);
  background: rgba(10, 10, 11, 0.96);
  border-bottom: 1px solid var(--rule);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-dim);
  /* sin backdrop-filter: blur — demasiado caro en scroll (repaint por frame) */
}
.statusbar__left  { display: flex; align-items: center; gap: 10px; }
.statusbar__center { justify-self: center; display: flex; gap: 10px; align-items: center; }
.statusbar__right { display: flex; gap: 22px; justify-content: flex-end; }

.statusbar__dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 10px rgba(127, 211, 127, .6), 0 0 0 2px rgba(127, 211, 127, .15);
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .55; transform: scale(.85); }
}

.statusbar__tag { color: var(--ink); letter-spacing: 0.2em; }
.statusbar__ver { color: var(--ink-mute); }
.statusbar__label { color: var(--ink-mute); }
.statusbar__uptime { color: var(--amber); font-variant-numeric: tabular-nums; }

.statusbar__link {
  position: relative;
  transition: color .25s var(--ease);
}
.statusbar__link:hover { color: var(--amber); }
.statusbar__link::before {
  content: "";
  position: absolute; left: 0; right: 100%;
  bottom: -4px; height: 1px;
  background: var(--amber);
  transition: right .35s var(--ease);
}
.statusbar__link:hover::before { right: 0; }

@media (max-width: 840px) {
  .statusbar { grid-template-columns: 1fr auto; font-size: 10px; gap: 10px; }
  .statusbar__right { display: none; }
}

/* ═══════════ hero ═══════════ */

.hero {
  position: relative;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: clamp(20px, 3vw, 48px) var(--pad) clamp(24px, 4vw, 48px);
  min-height: 88svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto 1fr auto;
  column-gap: var(--gap);
  row-gap: clamp(30px, 5vw, 60px);
  isolation: isolate;
}
.hero::before {
  /* big faint amber circle — "sun" / phosphor glow */
  content: "";
  position: absolute;
  top: -12vmax; right: -18vmax;
  width: 55vmax; height: 55vmax;
  background: radial-gradient(closest-side, var(--amber-soft), transparent 70%);
  filter: blur(12px);
  z-index: -1;
  pointer-events: none;
}

.hero__meta {
  max-width: 620px;
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 10px;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  padding: 0 2px 8px;
  margin-bottom: 6px;
  border-bottom: 1px dashed var(--rule);
}
.hero__coord, .hero__stamp { display: flex; gap: 12px; }
.hero__coord-label, .hero__stamp-label {
  color: var(--amber-dim);
}

.hero__body { grid-column: 1; align-self: center; }

.hero__kicker {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--ink-dim);
  margin: 0 0 24px;
  display: flex; align-items: center;
}
.hero__kicker .blink { color: var(--amber); font-size: 10px; }

.hero__name {
  font-family: var(--f-mono);
  font-weight: 700;
  font-variation-settings: normal;
  font-size: clamp(34px, 5.6vw, 86px);
  line-height: .98;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  margin: 0;
  max-width: 14ch;
  font-feature-settings: "ss01", "zero" 1;
}
.hero__first { display: block; color: var(--ink); }
.hero__last  { display: block; color: var(--ink); }
.hero__last::before { content: none; }
.hero__stop  { display: none; }

.hero__role {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: clamp(22px, 3vw, 36px) 0 clamp(30px, 4vw, 48px);
  font-size: clamp(16px, 1.3vw + 10px, 22px);
  font-weight: 400;
  color: var(--ink-dim);
  letter-spacing: 0.01em;
}
.hero__role span:not(.hero__sep) { color: var(--ink); }
.hero__sep { color: var(--amber); }

/* ── live terminal log streamer ── */
.hero__terminal {
  max-width: 620px;
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--rule);
  box-shadow:
    0 1px 0 rgba(255, 182, 39, .04) inset,
    0 20px 60px -30px rgba(0, 0, 0, .8);
  overflow: hidden;
  position: relative;
  isolation: isolate;
}
.hero__terminal::before {
  /* subtle phosphor glow behind everything */
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 10% 0%,
    rgba(255, 182, 39, .08), transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.hero__terminal-bar,
.hero__terminal-body,
.hero__terminal-foot {
  position: relative;
  z-index: 1;
}

.hero__terminal-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-3);
  border-bottom: 1px solid var(--rule);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-mute);
}
.hero__terminal-dots { display: inline-flex; gap: 6px; }
.hero__terminal-dots em {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #2a2823;
  box-shadow: 0 0 0 1px rgba(255,255,255,.04) inset;
}
.hero__terminal-dots em:nth-child(1) { background: #5c2a22; }
.hero__terminal-dots em:nth-child(2) { background: #5c4a1d; }
.hero__terminal-dots em:nth-child(3) { background: #2d5a2d; }
.hero__terminal-title {
  flex: 1;
  color: var(--ink-dim);
  text-transform: none;
  letter-spacing: 0.04em;
  font-size: 10.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hero__terminal-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ok);
  font-size: 9px;
  letter-spacing: 0.22em;
  flex-shrink: 0;
}
.hero__terminal-pulse {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 8px var(--ok);
  animation: pulse 2s var(--ease) infinite;
}

.hero__terminal-body {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 14px 16px;
  min-height: clamp(220px, 30vh, 300px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 5px;
  font-size: clamp(10.5px, .2vw + 10px, 12.5px);
  line-height: 1.5;
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0 22px,
      rgba(255, 182, 39, .015) 22px 23px
    );
}

.log {
  display: flex;
  gap: 10px;
  white-space: nowrap;
  overflow: hidden;
  animation: logIn .75s cubic-bezier(.16, 1, .3, 1) both;
  transition: transform .3s cubic-bezier(.16, 1, .3, 1);
}
.log__ts  { color: var(--ink-mute); flex-shrink: 0; }
.log__lvl {
  flex-shrink: 0;
  font-weight: 700;
  padding: 0 5px;
  letter-spacing: 0.04em;
  min-width: 3ch;
  text-align: center;
}
.log__lvl--ok  { color: #7fd37f; background: rgba(127, 211, 127, .08); }
.log__lvl--inf { color: #ffb627; background: rgba(255, 182, 39, .08); }
.log__lvl--wrn { color: #ffa94d; background: rgba(255, 169, 77, .1); }
.log__lvl--err { color: #e5484d; background: rgba(229, 72, 77, .1); }
.log__tag { color: var(--amber-dim); flex-shrink: 0; }
.log__msg {
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
}
.log__msg em {
  color: var(--amber);
  font-style: normal;
  font-weight: 500;
}

.hero__terminal-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-top: 1px solid var(--rule);
  background: rgba(0, 0, 0, .25);
  font-size: clamp(11px, .2vw + 10px, 13px);
}
.hero__terminal-prompt { display: inline-flex; gap: 0; }
.hero__prompt-sym  { color: var(--danger); font-weight: 700; }
.hero__prompt-at   { color: var(--ink-mute); }
.hero__prompt-host { color: var(--ok); }
.hero__prompt-sep  { color: var(--ink-mute); }
.hero__prompt-path { color: var(--amber); }
.hero__prompt-hash { color: var(--ink); font-weight: 700; margin-left: 2px; }
.hero__terminal-cmd {
  color: var(--ink);
  letter-spacing: 0.02em;
}
.hero__terminal-cursor {
  color: var(--amber);
  font-size: .9em;
}

@keyframes logIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── cat jae_perfil.txt · JSON output ──────────────────────── */
.log.jl {
  display: block;
  white-space: pre;
  animation: none;   /* sin slide-in: el efecto es el tipeo carácter a carácter */
  opacity: 1;
}
.jl__key   { color: var(--amber); }
.jl__val   { color: #7fd37f; }
.jl__pun   { color: var(--ink-mute); }
.jl__caret {
  color: var(--amber);
  animation: blink .7s step-start infinite;
  font-size: .9em;
}
@keyframes logOut {
  from { opacity: .5; transform: none; max-height: 28px; }
  to   { opacity: 0; transform: translateY(-6px); max-height: 0; margin: 0; padding: 0; }
}

.hero__actions {
  margin-top: clamp(30px, 4vw, 48px);
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: all .3s var(--ease);
}
.btn svg { transition: transform .35s var(--ease); }
.btn:hover svg { transform: translateX(4px); }

.btn--primary {
  background: var(--amber);
  color: #141005;
  border-color: var(--amber);
}
.btn--primary:hover {
  background: var(--ink);
  border-color: var(--ink);
}

.btn--ghost:hover {
  border-color: var(--amber);
  color: var(--amber);
}

/* right column wrapper — dossier photo + vitals stack */
.hero__right {
  grid-column: 2;
  align-self: center;
  display: grid;
  gap: 18px;
  width: clamp(235px, 24vw, 353px);
}

/* ── dossier photo card ── */
.dossier {
  position: relative;
  margin: 0;
  padding: 0;
  border: 1px solid var(--rule);
  background: var(--bg-2);
}
.dossier__header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--rule);
  background: var(--bg-3);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--ink-mute);
}
.dossier__id {
  color: var(--amber);
  letter-spacing: 0.18em;
  margin-left: auto;
}
.dossier__cam {
  display: flex;
  align-items: center;
  color: var(--amber);
  opacity: .75;
  flex-shrink: 0;
}

.dossier__frame {
  position: relative;
  aspect-ratio: 5 / 4.8;
  overflow: hidden;
  background: #0d0c09;
  isolation: isolate;
}
.dossier__img,
.dossier__placeholder {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter:
    grayscale(1)
    contrast(1.12)
    brightness(.88)
    sepia(.38)
    hue-rotate(-8deg)
    blur(14px);
  transform: scale(1.06);
  transition:
    filter  .8s cubic-bezier(.16,1,.3,1),
    transform .9s cubic-bezier(.16,1,.3,1);
}

@media (hover: hover) and (pointer: fine) {
  .dossier:hover .dossier__img,
  .dossier:hover .dossier__placeholder {
    filter:
      grayscale(1)
      contrast(1.2)
      brightness(1)
      sepia(.5)
      hue-rotate(-6deg)
      blur(0px);
    transform: scale(1.015);
  }
}

@media (hover: none) {
  .dossier__img,
  .dossier__placeholder {
    filter:
      grayscale(1)
      contrast(1.12)
      brightness(.92)
      sepia(.38)
      hue-rotate(-8deg);
    transform: none;
  }
}

/* ── overlay ACCESO RESTRINGIDO ── */
.dossier__restricted {
  position: absolute; inset: 0;
  z-index: 7;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(135deg,
      rgba(80, 45, 4, .78) 0%,
      rgba(30, 16, 2, .88) 100%);
  transition: opacity .7s cubic-bezier(.16,1,.3,1);
  pointer-events: none;
}
@media (hover: hover) and (pointer: fine) {
  .dossier:hover .dossier__restricted { opacity: 0; }
}
@media (hover: none) {
  .dossier__restricted { display: none; }
}

.dossier__restricted-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.dossier__lock {
  width: 28px; height: 28px;
  color: var(--amber);
  opacity: .9;
  margin-bottom: 4px;
  filter: drop-shadow(0 0 8px rgba(255,182,39,.55));
}

.dossier__restricted-label {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.28em;
  color: var(--amber);
  text-transform: uppercase;
  line-height: 1;
  text-shadow: 0 0 14px rgba(255,182,39,.55);
}
.dossier__restricted-label--sub {
  font-size: 10px;
  letter-spacing: 0.22em;
  color: rgba(255, 182, 39, .65);
}
.dossier__restricted-hint {
  font-family: var(--f-mono);
  font-size: 8.5px;
  letter-spacing: 0.14em;
  color: rgba(255,255,255,.28);
  margin-top: 8px;
  text-transform: lowercase;
}

/* ── HUD táctico: coordenadas · ubicación · hora ── */
.dossier__hud {
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 6;
  font-family: var(--f-mono);
  font-size: 8px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: .22;
  transition: opacity .6s cubic-bezier(.16,1,.3,1) .1s;
}
@media (hover: hover) and (pointer: fine) {
  .dossier:hover .dossier__hud { opacity: .85; }
}
@media (hover: none) {
  .dossier__hud { opacity: .55; }
}

.dossier__hud-tl,
.dossier__hud-bl,
.dossier__hud-br {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 3px;
  line-height: 1.3;
}

/* esquina superior izquierda: coordenadas GPS */
.dossier__hud-tl {
  top: 10px; left: 10px;
}

/* esquina inferior izquierda: ubicación */
.dossier__hud-bl {
  bottom: 10px; left: 10px;
}

/* esquina inferior derecha: reloj */
.dossier__hud-br {
  bottom: 10px; right: 10px;
  align-items: flex-end;
}

.dossier__hud-lbl {
  color: rgba(255,182,39,.55);
  font-size: 7px;
  letter-spacing: 0.18em;
}
.dossier__hud-val {
  color: var(--amber);
  font-size: 8.5px;
}
.dossier__hud-loc {
  color: var(--amber);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2em;
}
.dossier__hud-subloc {
  color: rgba(255,182,39,.5);
  font-size: 7px;
  letter-spacing: 0.16em;
}
.dossier__hud-time {
  color: var(--amber);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
}

/* amber duotone wash */
.dossier__frame::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(
    180deg,
    rgba(255, 182, 39, 0.22) 0%,
    rgba(255, 182, 39, 0.08) 50%,
    rgba(255, 182, 39, 0.20) 100%
  );
  mix-blend-mode: color;
  pointer-events: none;
  z-index: 2;
}
/* dark vignette inside frame */
.dossier__frame::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center,
    transparent 40%,
    rgba(0, 0, 0, .55) 100%);
  pointer-events: none;
  z-index: 3;
}

/* indicador REC */
.dossier__rec {
  position: absolute;
  top: 10px; right: 11px;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: rgba(255,255,255,.45);
  pointer-events: none;
}
.dossier__rec-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #e5484d;
  flex-shrink: 0;
  animation: rec-pulse 1.9s step-start infinite;
}
@keyframes rec-pulse {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* barcode decorativa */
.dossier__barcode {
  height: 18px;
  border-top: 1px solid var(--rule);
  background-image: repeating-linear-gradient(
    90deg,
    var(--amber) 0,
    var(--amber) 1px,
    transparent 1px,
    transparent 3px,
    var(--amber) 3px,
    var(--amber) 4px,
    transparent 4px,
    transparent 7px,
    var(--amber) 7px,
    var(--amber) 9px,
    transparent 9px,
    transparent 11px,
    var(--amber) 11px,
    var(--amber) 12px,
    transparent 12px,
    transparent 15px,
    var(--amber) 15px,
    var(--amber) 16px,
    transparent 16px,
    transparent 20px
  );
  opacity: .18;
}

.dossier__scan {
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0,
    rgba(0, 0, 0, 0) 2px,
    rgba(0, 0, 0, .35) 3px,
    rgba(0, 0, 0, 0) 4px
  );
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 4;
}
.dossier__glow {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 50% 15%,
      rgba(255, 182, 39, 0.18),
      transparent 55%);
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 5;
}

.dossier__meta {
  margin: 0;
  display: grid;
  gap: 7px;
  padding: 12px 16px;
  border-top: 1px solid var(--rule);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}
.dossier__meta > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.dossier__meta dt { margin: 0; color: var(--ink-mute); }
.dossier__meta dd { margin: 0; color: var(--ink); }
.dossier__meta .ok { color: var(--ok); }

.hero__side {
  display: grid;
  gap: 10px;
  padding: 22px 20px;
  border: 1px solid var(--rule);
  background: linear-gradient(180deg, rgba(255,182,39,.025), transparent);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  position: relative;
}
.hero__side::before {
  content: "// vitals";
  position: absolute; top: -8px; left: 14px;
  background: var(--bg);
  padding: 0 8px;
  color: var(--amber-dim);
  font-size: 10px;
}
.hero__side-row {
  display: flex; justify-content: space-between; gap: 14px;
  color: var(--ink-mute);
}
.hero__side-row span:last-child { color: var(--ink); }
.hero__ok { color: var(--ok) !important; }


@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .hero__right { grid-column: 1; width: 100%; max-width: 320px; }
  .hero__meta { flex-direction: column; gap: 6px; }
}

/* ═══════════ sections ═══════════ */

.section {
  position: relative;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: clamp(48px, 6vw, 80px) var(--pad);
}
.section + .section { border-top: 1px solid var(--rule); }

.section__head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: clamp(12px, 2vw, 24px);
  margin-bottom: clamp(40px, 5vw, 72px);
}
.section__num {
  font-size: 11px;
  color: var(--amber);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  white-space: nowrap;
}
.section__title {
  font-family: var(--f-mono);
  font-weight: 700;
  font-size: clamp(30px, 4.4vw, 62px);
  line-height: 1;
  margin: 0;
  letter-spacing: -0.025em;
  text-transform: uppercase;
  color: var(--ink);
  font-feature-settings: "ss01", "zero" 1;
}
.section__line {
  flex: 1;
  height: 1px;
  background:
    repeating-linear-gradient(to right, var(--rule) 0 6px, transparent 6px 10px);
  align-self: center;
}
.section__tag {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--bg);
  background: var(--amber);
  padding: 4px 9px;
  align-self: center;
  white-space: nowrap;
}

/* ═══════════ whoami ═══════════ */

.whoami {
  padding-top: clamp(24px, 3vw, 40px) !important;
}

.whoami__head {
  position: relative;
  border: 1px solid var(--rule);
  margin-bottom: clamp(40px, 5vw, 72px);
  overflow: hidden;
}
.whoami__head::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px;
  height: 100%;
  background: var(--amber);
}
.whoami__head-bar {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
  padding: 7px 16px 7px 20px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--rule);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.whoami__head-status {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ok);
}
.whoami__head-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ok);
  animation: whoami-pulse 2.4s ease infinite;
}
@keyframes whoami-pulse {
  0%, 100% { opacity: 1;   transform: scale(1); }
  50%       { opacity: 0.2; transform: scale(.7); }
}
.whoami__head-id { color: var(--amber); }
.whoami__head-ts { margin-left: auto; color: var(--ink-mute); }

.whoami__head-main {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: clamp(12px, 2vw, 24px);
  padding: clamp(18px, 2.4vw, 30px) 20px;
}
.whoami__title {
  font-family: var(--f-mono);
  font-weight: 700;
  font-size: clamp(30px, 4.4vw, 62px);
  line-height: 1;
  margin: 0;
  letter-spacing: -0.025em;
  text-transform: uppercase;
  color: var(--ink);
  font-feature-settings: "ss01", "zero" 1;
  position: relative;
}
.whoami__title::before,
.whoami__title::after {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  clip-path: inset(0 0 100% 0);
  pointer-events: none;
  white-space: nowrap;
}
.whoami__title::before {
  color: var(--amber);
  animation: glitch-a 7s steps(1) infinite;
}
.whoami__title::after {
  color: var(--danger);
  animation: glitch-b 7s steps(1) infinite;
  animation-delay: 0.08s;
}
@keyframes glitch-a {
  0%, 88%, 100% { clip-path: inset(0 0 100% 0); transform: none; }
  90%  { clip-path: inset(5%  0 65% 0); transform: translateX(-4px); }
  92%  { clip-path: inset(30% 0 40% 0); transform: translateX( 3px); }
  94%  { clip-path: inset(0 0 100% 0);  transform: none; }
}
@keyframes glitch-b {
  0%, 88%, 100% { clip-path: inset(100% 0 0 0); transform: none; }
  91%  { clip-path: inset(55% 0 10% 0); transform: translateX( 4px); }
  93%  { clip-path: inset(70% 0  5% 0); transform: translateX(-3px); }
  95%  { clip-path: inset(100% 0 0 0);  transform: none; }
}

.whoami__head-meta {
  display: flex;
  gap: clamp(16px, 3vw, 40px);
  flex-wrap: wrap;
  padding: 7px 16px 7px 20px;
  border-top: 1px solid var(--rule);
  font-size: 10px;
  color: var(--ink-mute);
  letter-spacing: 0.12em;
  background: var(--bg-2);
}

.whoami__grid {
  display: grid;
  grid-template-columns: minmax(260px, 340px) 1fr;
  gap: clamp(30px, 5vw, 80px);
  align-items: start;
}
@media (max-width: 860px) {
  .whoami__grid { grid-template-columns: 1fr; }
}

.whoami__card {
  position: relative;
  padding: 32px 28px;
  border: 1px solid var(--rule);
  background: var(--bg-2);
}

/* corner brackets */
.card__corner {
  position: absolute; width: 12px; height: 12px;
  border: 1px solid var(--amber);
}
.card__corner--tl { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.card__corner--tr { top: -1px; right: -1px; border-left: none; border-bottom: none; }
.card__corner--bl { bottom: -1px; left: -1px; border-right: none; border-top: none; }
.card__corner--br { bottom: -1px; right: -1px; border-left: none; border-top: none; }

.whoami__dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px 20px;
  margin: 0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.whoami__dl dt { color: var(--ink-mute); }
.whoami__dl dd { margin: 0; color: var(--ink); }
.whoami__badge { color: var(--accent); font-size: 10px; opacity: .8; }

.whoami__copy {
  max-width: 68ch;
  font-family: var(--f-mono);
  font-variation-settings: normal;
}
.whoami__copy p + p { margin-top: 1.25em; }
/* root terminal session header */
.whoami__cmd {
  font-family: var(--f-mono);
  font-size: clamp(12px, .35vw + 11px, 14px);
  margin: 0 0 10px;
  padding: 12px 16px;
  background: var(--bg-2);
  border: 1px solid var(--rule);
  border-left: 2px solid var(--danger);
  letter-spacing: 0.015em;
  line-height: 1.6;
  position: relative;
}
.whoami__cmd::before {
  content: "● ● ●";
  position: absolute;
  top: -8px;
  right: 12px;
  background: var(--bg);
  padding: 0 8px;
  color: var(--ink-mute);
  font-size: 9px;
  letter-spacing: 2px;
}
.whoami__cmd-user  { color: var(--danger); font-weight: 700; }
.whoami__cmd-at    { color: var(--ink-mute); }
.whoami__cmd-host  { color: var(--ok); font-weight: 500; }
.whoami__cmd-sep   { color: var(--ink-mute); }
.whoami__cmd-path  { color: var(--amber); }
.whoami__cmd-hash  { color: var(--ink); font-weight: 700; padding-left: 2px; }
.whoami__cmd-exec  { color: var(--ink); font-weight: 500; }
.whoami__cmd-flag  { color: var(--ink-dim); }

.whoami__out {
  font-family: var(--f-mono);
  font-size: 11px;
  margin: 0 0 22px;
  padding: 0 16px;
  color: var(--ink-mute);
  letter-spacing: 0.02em;
  line-height: 1.8;
  text-transform: lowercase;
}
.whoami__out-lbl { color: var(--ok); font-weight: 700; margin-right: 4px; }
.whoami__out-uid { color: var(--danger); font-weight: 500; }

.whoami__copy .lede {
  font-family: var(--f-mono);
  font-size: clamp(16px, 1vw + 10px, 22px);
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: -0.005em;
  color: var(--ink);
  margin: 0 0 1.4em;
}
.whoami__copy .lede em { color: var(--amber); font-style: normal; font-weight: 700; }
.whoami__copy p {
  color: var(--ink-dim);
  font-size: clamp(13px, .35vw + 12px, 15px);
  line-height: 1.72;
  font-weight: 400;
}
.whoami__copy p .mono { color: var(--ink); }
.whoami__sign {
  margin-top: 1.4em;
  font-size: 12px;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.2em;
}
.whoami__sign span { color: var(--ink); }

/* ═══════════ case study ═══════════ */

.case__links {
  display: flex;
  gap: 12px;
  margin-left: auto;
  align-items: center;
}
.case__link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
  text-decoration: none;
  padding: 5px 12px;
  border: 1px solid var(--rule);
  transition: color .2s, border-color .2s;
}
.case__link:hover { color: var(--ink); border-color: var(--ink-mute); }
.case__link--demo { color: var(--amber); border-color: var(--amber); opacity: .85; }
.case__link--demo:hover { opacity: 1; color: var(--amber); border-color: var(--amber); }
.case__link-dot { font-size: 8px; }

.case__lede {
  font-family: var(--f-mono);
  font-size: clamp(15px, 1vw + 10px, 20px);
  font-weight: 500;
  line-height: 1.65;
  letter-spacing: 0.01em;
  max-width: 64ch;
  margin: 0 0 clamp(20px, 2.5vw, 32px);
  color: var(--ink);
}
.case__lede--body {
  font-size: clamp(13px, 0.8vw + 9px, 15px);
  font-weight: 400;
  color: var(--ink-mute);
  margin: 0 0 clamp(12px, 1.5vw, 20px);
}
.case__lede--body:last-of-type {
  margin-bottom: 16px;
}
.case__footer {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-top: 14px;
  border-top: 1px dashed var(--rule);
  margin-bottom: clamp(40px, 5vw, 68px);
}
.case__footer-label {
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.14em;
}
.case__footer-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--amber);
  text-decoration: none;
  letter-spacing: 0.06em;
  transition: opacity .2s;
}
.case__footer-link:hover { opacity: .7; }

/* metrics strip */
.metrics {
  list-style: none;
  margin: 0 0 clamp(40px, 5vw, 72px);
  padding: 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.metrics__item {
  padding: 24px 18px;
  border-right: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.metrics__item:last-child { border-right: none; }
.metrics__num {
  font-family: var(--f-display);
  font-variation-settings: var(--fv-display);
  font-size: clamp(34px, 3.6vw + 8px, 62px);
  font-weight: 360;
  letter-spacing: -0.03em;
  color: var(--amber);
  line-height: 1;
  font-feature-settings: "tnum" 1;
}
.metrics__num em {
  font-size: .5em;
  color: var(--ink-dim);
  font-style: normal;
  font-variation-settings: normal;
  vertical-align: top;
  margin-left: 2px;
}
.metrics__lbl {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-mute);
}
@media (max-width: 960px) {
  .metrics { grid-template-columns: repeat(3, 1fr); }
  .metrics__item:nth-child(3n) { border-right: none; }
  .metrics__item:nth-child(n+4) { border-top: 1px solid var(--rule); }
}
@media (max-width: 520px) {
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metrics__item { border-right: 1px solid var(--rule); }
  .metrics__item:nth-child(2n) { border-right: none; }
  .metrics__item:nth-child(n+3) { border-top: 1px solid var(--rule); }
}

/* ascii architecture */
.arch {
  margin: 0 0 clamp(44px, 6vw, 80px);
  border: 1px solid var(--rule);
  background: var(--bg-2);
  overflow: hidden;
}
.arch__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px 0 0;
  font-size: 11px;
  color: var(--ink-mute);
  background: var(--bg-3);
  border-bottom: 1px solid var(--rule);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}
.arch__tabs {
  display: flex;
  gap: 0;
}
.arch__tab {
  all: unset;
  cursor: pointer;
  padding: 12px 18px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
  border-right: 1px solid var(--rule);
  transition: color .2s, background .2s;
}
.arch__tab:hover { color: var(--ink); background: var(--bg-2); }
.arch__tab.is-active {
  color: var(--amber);
  background: var(--bg-2);
  border-bottom: 2px solid var(--amber);
  margin-bottom: -1px;
}
.arch__file { color: var(--amber); font-size: 10px; }
.arch__panel {
  display: none;
  margin: 0;
  padding: 28px clamp(14px, 3vw, 36px);
  font-size: clamp(10px, .8vw + 3px, 13.5px);
  line-height: 1.45;
  color: var(--ink);
  white-space: pre;
  overflow-x: auto;
  tab-size: 2;
}
.arch__panel.is-active { display: block; }
/* alias para no romper código anterior */
.arch__ascii { display: none; }
/* documentación de diagramas de arquitectura */
.arch__doc {
  display: none;
  margin-top: 12px;
  padding: 8px 14px;
  font-size: 11px;
  color: var(--ink-mute);
  border: 1px solid rgba(255, 182, 39, .2);
  border-radius: 2px;
  transition: color .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease);
}
.arch__doc:hover {
  color: var(--amber);
  border-color: rgba(255, 182, 39, .5);
  background: rgba(255, 182, 39, .05);
}

/* feature cards */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  margin-bottom: clamp(44px, 6vw, 80px);
}
.feat {
  background: var(--bg);
  padding: clamp(22px, 2.4vw, 34px);
  position: relative;
  transition: background .3s var(--ease);
}
.feat:hover { background: var(--bg-2); }
.feat:hover .feat__idx { color: var(--amber); }

.feat__idx {
  font-size: 10px;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  transition: color .3s var(--ease);
}
.feat__title {
  font-family: var(--f-display);
  font-variation-settings: var(--fv-display);
  font-size: clamp(20px, 1.2vw + 12px, 26px);
  font-weight: 380;
  letter-spacing: -0.01em;
  margin: 12px 0 14px;
  line-height: 1.2;
  color: var(--ink);
}
.feat__body {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-dim);
  max-width: 52ch;
}
.feat__body .mono { color: var(--ink); font-size: 13px; }
.feat__code {
  margin: 12px 0 0;
  font-size: 11px;
  color: var(--amber);
  text-transform: none;
  letter-spacing: 0.04em;
}
.feat__doc {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 16px;
  padding: 7px 14px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber);
  text-decoration: none;
  border: 1px solid var(--amber);
  background: transparent;
  transition: background .2s, color .2s;
}
.feat__doc:hover {
  background: var(--amber);
  color: var(--bg);
}

/* stack strip */
.stack {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 14px;
  align-items: center;
  padding-top: clamp(24px, 3vw, 40px);
  margin-bottom: clamp(40px, 6vw, 72px);
  border-top: 1px dashed var(--rule);
}
.stack__label {
  font-size: 11px;
  color: var(--amber-dim);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-right: 8px;
}
.stack__list {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 8px;
  font-size: 11px;
}
.stack__list li {
  padding: 6px 11px;
  border: 1px solid var(--rule);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-dim);
  transition: all .25s var(--ease);
}
.stack__list li:hover {
  color: var(--amber);
  border-color: var(--amber);
}

/* ═══════════ write-ups ═══════════ */

.wu__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.wu {
  background: var(--bg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: background .2s;
}
.wu:hover { background: var(--bg-2); }
.wu__head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.wu__platform {
  color: var(--amber);
  border: 1px solid var(--amber);
  padding: 2px 6px;
}
.wu__diff { font-size: 10px; }
.wu__diff--easy   { color: #4caf84; }
.wu__diff--medium { color: #e09c3a; }
.wu__diff--hard   { color: #e05252; }
.wu__os { color: var(--ink-mute); margin-left: auto; }
.wu__name {
  font-family: var(--f-display);
  font-size: clamp(18px, 1.4vw + 8px, 22px);
  font-weight: 500;
  color: var(--ink);
  margin: 0;
}
.wu__tags {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
}
.wu__tags li {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--ink-mute);
  background: var(--bg-3);
  padding: 3px 8px;
}
.wu__link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  text-decoration: none;
  margin-top: auto;
  transition: color .2s;
}
.wu__link:hover { color: var(--amber); }

/* ═══════════ projects (otros) ═══════════ */

.projects__list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ── tarjeta base ── */
.proj {
  position: relative;
  border: 1px solid var(--rule);
  background: var(--bg-2);
  overflow: hidden;
  transition: border-color .45s var(--ease);
}

/* acento izquierdo ámbar — crece desde el centro en hover */
.proj::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    var(--amber) 35%,
    var(--amber) 65%,
    transparent 100%
  );
  transform: scaleY(0);
  transform-origin: center;
  transition: transform .5s var(--ease);
  z-index: 2;
  pointer-events: none;
}
.proj:hover { border-color: rgba(255,182,39,.28); }
.proj:hover::before { transform: scaleY(1); }

/* ── layout dos columnas: brief | evidencia ── */
.proj--wide {
  display: grid;
  grid-template-columns: 1fr clamp(320px, 46%, 560px);
  min-height: 260px;
}

/* ── columna izquierda (brief) ── */
.proj__content {
  position: relative;
  padding: clamp(32px, 3.5vw, 52px);
  border-right: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* número fantasma de fondo — data-idx="a" / "b" */
.proj__content::before {
  content: attr(data-idx);
  position: absolute;
  right: -0.1em;
  bottom: -0.15em;
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(120px, 18vw, 220px);
  line-height: 1;
  color: var(--rule-soft);
  pointer-events: none;
  user-select: none;
  transition: color .5s var(--ease);
}
.proj:hover .proj__content::before {
  color: rgba(255, 182, 39, 0.045);
}

.proj__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--ink-mute);
  margin-bottom: 0;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule-soft);
}
.proj__idx {
  color: var(--amber);
  font-size: 11px;
  letter-spacing: 0.3em;
}
.proj__status { color: var(--ok); }

.proj__btns {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 4;
  display: flex;
  gap: 6px;
}
.proj__repo-btn {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--amber);
  border: 1px solid var(--amber-dim);
  background: var(--bg-2);
  padding: 6px 12px;
  white-space: nowrap;
  transition: background .2s var(--ease), border-color .2s var(--ease);
}
.proj__repo-btn:hover {
  background: var(--amber-soft);
  border-color: var(--amber);
}

.proj__title {
  font-family: var(--f-display);
  font-variation-settings: var(--fv-display);
  font-size: clamp(34px, 2.8vw + 14px, 52px);
  font-weight: 340;
  font-style: italic;
  letter-spacing: -0.025em;
  line-height: 1;
  margin: 22px 0 6px;
}
.proj__tag {
  font-family: var(--f-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--amber);
  margin: 0 0 20px;
  text-transform: lowercase;
  letter-spacing: 0.06em;
}
.proj__lede {
  font-size: clamp(14px, 0.9vw + 10px, 16px);
  color: var(--ink-dim);
  line-height: 1.72;
  margin: 0 0 26px;
  max-width: 52ch;
}

/* feature rows — estilo tabla con separadores */
.proj__feats {
  list-style: none;
  margin: 0 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--rule-soft);
}
.proj__feats li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 13px;
  color: var(--ink-dim);
  padding: 9px 0;
  border-bottom: 1px solid var(--rule-soft);
  transition: color .2s var(--ease), padding-left .25s var(--ease);
}
.proj__feats li:hover {
  color: var(--ink);
  padding-left: 4px;
}
.proj__feats li:hover .proj__arr { color: var(--amber); }
.proj__arr {
  color: var(--amber-dim);
  user-select: none;
  flex-shrink: 0;
  transition: color .2s var(--ease);
}

/* enlace github — debajo del stack */
.proj__links {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--rule-soft);
}

/* stack — anclado al fondo de la columna */
.proj__stack {
  list-style: none;
  margin: auto 0 0;
  padding: 20px 0 0;
  display: flex; flex-wrap: wrap; gap: 6px;
  font-size: 11px;
}
.proj__stack li {
  padding: 5px 10px;
  border: 1px solid var(--rule);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink);
  transition: border-color .2s, color .2s;
}
.proj__stack li:hover {
  border-color: var(--amber-dim);
  color: var(--ink-dim);
}

/* ── columna derecha (evidencia / demo) ── */
.proj__demo {
  margin: 0;
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}
.proj__demo-frame {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  position: relative;
  transition: box-shadow .45s var(--ease);
}
.proj:hover .proj__demo-frame {
  box-shadow: inset 0 0 60px rgba(255, 182, 39, .04);
}

/* marcas de registro en las esquinas del frame */
.proj__demo-frame::before,
.proj__demo-frame::after {
  content: "";
  position: absolute;
  width: 14px; height: 14px;
  border-color: var(--amber-dim);
  border-style: solid;
  opacity: 0;
  transition: opacity .45s var(--ease);
  z-index: 3;
  pointer-events: none;
}
.proj__demo-frame::before {
  top: 10px; left: 10px;
  border-width: 1px 0 0 1px;
}
.proj__demo-frame::after {
  bottom: 10px; right: 10px;
  border-width: 0 1px 1px 0;
}
.proj:hover .proj__demo-frame::before,
.proj:hover .proj__demo-frame::after {
  opacity: 1;
}

/* barra de título del terminal */
.proj__demo-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--rule);
  background: var(--bg-2);
  flex-shrink: 0;
}
.proj__demo-dot {
  display: inline-block;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--c);
  opacity: .45;
  transition: opacity .35s var(--ease);
}
.proj:hover .proj__demo-dot { opacity: .85; }
.proj__demo-title {
  margin-left: 6px;
  flex: 1;
  font-family: var(--f-display);
  font-style: normal;
  font-weight: 400;
  font-size: 12px;
  color: var(--ink-mute);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: 0;
}

/* pantalla — se ajusta a la imagen */
.proj__demo-screen {
  display: block;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}
/* scanlines sobre el placeholder */
.proj__demo-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px, transparent 3px,
    rgba(255,255,255,.01) 3px, rgba(255,255,255,.01) 4px
  );
  pointer-events: none;
  z-index: 1;
}
.proj__demo-screen img {
  width: 100%;
  height: auto;
  display: block;
  cursor: zoom-in;
}

/* ── pantalla con iframe (video LinkedIn, etc.) ── */
.proj__demo-screen--video {
  aspect-ratio: 504 / 399;
  padding: 0;
}
.proj__demo-screen--video iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: none;
}

/* ── carrusel de paneles ── */
.proj__carousel {
  position: relative;
  overflow: hidden;
  width: 100%;
}
.proj__carousel-track {
  display: flex;
  transition: transform .42s cubic-bezier(.4, 0, .2, 1);
  will-change: transform;
}
.proj__carousel-track img {
  flex: 0 0 100%;
  width: 100%;
  height: auto;
  display: block;
  cursor: zoom-in;
}
.proj__carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(10, 10, 10, .55);
  border: 1px solid rgba(255, 182, 39, .15);
  color: var(--ink-mute);
  font-family: var(--f-mono);
  font-size: 20px;
  line-height: 1;
  width: 26px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity .2s var(--ease), color .2s var(--ease),
              border-color .2s var(--ease), background .2s var(--ease);
  z-index: 2;
  padding: 0;
}
.proj__carousel:hover .proj__carousel-btn { opacity: .45; }
.proj__carousel-btn:hover {
  opacity: 1 !important;
  color: var(--amber);
  border-color: rgba(255, 182, 39, .6);
  background: rgba(10, 10, 10, .9);
  box-shadow: 0 0 12px rgba(255, 182, 39, .15);
}
.proj__carousel-btn--prev { left: 6px; }
.proj__carousel-btn--next { right: 6px; }
/* más visibles en reposo cuando se hace hover al carrusel */
.proj__carousel:hover .proj__carousel-btn { opacity: .7; }

.proj__carousel-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 2;
  padding: 5px 10px;
  background: rgba(10,10,10,.4);
  border-radius: 20px;
}
.proj__carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink-mute);
  opacity: .45;
  transition: opacity .2s, background .2s, transform .2s;
  cursor: pointer;
}
.proj__carousel-dot.is-active {
  background: var(--amber);
  opacity: 1;
  transform: scale(1.25);
}

/* ── contenedor imagen + flechas del lightbox ── */
.lightbox__content {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 100%;
  max-height: 100%;
}

/* ── flechas de navegación dentro del lightbox ── */
.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(10, 10, 10, .65);
  border: 1px solid rgba(255, 182, 39, .25);
  color: var(--ink-mute);
  font-family: var(--f-mono);
  font-size: 28px;
  line-height: 1;
  width: 38px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color .2s var(--ease), border-color .2s var(--ease),
              background .2s var(--ease), opacity .2s var(--ease);
  z-index: 9001;
  padding: 0;
  opacity: .6;
}
.lightbox__nav:hover {
  color: var(--amber);
  border-color: rgba(255, 182, 39, .6);
  background: rgba(10, 10, 10, .92);
  opacity: 1;
  box-shadow: 0 0 16px rgba(255, 182, 39, .15);
}
.lightbox__nav--prev { left: -38px; }
.lightbox__nav--next { right: -38px; }
.lightbox__nav.is-hidden { opacity: 0; pointer-events: none; }

/* ── lightbox ── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(10, 10, 10, .92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s var(--ease);
}
.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}
.lightbox__img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  border: 1px solid var(--rule);
  box-shadow: 0 0 80px rgba(255, 182, 39, .08);
  cursor: zoom-out;
}
.lightbox__close {
  position: absolute;
  top: 20px;
  right: 24px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .2em;
  color: var(--ink-mute);
  background: none;
  border: none;
  cursor: pointer;
  text-transform: uppercase;
  padding: 6px 10px;
  transition: color .2s var(--ease);
}
.lightbox__close:hover { color: var(--amber); }
.proj__demo-ph {
  font-size: 11px;
  color: var(--ink-mute);
  opacity: .35;
  letter-spacing: 0.1em;
  z-index: 2;
}

/* pie del frame */
.proj__demo-cap {
  padding: 8px 14px;
  font-family: var(--f-display);
  font-style: normal;
  font-weight: 400;
  font-size: 12px;
  color: var(--ink-mute);
  letter-spacing: 0;
  border-top: 1px solid var(--rule);
  background: var(--bg-2);
  flex-shrink: 0;
  text-align: right;
}

/* ── responsive ── */
@media (max-width: 860px) {
  .proj--wide {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .proj__content {
    border-right: none;
    border-bottom: 1px solid var(--rule);
  }
  .proj__content::before { display: none; }
  .proj__demo-screen { min-height: 260px; aspect-ratio: 16 / 10; }
}

/* ═══════════ skills ═══════════ */

.skills__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.skills__col {
  background: var(--bg);
  padding: 28px 24px;
}
.skills__h {
  font-size: 10px;
  color: var(--amber-dim);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--rule);
}
.skills__col ul {
  list-style: none;
  margin: 0; padding: 0;
  display: grid; gap: 8px;
  font-size: 13px;
  color: var(--ink);
}
.skills__col li::before {
  content: "› ";
  color: var(--amber);
}

/* ═══════════ contact ═══════════ */

.contact__box {
  position: relative;
  max-width: 820px;
  padding: clamp(36px, 4vw, 64px);
  border: 1px solid var(--rule);
  background: var(--bg-2);
}
.contact__lede {
  font-family: var(--f-display);
  font-variation-settings: var(--fv-display);
  font-size: clamp(22px, 1.8vw + 12px, 32px);
  font-weight: 340;
  line-height: 1.32;
  margin: 0 0 32px;
  color: var(--ink);
  max-width: 36ch;
}
.contact__list {
  list-style: none;
  margin: 0 0 28px; padding: 0;
  display: grid; gap: 14px;
  font-size: 13px;
  border-top: 1px dashed var(--rule);
  border-bottom: 1px dashed var(--rule);
  padding: 22px 0;
}
.contact__list li {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 18px;
  align-items: baseline;
}
.contact__k {
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 11px;
}
.contact__v {
  color: var(--ink);
  position: relative;
  transition: color .25s var(--ease);
}
.contact__v::after {
  content: "";
  position: absolute; left: 0; right: 100%;
  bottom: -2px; height: 1px;
  background: var(--amber);
  transition: right .4s var(--ease);
}
.contact__v:hover { color: var(--amber); }
.contact__v:hover::after { right: 0; }

.contact__prompt {
  margin: 0;
  font-size: 13px;
  color: var(--ink-dim);
}

/* ═══════════ footer ═══════════ */

.footer {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 30px var(--pad) 48px;
  border-top: 1px solid var(--rule);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-mute);
}
.footer__row {
  display: flex; flex-wrap: wrap; gap: 12px;
  justify-content: center;
  text-align: center;
}
.footer__row--mini {
  margin-top: 10px;
  color: var(--amber-dim);
  opacity: .7;
  font-size: 9px;
}
.footer__sep { color: var(--rule); }

/* ═══════════ reveal animations ═══════════ */

@media (prefers-reduced-motion: no-preference) {
  [data-reveal] {
    opacity: 0;
    transform: translateY(18px);
    will-change: transform, opacity;
    transition:
      opacity .9s var(--ease),
      transform .9s var(--ease);
    transition-delay: var(--d, 0ms);
  }
  [data-reveal].is-in {
    will-change: auto;
    opacity: 1;
    transform: none;
  }

  /* hero entrance */
  .hero__meta,
  .hero__kicker,
  .hero__name,
  .hero__role,
  .hero__terminal,
  .hero__actions,
  .dossier,
  .hero__side {
    opacity: 0;
    animation: rise .95s var(--ease) forwards;
  }
  .hero__meta     { animation-delay: .05s; }
  .hero__kicker   { animation-delay: .15s; }
  .hero__name     { animation-delay: .22s; }
  .hero__role     { animation-delay: .38s; }
  .hero__terminal { animation-delay: .52s; }
  .hero__actions  { animation-delay: .70s; }
  .dossier        { animation-delay: .32s; }
  .hero__side     { animation-delay: .86s; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}

/* ═══════════ selection ═══════════ */

::selection { background: var(--amber); color: #141005; }

/* ═══════════ scrollbar (webkit) ═══════════ */

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: var(--rule);
  border: 2px solid var(--bg);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover { background: var(--amber-dim); }
