@font-face {
  font-family: "Plex Sans";
  src: url("/static/fonts/ibm-plex-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 700;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("/static/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("/static/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  color-scheme: dark;

  --bg: #09090a;
  --bg-2: #0e0e10;
  --bg-3: #141416;
  --line: #1f1f22;
  --line-2: #2c2c30;
  --text: #ecebe6;
  --text-2: #b4b3ad;
  --muted: #9a9993;
  --dim: #7c7b75;
  --accent: #ff6b2c;
  --accent-soft: rgba(255, 107, 44, .12);
  --bar-bg: rgba(9, 9, 10, .82);
  --panel: rgba(14, 14, 16, .7);
  --spot: rgba(255, 255, 255, .055);
  --on-accent: #0a0a0a;
  --grain: .045;

  --sans: "Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --max: 1280px;
  --pad: clamp(1rem, 3.2vw, 2.5rem);
  --ease: cubic-bezier(.2, .7, .1, 1);
}

/* Light theme: chosen with the toggle in the top bar (saved per visitor). */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f3ef;
  --bg-2: #ebe9e3;
  --bg-3: #e3e0d9;
  --line: #dcd9d1;
  --line-2: #c9c5bb;
  --text: #121211;
  --text-2: #3c3b37;
  --muted: #57554f;
  --dim: #6c6a63;
  --accent: #c2410c;
  --accent-soft: rgba(194, 65, 12, .1);
  --bar-bg: rgba(244, 243, 239, .85);
  --panel: rgba(235, 233, 227, .7);
  --spot: rgba(0, 0, 0, .04);
  --on-accent: #fff;
  --grain: .03;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Film grain: a very faint texture so the black does not look flat. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  opacity: var(--grain);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

::selection { background: var(--accent); color: var(--on-accent); }

a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; }

h1, h2, h3, p, dl, dd, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 60;
  background: var(--accent); color: #000;
  padding: .5rem .8rem; font: 500 .75rem var(--mono);
}
.skip:focus { top: 1rem; }

/* ── Frame ─────────────────────────────────────────────
   One centered column with hairline borders. Every section is a
   row with a top rule; crosshairs mark where the lines meet. */

.frame {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  border-inline: 1px solid var(--line);
  min-height: 100vh;
}

.sec {
  position: relative;
  border-top: 1px solid var(--line);
  padding: clamp(3.5rem, 9vw, 7.5rem) var(--pad);
}

.sec::before, .sec::after {
  content: "";
  position: absolute;
  top: -6px;
  width: 11px; height: 11px;
  background:
    linear-gradient(var(--muted), var(--muted)) center / 1px 100% no-repeat,
    linear-gradient(var(--muted), var(--muted)) center / 100% 1px no-repeat;
  z-index: 2;
}
.sec::before { left: -6px; }
.sec::after { right: -6px; }

/* ── Top bar ───────────────────────────────────────── */

.bar {
  display: grid;
  grid-template-columns: auto 1fr auto auto auto auto;
  font: 400 .74rem/1 var(--mono);
  letter-spacing: .02em;
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bar-bg);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.bar-cell {
  display: flex;
  align-items: center;
  height: 3.25rem;
  padding: 0 var(--pad);
  border-right: 1px solid var(--line);
  white-space: nowrap;
}
.bar-cell:last-child { border-right: 0; }
.bar-name { color: var(--text); font-weight: 500; }
.bar-nav { gap: 1.6rem; justify-content: flex-end; }
.bar-nav a { color: var(--muted); transition: color .2s; }
.bar-nav a:hover { color: var(--text); }
.bar-lang { color: var(--text); transition: color .2s, background .2s; }
.bar-lang:hover { color: var(--accent); background: var(--bg-2); }

@media (max-width: 64rem) {
  .bar-nav a:not([href$="#contacto"]) { display: none; }
}
@media (max-width: 30rem) { .bar-term span { display: none; } .bar-cell { padding: 0 .75rem; } }
@media (max-width: 40rem), (pointer: coarse) { .bar-pal { display: none; } }

.bar-term, .bar-pal {
  gap: .55rem;
  background: none;
  border: 0;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font: inherit;
  cursor: pointer;
  transition: color .2s, background .2s;
}
.bar-term:hover, .bar-pal:hover { color: var(--text); background: var(--bg-2); }
.bar-term kbd, .bar-pal kbd, .term-close {
  font: 500 .68rem/1 var(--mono);
  color: var(--accent);
  border: 1px solid var(--line-2);
  padding: .25rem .4rem;
  background: none;
}

/* ── Hero ──────────────────────────────────────────── */

.hero {
  border-top: 0;
  padding-top: clamp(5rem, 16vh, 11rem);
  padding-bottom: clamp(3rem, 8vh, 5rem);
  overflow: hidden;
}
.hero::before, .hero::after { display: none; }

.eyebrow {
  position: relative;
  font: 400 .74rem/1.4 var(--mono);
  color: var(--muted);
  letter-spacing: .02em;
  margin-bottom: clamp(2rem, 5vh, 3.25rem);
  animation: rise .9s var(--ease) both;
}

.idx {
  display: inline-block;
  font: 500 .7rem/1 var(--mono);
  color: var(--accent);
  border: 1px solid var(--line-2);
  padding: .3rem .4rem;
  margin-right: .6rem;
  letter-spacing: .04em;
  vertical-align: .1em;
}

.headline {
  position: relative;
  font-weight: 500;
  font-size: clamp(2.6rem, 7.4vw, 6.9rem);
  line-height: .98;
  letter-spacing: -0.048em;
  max-width: 13.5ch;
  animation: rise 1.1s .08s var(--ease) both;
}
.headline em {
  font-style: normal;
  font-weight: 300;
  color: var(--muted);
}

.caret {
  display: inline-block;
  width: .085em;
  height: .82em;
  margin-left: .08em;
  background: var(--accent);
  vertical-align: -0.04em;
  animation: blink 1.1s steps(1) infinite;
}

.hero-foot {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-top: clamp(3rem, 9vh, 6rem);
  animation: rise 1.1s .2s var(--ease) both;
}
@media (min-width: 56rem) {
  .hero-foot { grid-template-columns: minmax(0, 1fr) minmax(0, 25rem); align-items: end; gap: 4rem; }
}

.sub {
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  line-height: 1.55;
  color: var(--text-2);
  max-width: 40ch;
  font-weight: 350;
}

.readout {
  font: 400 .78rem/1 var(--mono);
  border: 1px solid var(--line-2);
  background: var(--panel);
}
.readout > div {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  border-bottom: 1px solid var(--line);
}
.readout > div:last-child { border-bottom: 0; }
.readout dt, .readout dd { padding: .85rem 1rem; }
.readout dt { color: var(--dim); border-right: 1px solid var(--line); }
.readout dd { color: var(--text-2); }

/* ── Section header ───────────────────────────────── */

.sec-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .75rem 1rem;
  align-items: baseline;
  margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
}
@media (min-width: 56rem) {
  .sec-head { grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr); }
}
.sec-head .idx { margin-right: 0; }
.sec-title {
  font-weight: 500;
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  letter-spacing: -0.035em;
  line-height: 1;
}
.sec-note {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: .95rem;
  max-width: 38ch;
}
@media (min-width: 56rem) { .sec-note { grid-column: auto; justify-self: end; text-align: right; } }

/* ── Experience areas ─────────────────────────────── */

.areas {
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
@media (min-width: 48rem) { .areas { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 72rem) { .areas { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.area {
  --x: 50%;
  --y: 50%;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 21rem;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  isolation: isolate;
  overflow: hidden;
}
/* Spotlight that follows the pointer (position set by site.js). */
.area::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  background: radial-gradient(420px circle at var(--x) var(--y), var(--spot), transparent 65%);
  transition: opacity .4s;
}
.area:hover::before { opacity: 1; }

.area-code { font: 500 .72rem var(--mono); color: var(--dim); transition: color .3s; }
.area:hover .area-code { color: var(--accent); }
.area-title {
  font-weight: 500;
  font-size: clamp(1.4rem, 2.3vw, 1.85rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-top: 2.5rem;
}
.area-body { color: var(--text-2); font-size: .98rem; line-height: 1.6; max-width: 46ch; font-weight: 350; }

.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: auto; padding-top: .75rem; }
.tags li {
  font: 400 .7rem/1 var(--mono);
  color: var(--muted);
  border: 1px solid var(--line-2);
  padding: .45rem .55rem;
  letter-spacing: .02em;
}

/* ── Numbers ──────────────────────────────────────── */

.numbers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: calc(-1 * clamp(3.5rem, 9vw, 7.5rem)) calc(-1 * var(--pad));
}
@media (min-width: 56rem) { .numbers { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.num {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2.5rem;
  padding: clamp(1.75rem, 4vw, 3rem) var(--pad);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  min-height: 13rem;
}
.num:nth-child(2n) { border-right: 0; }
@media (min-width: 56rem) {
  .num { border-bottom: 0; }
  .num:nth-child(2n) { border-right: 1px solid var(--line); }
  .num:last-child { border-right: 0; }
}
@media (max-width: 55.99rem) { .num:nth-last-child(-n+2) { border-bottom: 0; } }

.num-value {
  font-weight: 300;
  font-size: clamp(2.6rem, 5.4vw, 4.6rem);
  letter-spacing: -0.05em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.num-label { font: 400 .74rem/1.45 var(--mono); color: var(--muted); max-width: 22ch; }

/* ── Timeline ─────────────────────────────────────── */

.timeline { position: relative; }
.timeline::before {
  content: "";
  position: absolute;
  top: .55rem; bottom: .55rem;
  left: 5px;
  width: 1px;
  background: linear-gradient(var(--line-2), var(--line-2) 85%, transparent);
}
.step {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: .4rem;
  padding: 0 0 clamp(1.75rem, 3.5vw, 2.5rem) 2rem;
}
.step::before {
  content: "";
  position: absolute;
  left: 1px; top: .5rem;
  width: 9px; height: 9px;
  border: 1px solid var(--muted);
  background: var(--bg);
  transition: background .3s, border-color .3s;
}
.step:last-child::before { background: var(--accent); border-color: var(--accent); }
.step:hover::before { border-color: var(--accent); }
@media (min-width: 56rem) {
  .step { grid-template-columns: 8rem minmax(0, 4fr) minmax(0, 7fr); gap: 2rem; align-items: baseline; padding-left: 2.75rem; }
}
.step-year {
  font: 500 .8rem var(--mono);
  color: var(--accent);
  letter-spacing: .04em;
}
.step-title {
  font-weight: 500;
  font-size: clamp(1.15rem, 1.9vw, 1.45rem);
  letter-spacing: -0.025em;
  line-height: 1.2;
}
.step-body { color: var(--text-2); font-weight: 350; max-width: 56ch; }

/* ── Infrastructure ───────────────────────────────── */

.sub-label {
  font: 400 .74rem var(--mono);
  color: var(--muted);
  letter-spacing: .02em;
  margin-bottom: 1.25rem;
}
.sub-label::before { content: "// "; color: var(--dim); }

.clouds {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  margin-bottom: clamp(3rem, 7vw, 5rem);
}
@media (min-width: 56rem) { .clouds { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.cloud {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.75rem;
  min-height: 8.5rem;
  padding: 1.25rem clamp(1rem, 2vw, 1.5rem);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: background .3s;
}
.cloud:hover { background: var(--bg-2); }
.cloud-name {
  font-weight: 500;
  font-size: clamp(1.1rem, 1.8vw, 1.35rem);
  letter-spacing: -0.025em;
}
.cloud-note { font: 400 .72rem/1.5 var(--mono); color: var(--muted); }

.ops { border-top: 1px solid var(--line); }
.op {
  display: grid;
  grid-template-columns: 1fr;
  gap: .5rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line);
}
@media (min-width: 48rem) { .op { grid-template-columns: 12rem 1fr; align-items: baseline; } }
.op dt { font: 400 .74rem var(--mono); color: var(--muted); }
.op dd { color: var(--text-2); font-weight: 350; }

/* ── Principles ───────────────────────────────────── */

.principles { border-top: 1px solid var(--line); }
.principle {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  gap: .6rem 1rem;
  padding: clamp(1.5rem, 3vw, 2.25rem) 0;
  border-bottom: 1px solid var(--line);
  transition: background .3s;
}
@media (min-width: 56rem) {
  .principle { grid-template-columns: 6rem minmax(0, 5fr) minmax(0, 7fr); align-items: baseline; gap: 2rem; }
}
.principle-n { font: 500 .74rem var(--mono); color: var(--dim); transition: color .3s; }
.principle:hover .principle-n { color: var(--accent); }
.principle-title {
  font-weight: 500;
  font-size: clamp(1.25rem, 2.2vw, 1.7rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.principle-body {
  grid-column: 2;
  color: var(--text-2);
  max-width: 52ch;
  font-weight: 350;
}
@media (min-width: 56rem) { .principle-body { grid-column: auto; } }

/* ── Stack ────────────────────────────────────────── */

.stack { border-top: 1px solid var(--line); }
.stack-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: .9rem;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--line);
}
@media (min-width: 48rem) {
  .stack-row { grid-template-columns: 12rem 1fr; align-items: baseline; }
}
.stack-row dt { font: 400 .74rem var(--mono); color: var(--muted); letter-spacing: .02em; }
.stack-row dd { display: flex; flex-wrap: wrap; gap: .5rem 0; }
.stack-row dd span {
  font-size: 1.05rem;
  color: var(--text);
  letter-spacing: -0.01em;
}
.stack-row dd span:not(:last-child)::after {
  content: "/";
  color: var(--dim);
  margin: 0 .75rem;
  font-family: var(--mono);
  font-size: .85rem;
}

/* ── Contact ──────────────────────────────────────── */

.contact { padding-bottom: clamp(5rem, 12vw, 9rem); }
.contact-text {
  color: var(--text-2);
  font-size: clamp(1.1rem, 1.8vw, 1.4rem);
  line-height: 1.45;
  max-width: 34ch;
  font-weight: 350;
}
.mail-big {
  display: inline-block;
  margin-top: clamp(2rem, 5vw, 3rem);
  font-weight: 400;
  font-size: clamp(1.7rem, 5.6vw, 4.6rem);
  letter-spacing: -0.045em;
  line-height: 1.05;
  overflow-wrap: anywhere;
  color: var(--text);
  background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 1px no-repeat;
  padding-bottom: .12em;
  transition: color .3s, background-size .5s var(--ease);
}
.mail-big:hover { color: var(--accent); background-size: 100% 1px; }
.links { display: flex; flex-wrap: wrap; gap: .5rem 2rem; margin-top: 1.5rem; }
.mail {
  display: inline-block;
  font: 400 .85rem var(--mono);
  color: var(--muted);
  transition: color .2s;
}
.mail:hover { color: var(--accent); }

/* ── Status bar (footer) ──────────────────────────── */

.status {
  display: flex;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  font: 400 .7rem/1 var(--mono);
  color: var(--muted);
  letter-spacing: .02em;
}
.status-cell {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: 1.1rem var(--pad);
  border-right: 1px solid var(--line);
  white-space: nowrap;
}
.status-wide { flex: 1; color: var(--dim); }
.status-cell:last-child { border-right: 0; }
@media (max-width: 48rem) {
  .status-cell { flex: 1 1 50%; border-bottom: 1px solid var(--line); }
  .status-wide { flex-basis: 100%; white-space: normal; }
}
.dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #3ecf72;
  box-shadow: 0 0 0 0 rgba(62, 207, 114, .5);
  animation: pulse 2.4s infinite;
}

/* ── 404 ──────────────────────────────────────────── */

.notfound { min-height: 70vh; }
.notfound .sub { margin-top: 3rem; }
.back { color: var(--muted); font: .85rem var(--mono); transition: color .2s; }
.back:hover { color: var(--accent); }

/* ── Motion ───────────────────────────────────────── */

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes blink { 50% { opacity: 0; } }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(62, 207, 114, .45); }
  70% { box-shadow: 0 0 0 7px rgba(62, 207, 114, 0); }
  100% { box-shadow: 0 0 0 0 rgba(62, 207, 114, 0); }
}

/* Elements fade up as they enter the viewport. Only when JS is running. */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
  transition-delay: var(--d, 0s);
}
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

@media print {
  body::after, .bar, .caret, .status { display: none; }
}

/* When the frame touches the screen edges, the corner crosshairs would overflow. */
@media (max-width: 1310px) { .sec::before, .sec::after { display: none; } }


/* ── This site ────────────────────────────────────── */

.build {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: clamp(3rem, 7vw, 5rem);
}
@media (min-width: 60rem) { .build { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 3rem; align-items: start; } }
.build > * { min-width: 0; }
.build-diagram { margin: 0; border: 1px solid var(--line-2); background: var(--bg-2); }
.build-diagram pre {
  margin: 0;
  padding: clamp(1.25rem, 3vw, 2rem);
  overflow-x: auto;
  font: 400 .8rem/1.65 var(--mono);
  color: var(--text-2);
}
.build-facts { border-top: 1px solid var(--line); }
.build-facts li {
  position: relative;
  padding: 1rem 0 1rem 1.5rem;
  border-bottom: 1px solid var(--line);
  color: var(--text-2);
  font-weight: 350;
}
.build-facts li::before {
  content: "→";
  position: absolute; left: 0;
  font-family: var(--mono);
  color: var(--accent);
}
.sub-label .dot { display: inline-block; vertical-align: .1em; margin-right: .2rem; }

.live {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
@media (min-width: 56rem) { .live { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.live > div {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.25rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.live dt { font: 400 .7rem var(--mono); color: var(--muted); }
.live dd {
  font-weight: 300;
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  transition: color .6s;
}
.live dd.tick { color: var(--accent); transition: none; }

/* ── Terminal ─────────────────────────────────────── */

.term {
  --text: #ecebe6;
  --text-2: #b4b3ad;
  --muted: #7d7c77;
  --dim: #55554f;
  --line: #1f1f22;
  --line-2: #2c2c30;
  --accent: #ff6b2c;
  --bg-2: #0e0e10;
  color-scheme: dark;
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(5, 5, 6, .72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: fade .18s ease both;
}
.term[hidden] { display: none; }
.term-win {
  width: min(46rem, 100%);
  height: min(30rem, 80vh);
  display: flex;
  flex-direction: column;
  background: #0b0b0c;
  border: 1px solid var(--line-2);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .02);
  font: 400 .82rem/1.6 var(--mono);
  animation: rise .25s var(--ease) both;
}
.term-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .65rem .9rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: .72rem;
}
.term-close { cursor: pointer; }
.term-out {
  flex: 1;
  overflow-y: auto;
  padding: .9rem;
  color: var(--text-2);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.term-out .cmd { color: var(--text); }
.term-out .cmd b { color: var(--accent); font-weight: 400; }
.term-out .dim { color: var(--dim); }
.term-out .key { color: var(--text); }
.term-out .err { color: #ff8a6a; }
.term-out a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.term-line {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .7rem .9rem;
  border-top: 1px solid var(--line);
}
.term-prompt { color: var(--accent); white-space: nowrap; }
.term-in {
  flex: 1;
  min-width: 0;
  background: none;
  border: 0;
  outline: 0;
  color: var(--text);
  font: inherit;
  caret-color: var(--accent);
}
@media (max-width: 30rem) { .term-prompt { max-width: 6.5rem; overflow: hidden; text-overflow: ellipsis; } }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ── Scroll progress + active section ─────────────── */

.progress {
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: var(--accent);
  transform-origin: left;
  transform: scaleX(var(--p, 0));
  pointer-events: none;
}
.bar-nav a { position: relative; }
.bar-nav a.active { color: var(--text); }
.bar-nav a.active::before {
  content: "";
  position: absolute;
  left: -.7rem; top: 50%;
  width: 4px; height: 4px;
  margin-top: -2px;
  background: var(--accent);
}

/* ── Latency ──────────────────────────────────────── */

.latency {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "label value" "spark spark" "stats stats";
  gap: .6rem 1rem;
  align-items: baseline;
  margin-top: 2rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  font-family: var(--mono);
}
@media (min-width: 56rem) {
  .latency { grid-template-columns: 16rem 7rem minmax(0, 1fr) auto; grid-template-areas: "label value spark stats"; align-items: center; }
}
.lat-label { grid-area: label; font-size: .7rem; color: var(--muted); }
.lat-value {
  grid-area: value;
  font: 300 1.5rem/1 var(--sans);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.lat-spark {
  grid-area: spark;
  display: block;
  height: 28px;
  color: var(--accent);
}
.lat-spark svg { display: block; width: 100%; max-width: 320px; height: 100%; margin-left: auto; overflow: visible; }
.lat-stats { grid-area: stats; font-size: .7rem; color: var(--dim); white-space: nowrap; }

.curl-hint {
  margin-top: 1.25rem;
  font: 400 .78rem var(--mono);
  color: var(--muted);
}
.curl-hint code {
  color: var(--text);
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  padding: .3rem .5rem;
  margin-left: .4rem;
  user-select: all;
}


/* ── Theme toggle ─────────────────────────────────── */

.bar-theme {
  justify-content: center;
  padding: 0 1.1rem;
  background: none;
  border: 0;
  border-right: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
  transition: color .2s, background .2s;
}
.bar-theme:hover { color: var(--text); background: var(--bg-2); }
.theme-glyph {
  width: 13px; height: 13px;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: linear-gradient(90deg, currentColor 50%, transparent 50%);
  transition: transform .5s var(--ease);
}
:root[data-theme="light"] .theme-glyph { transform: rotate(180deg); }
html.theme-anim, html.theme-anim *, html.theme-anim *::before, html.theme-anim *::after {
  transition: background-color .35s ease, color .35s ease, border-color .35s ease !important;
}

/* ── 404 ──────────────────────────────────────────── */

.nf-cmd {
  font: 400 clamp(1.05rem, 2.6vw, 1.6rem)/1.5 var(--mono);
  color: var(--text);
  overflow-wrap: anywhere;
  margin-bottom: 2rem;
}
.nf-cmd .p { color: var(--accent); }
.nf-cmd .e { color: var(--muted); display: block; margin-top: .4rem; }
.nf-list { font: 400 .85rem/1.9 var(--mono); color: var(--muted); margin-top: 3rem; }
.nf-list a { color: var(--text); border-bottom: 1px solid var(--line-2); transition: color .2s, border-color .2s; }
.nf-list a:hover { color: var(--accent); border-color: var(--accent); }
.nf-list .c { color: var(--dim); }
.nf-title { font-size: clamp(2.4rem, 6vw, 5rem) !important; }
.nf-list .p { color: var(--accent); }

.edu {
  margin-top: 1.75rem;
  padding-left: 1rem;
  border-left: 2px solid var(--accent);
  font: 400 .78rem/1.75 var(--mono);
}
.edu dt { color: var(--dim); margin-bottom: .15rem; }
.edu dd { color: var(--text-2); }


/* ── GitHub activity ──────────────────────────────── */

.gh { padding-block: clamp(2.5rem, 6vw, 4rem); }
.gh-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .5rem 2rem; margin-bottom: 1.4rem; }
.gh-head .sub-label { margin: 0; }
.gh-total { font: 400 .8rem var(--mono); color: var(--muted); }
.gh-scroll { overflow-x: auto; scrollbar-width: thin; padding-bottom: .4rem; direction: rtl; }
.gh-grid { display: block; min-width: 42rem; width: 100%; height: auto; direction: ltr; }
.gh-grid rect, .gh-legend i { fill: var(--line); background: var(--line); }
.gh-grid .c1, .gh-legend .c1 { fill: color-mix(in srgb, var(--accent) 30%, var(--line)); background: color-mix(in srgb, var(--accent) 30%, var(--line)); }
.gh-grid .c2, .gh-legend .c2 { fill: color-mix(in srgb, var(--accent) 55%, var(--line)); background: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.gh-grid .c3, .gh-legend .c3 { fill: color-mix(in srgb, var(--accent) 78%, var(--line)); background: color-mix(in srgb, var(--accent) 78%, var(--line)); }
.gh-grid .c4, .gh-legend .c4 { fill: var(--accent); background: var(--accent); }
.gh-grid rect:hover { stroke: var(--text); stroke-width: 1; }
.gh-legend { display: flex; align-items: center; justify-content: flex-end; gap: .3rem; margin-top: .8rem; font: 400 .7rem var(--mono); color: var(--dim); }
.gh-legend i { display: inline-block; width: .65rem; height: .65rem; border-radius: 2px; }

/* ── Contact card ─────────────────────────────────── */

@media (min-width: 56rem) {
  .contact { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 3rem; align-items: end; }
  .contact > .sec-head { grid-column: 1 / -1; }
}
.qr { margin: 2.5rem 0 0; display: flex; gap: 1rem; align-items: flex-end; }
@media (min-width: 56rem) { .qr { flex-direction: column; align-items: flex-end; margin: 0; } }
.qr img { width: 132px; height: 132px; background: #fff; padding: 6px; border: 1px solid var(--line-2); }
.qr figcaption { max-width: 22ch; font: 400 .72rem/1.5 var(--mono); color: var(--dim); }
@media (min-width: 56rem) { .qr figcaption { text-align: right; } }

/* ── Command palette ──────────────────────────────── */

.pal {
  position: fixed; inset: 0; z-index: 75;
  display: flex; justify-content: center; align-items: flex-start;
  padding: 14vh 1rem 1rem;
  background: rgba(5, 5, 6, .6);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  animation: fade .15s ease both;
}
.pal[hidden] { display: none; }
.pal-win {
  width: min(34rem, 100%);
  background: var(--bg);
  border: 1px solid var(--line-2);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
}
.pal-in {
  width: 100%; border: 0; border-bottom: 1px solid var(--line);
  background: none; color: var(--text);
  font: 400 1rem var(--sans, inherit);
  padding: 1rem 1.1rem; outline: none;
}
.pal-in::placeholder { color: var(--dim); }
.pal-list { max-height: min(22rem, 55vh); overflow-y: auto; padding: .35rem 0; }
.pal-group { font: 400 .68rem var(--mono); color: var(--dim); padding: .7rem 1.1rem .3rem; text-transform: lowercase; }
.pal-item {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: .55rem 1.1rem; cursor: pointer; color: var(--text-2);
  border-left: 2px solid transparent;
}
.pal-item small { font: 400 .7rem var(--mono); color: var(--dim); }
.pal-item[aria-selected="true"] { background: var(--bg-2); color: var(--text); border-left-color: var(--accent); }
.pal-item[aria-selected="true"] small { color: var(--accent); }
.pal-empty { padding: 1rem 1.1rem; color: var(--dim); font: 400 .8rem var(--mono); }
.pal-foot { display: flex; gap: 1rem; border-top: 1px solid var(--line); padding: .55rem 1.1rem; }
.pal-foot kbd { font: 400 .65rem/1 var(--mono); color: var(--dim); border: 1px solid var(--line-2); padding: .2rem .35rem; margin-right: .2rem; }

.toast {
  position: fixed; left: 50%; bottom: 3.5rem; z-index: 80; transform: translateX(-50%);
  font: 400 .78rem var(--mono); color: var(--on-accent); background: var(--accent);
  padding: .5rem .9rem; animation: fade .15s ease both;
}
.toast[hidden] { display: none; }

/* ── Visits report (private) ──────────────────────── */

.admin-main { max-width: 56rem; margin: 0 auto; padding: 3rem var(--pad); }
.admin-totals { display: flex; gap: 3rem; margin: 2rem 0; }
.admin-totals b { display: block; font-weight: 400; font-size: 3rem; letter-spacing: -.04em; }
.admin-totals span { font: 400 .75rem var(--mono); color: var(--muted); }
.admin-bars { display: block; width: 100%; height: 6rem; margin-bottom: 2.5rem; }
.admin-bars rect { fill: var(--accent); }
.admin-cols { display: grid; gap: 2rem; margin-bottom: 2.5rem; }
@media (min-width: 48rem) { .admin-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.admin-list div { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; border-bottom: 1px solid var(--line); font: 400 .8rem var(--mono); }
.admin-list dt { color: var(--text-2); overflow-wrap: anywhere; }
.admin-list dd { color: var(--muted); white-space: nowrap; }
.admin-warn { margin-top: 2rem; font: 400 .8rem var(--mono); color: var(--accent); }

/* ── Print ─────────────────────────────────────────── */

.print-head { display: none; }

@media print {
  :root, :root[data-theme="light"] {
    --bg: #fff; --bg-2: #fff; --panel: #fff; --line: #d6d3cc; --line-2: #c4c0b6;
    --text: #111; --text-2: #333; --muted: #555; --dim: #777; --accent: #b23a0a;
  }
  @page { margin: 14mm 12mm; }
  html, body { background: #fff !important; color: #111; font-size: 10pt; }
  .bar, .status, .term, .pal, .toast, .skip, .caret, .progress, #sitio, .gh, .qr,
  .sec::before, .sec::after, .area-spot { display: none !important; }
  .frame { border: 0; max-width: none; }
  .js .reveal { opacity: 1 !important; transform: none !important; }
  .sec { padding: 6mm 0; border-top: 1px solid var(--line); break-inside: auto; }
  .hero { padding-top: 0; border-top: 0; }
  .headline { font-size: 24pt; }
  .area, .step, .principle, .stack-row, .cloud, .op, .num { break-inside: avoid; }
  .areas { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .numbers { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
  .print-head { display: flex; align-items: center; justify-content: flex-end; gap: .8rem; font: 400 8pt/1.4 var(--mono); color: var(--muted); }
  .print-head b { color: var(--text); font-weight: 500; }
  .print-head img { width: 18mm; height: 18mm; }
  .mail-big { font-size: 20pt; margin-top: 3mm; }
  .contact { padding-bottom: 0; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font: 400 7.5pt var(--mono); color: var(--muted); }
  .mail[href$=".vcf"] { display: none; }
  .sec:has(.numbers), .readout, .tags, .area-spot, .sec-note, #metodo { display: none !important; }
  .sec-head, .sub-label { break-after: avoid; page-break-after: avoid; margin-bottom: 3mm !important; }
  .sec-title { font-size: 15pt; }
  #experiencia { break-before: page; }
  .headline { max-width: none !important; font-size: 22pt; line-height: 1.1; }
  .hero-foot { display: block !important; margin-top: 4mm !important; }
  .hero .sub { max-width: none; font-size: 10pt; }
  .edu { margin-top: 3mm !important; }
  .area { padding: 3mm 4mm !important; min-height: 0 !important; }
  .area-title { font-size: 10.5pt; margin: 1mm 0 !important; }
  .area-body { font-size: 8.5pt; line-height: 1.4; max-width: none; }
  .timeline { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 8mm; }
  .step { padding: 0 0 2.5mm 0 !important; }
  .step::before, .timeline::before { display: none !important; }
  .step-title { font-size: 9.5pt; }
  .step-body { font-size: 8pt; line-height: 1.35; }
  .clouds { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
  .cloud { padding: 2mm 3mm !important; min-height: 0 !important; }
  .op, .stack-row { padding-block: 1.2mm !important; font-size: 8.5pt; }
  .stack-row dd { font-size: 8.5pt; }
}
