/* ==========================================================================
   nestornr — gris muy oscuro mate + ASCII
   ========================================================================== */
/* fuentes alojadas aquí (sin Google): latin, variables 300–700 */
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 300 700; font-display: swap; src: url(/fonts/jetbrains-mono.woff2) format("woff2"); }
@font-face { font-family: "Inter Tight"; font-style: normal; font-weight: 300 700; font-display: swap; src: url(/fonts/inter-tight.woff2) format("woff2"); }

:root {
  --bg: #1b1b1a;
  --bg-2: #222220;
  --panel: rgba(30, 30, 28, 0.9);
  --line: rgba(214, 210, 200, 0.1);
  --line-2: rgba(214, 210, 200, 0.2);
  --text: #e4e1d9;
  --muted: #9a968c;
  --faint: #66635c;
  --accent: #b9d99a;          /* verde fósforo apagado */
  --accent-dim: rgba(185, 217, 154, 0.14);
  --warn: #e0a36f;
  --bad: #d97a6c;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --sans: "Inter Tight", system-ui, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --gutter: clamp(16px, 5vw, 72px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent); color: var(--bg); }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
em { font-style: normal; color: var(--text); background: linear-gradient(transparent 62%, var(--accent-dim) 62%); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.kbd {
  font-family: var(--mono); font-size: 13px; display: inline-grid; place-items: center;
  min-width: 20px; height: 20px; padding: 0 5px; border: 1px solid var(--line-2); border-radius: 4px;
  color: var(--text);
}

/* ---------- capas de fondo ---------- */
#ascii-bg { position: fixed; inset: 0; z-index: 0; display: block; }
.vignette {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 40%, transparent 0%, rgba(27,27,26,.35) 55%, rgba(27,27,26,.85) 100%);
}
.scanlines {
  position: fixed; inset: 0; z-index: 2; pointer-events: none; opacity: .25;
  background: repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0,0,0,.18) 2px 3px);
}
main, .nav, .footer { position: relative; z-index: 3; }

/* ---------- arranque ---------- */
#boot {
  position: fixed; inset: 0; z-index: 100; background: var(--bg);
  display: grid; place-items: center; transition: opacity .6s var(--ease), visibility .6s;
}
#boot pre { font-family: var(--mono); font-size: 14px; color: var(--muted); line-height: 1.8; min-width: min(420px, 90vw); }
#boot pre .ok { color: var(--accent); }
body.booted #boot { opacity: 0; visibility: hidden; }

/* ---------- cursor ---------- */
.cursor { position: fixed; inset: 0; pointer-events: none; z-index: 90; }
.cursor-dot, .cursor-ring { position: fixed; left: 0; top: 0; border-radius: 50%; will-change: transform; }
.cursor-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--accent); }
.cursor-ring {
  width: 34px; height: 34px; margin: -17px 0 0 -17px; border: 1px solid rgba(214,210,200,.35);
  transition: width .25s var(--ease), height .25s var(--ease), margin .25s var(--ease), border-color .25s, background .25s;
}
.cursor.hover .cursor-ring { width: 64px; height: 64px; margin: -32px 0 0 -32px; border-color: var(--accent); background: rgba(185,217,154,.06); }
.cursor.down .cursor-ring { width: 22px; height: 22px; margin: -11px 0 0 -11px; }
@media (hover: hover) and (pointer: fine) { body.has-cursor, body.has-cursor a, body.has-cursor button { cursor: none; } }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* ---------- barra de progreso ---------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60; }
.progress span { display: block; height: 100%; width: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 18px var(--gutter);
  font-family: var(--mono); font-size: 14px;
  transition: background .4s, padding .4s var(--ease), border-color .4s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled { background: rgba(27,27,26,.94); padding-top: 12px; padding-bottom: 12px; border-color: var(--line); }
.logo { font-weight: 700; font-size: 15px; letter-spacing: .02em; }
.blink { animation: blink 1s steps(1) infinite; color: var(--accent); }
@keyframes blink { 50% { opacity: 0; } }
.nav nav { display: flex; gap: clamp(16px, 2vw, 28px); }
.nav nav a { color: var(--muted); position: relative; transition: color .25s; }
.nav nav a span { color: var(--faint); margin-right: 6px; font-size: 12.5px; }
.nav nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: right; transition: transform .35s var(--ease);
}
.nav nav a:hover, .nav nav a.active, .nav nav a[aria-current] { color: var(--text); }
.nav nav a:hover::after, .nav nav a.active::after, .nav nav a[aria-current]::after { transform: scaleX(1); transform-origin: left; }
.term-btn { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; transition: color .25s, border-color .25s; }
.term-btn:hover { color: var(--text); border-color: var(--line-2); }

/* ---------- botones ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 14px; padding: 14px 22px; border-radius: 8px;
  overflow: hidden; isolation: isolate;
  transition: color .3s var(--ease), border-color .3s, transform .3s var(--ease);
}
.btn i { font-style: normal; transition: transform .3s var(--ease); }
.btn:hover i { transform: translateX(4px); }
.btn-solid { background: var(--text); color: var(--bg); }
.btn-solid::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--accent);
  transform: translateY(101%); transition: transform .4s var(--ease);
}
.btn-solid:hover::before { transform: translateY(0); }
.btn-ghost { border: 1px solid var(--line-2); color: var(--text); background: rgba(27,27,26,.5); }
.btn-ghost::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(214,210,200,.08);
  transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease);
}
.btn-ghost:hover::before { transform: scaleX(1); }
.btn-ghost:hover { border-color: var(--text); }
.btn.big { font-size: clamp(15px, 2.2vw, 20px); padding: 18px 28px; }

.ulink { position: relative; color: var(--muted); font-family: var(--mono); font-size: 14px; transition: color .25s; }
.ulink::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px; background: currentColor; transform: scaleX(.2); transform-origin: left; transition: transform .35s var(--ease); }
.ulink:hover { color: var(--text); }
.ulink:hover::after { transform: scaleX(1); }

/* ---------- hero ---------- */
.hero {
  min-height: 100svh; display: flex; flex-direction: column; justify-content: center;
  padding: 120px var(--gutter) 90px; position: relative;
}
.hero-pre { font-family: var(--mono); font-size: 14px; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(185,217,154,.6); animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 10px rgba(185,217,154,0); } 100% { box-shadow: 0 0 0 0 rgba(185,217,154,0); } }
.hero-title {
  font-family: var(--mono); font-weight: 700; letter-spacing: -.04em; line-height: .95;
  font-size: clamp(56px, 15vw, 220px); margin: 22px 0 18px; white-space: nowrap;
}
.decode .c-scr { color: var(--accent); opacity: .85; }
.hero-sub { font-family: var(--mono); font-size: clamp(18px, 2.6vw, 30px); color: var(--muted); min-height: 1.4em; }
.typer { color: var(--text); }
.caret { display: inline-block; width: .55em; height: 1.05em; background: var(--accent); vertical-align: -0.15em; margin-left: 3px; animation: blink 1s steps(1) infinite; }
.hero-lead { max-width: 560px; color: var(--muted); font-size: clamp(16px, 1.6vw, 19px); margin-top: 22px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 36px; }
.hero-meta {
  display: flex; flex-wrap: wrap; gap: 10px 36px; margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 13.5px; color: var(--muted); max-width: 900px;
}
.hero-meta b { color: var(--faint); font-weight: 400; margin-right: 8px; }
.scroll-hint {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 12.5px; color: var(--faint); letter-spacing: .2em;
}
.scroll-hint i { width: 1px; height: 44px; background: linear-gradient(var(--faint), transparent); position: relative; overflow: hidden; }
.scroll-hint i::after { content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--accent); animation: drip 1.8s var(--ease) infinite; }
@keyframes drip { to { top: 100%; } }

/* ---------- ticker ---------- */
.ticker {
  position: relative; z-index: 3; overflow: hidden; border-block: 1px solid var(--line);
  background: rgba(27,27,26,.8);
  transform: rotate(-1.2deg) scale(1.03); margin: 10px 0 40px;
}
.ticker-track { display: flex; width: max-content; animation: ticker 40s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker span { font-family: var(--mono); font-size: clamp(14px, 1.6vw, 18px); color: var(--muted); padding: 14px 0; white-space: nowrap; }
.ticker span::after { content: "✶"; color: var(--accent); margin: 0 28px; font-size: .8em; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- secciones ---------- */
.section { padding: clamp(80px, 12vw, 150px) var(--gutter); max-width: 1320px; margin: 0 auto; }
.section-head { display: flex; align-items: baseline; gap: 18px; margin-bottom: 40px; }
.section-num { font-family: var(--mono); font-size: 14px; color: var(--accent); }
.section-head h2 { font-family: var(--mono); font-weight: 500; font-size: clamp(32px, 5.5vw, 64px); letter-spacing: -.03em; line-height: 1; white-space: nowrap; }
.section-line { flex: 1; height: 1px; background: var(--line-2); transform-origin: left; transform: scaleX(0); transition: transform 1.2s var(--ease) .2s; }
.section-head.in .section-line { transform: scaleX(1); }
.section-lead { color: var(--muted); max-width: 620px; font-size: 17px; margin-bottom: 44px; }

/* reveal */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- sobre mí ---------- */
.about { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(32px, 6vw, 90px); align-items: start; }
.about-text p { color: var(--muted); margin-bottom: 20px; max-width: 640px; }
.about-text p.big { font-size: clamp(21px, 2.4vw, 30px); line-height: 1.35; color: var(--text); font-weight: 400; letter-spacing: -.01em; }
.principles { list-style: none; margin-top: 34px; display: grid; gap: 18px; }
.principles li { display: grid; grid-template-columns: 40px 1fr; gap: 6px; padding: 18px 0; border-top: 1px solid var(--line); color: var(--muted); }
.principles li span { font-family: var(--mono); color: var(--accent); font-size: 14px; padding-top: 2px; }
.principles b { display: block; color: var(--text); font-family: var(--mono); font-weight: 500; font-size: 14px; margin-bottom: 4px; }

.whoami, .term-win, .panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.6);
}
.whoami { position: sticky; top: 110px; transform-style: preserve-3d; }
.win-bar { display: flex; align-items: center; gap: 7px; padding: 12px 14px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 13px; color: var(--faint); }
.win-bar i { width: 10px; height: 10px; border-radius: 50%; background: #3a3a37; }
.win-bar span { margin-left: 10px; }
.win-body { padding: 20px 18px 22px; font-family: var(--mono); font-size: 14px; line-height: 1.85; color: var(--text); white-space: pre-wrap; overflow-x: auto; }
.win-body .p, .term .p { color: var(--accent); }
.win-body .d, .term .d { color: #8fb3d9; }
.win-body .k { color: var(--faint); display: inline-block; width: 92px; }
.win-body .ok { color: var(--accent); }

/* ---------- charlas ---------- */
.talks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; perspective: 1200px; }
.talk {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 14px;
  padding: 26px; min-height: 290px; border-radius: 12px;
  background: var(--panel); border: 1px solid var(--line);
  transform-style: preserve-3d; transition: border-color .4s, transform .5s var(--ease);
}
.talk.reveal.in { transition: opacity .9s var(--ease), filter .9s var(--ease), border-color .4s, transform .25s ease-out; }
.talk:hover { border-color: var(--line-2); }
.demo-log {
  font-family: var(--mono); font-size: 13.5px; line-height: 1.75; color: var(--muted);
  background: rgba(16,16,15,.65); border: 1px solid var(--line); border-radius: 8px;
  padding: 14px 16px; min-height: 178px; white-space: pre-wrap; word-break: break-all;
  transform: translateZ(22px);
}
.demo-log .p { color: var(--accent); }
.demo-log .w { color: var(--warn); }
.demo-log .b { color: var(--bad); }
.talk.featured { grid-column: span 2; grid-row: span 2; background: linear-gradient(135deg, rgba(185,217,154,.07), rgba(30,30,28,.75) 55%); }
.talk.featured p { flex: none; max-width: 620px; }
.talk.featured .demo-log { flex: 1; margin-top: 8px; }
.talk.featured h3 { font-size: clamp(24px, 2.8vw, 36px); max-width: 560px; }
.talk-glow {
  position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(185,217,154,.12), transparent 60%);
}
.talk:hover .talk-glow { opacity: 1; }
.talk header { display: flex; justify-content: space-between; align-items: center; font-family: var(--mono); font-size: 13px; }
.talk-id { color: var(--faint); }
.tag { color: var(--muted); border: 1px solid var(--line-2); padding: 3px 9px; border-radius: 99px; font-size: 12.5px; }
.tag.live { color: var(--bg); background: var(--accent); border-color: var(--accent); }
.tag.live::before { content: "● "; animation: blink 1.2s steps(1) infinite; }
.talk h3 { font-family: var(--sans); font-weight: 600; font-size: 21px; line-height: 1.2; letter-spacing: -.015em; transform: translateZ(30px); }
.talk p { color: var(--muted); font-size: 15px; flex: 1; transform: translateZ(18px); }
.talk footer { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-family: var(--mono); font-size: 13px; color: var(--faint); padding-top: 14px; border-top: 1px dashed var(--line); }

/* proceso */
.process { margin-top: clamp(70px, 10vw, 120px); position: relative; }
.process-title { font-family: var(--mono); font-weight: 400; font-size: 14px; color: var(--muted); margin-bottom: 34px; }
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; position: relative; z-index: 1; }
.steps li { color: var(--muted); font-size: 15px; padding-top: 34px; position: relative; }
.steps li::before { content: ""; position: absolute; top: 4px; left: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--bg); border: 1px solid var(--accent); }
.steps b { display: block; color: var(--text); font-family: var(--mono); font-weight: 500; margin-bottom: 6px; }
.step-n { font-family: var(--mono); font-size: 13px; color: var(--faint); position: absolute; top: 0; left: 22px; }
.steps-line { position: absolute; left: 4px; right: 0; bottom: auto; top: calc(14px + 34px + 8px); height: 1px; background: var(--line); }
.steps-line span { display: block; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(var(--p, 0)); }

/* ---------- laboratorio ---------- */
.lab { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: stretch; }
.panel { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 14px; color: var(--text); }
.badge, .quiz-score { font-size: 12.5px; color: var(--accent); border: 1px solid rgba(185,217,154,.3); padding: 3px 9px; border-radius: 99px; white-space: nowrap; }

.quiz-stage { padding: 22px 20px 6px; flex: 1; min-height: 270px; }
.msg { border: 1px solid var(--line); border-radius: 10px; background: rgba(20,20,19,.6); overflow: hidden; transition: transform .45s var(--ease), opacity .45s var(--ease); }
.msg.out { transform: translateX(-30px) rotate(-2deg); opacity: 0; }
.msg.in-from { transform: translateX(30px) rotate(2deg); opacity: 0; }
.msg-head { padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 14px; display: grid; gap: 2px; }
.msg-head .ch { font-family: var(--mono); font-size: 12.5px; color: var(--faint); text-transform: uppercase; letter-spacing: .1em; }
.msg-head .from { color: var(--text); font-weight: 500; }
.msg-head .addr { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.msg-body { padding: 14px; font-size: 14.5px; color: var(--muted); }
.msg-body .link { font-family: var(--mono); font-size: 13.5px; color: #8fb3d9; text-decoration: underline; word-break: break-all; }
.msg mark { background: rgba(217,122,108,.18); color: var(--text); border-bottom: 1px solid var(--bad); padding: 0 2px; border-radius: 2px; transition: background .4s; }
.msg:not(.revealed) mark { background: none; border-color: transparent; color: inherit; }
.msg.revealed.legit mark { background: var(--accent-dim); border-color: var(--accent); }
.quiz-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 16px 20px; }
.quiz-actions .btn { justify-content: center; font-size: 14px; padding: 12px; }
.quiz-actions.done .btn { opacity: .35; pointer-events: none; }
.quiz-feedback { padding: 0 20px 20px; font-size: 14px; color: var(--muted); min-height: 72px; }
.quiz-feedback b.ok { color: var(--accent); }
.quiz-feedback b.ko { color: var(--bad); }
.quiz-feedback .next { margin-top: 10px; }

.pass { padding-bottom: 20px; }
.pass-field { display: block; padding: 22px 20px 0; }
.pass-field input {
  width: 100%; background: rgba(20,20,19,.7); border: 1px solid var(--line-2); border-radius: 8px;
  padding: 15px 16px; color: var(--text); font-family: var(--mono); font-size: 16px; outline: none;
  transition: border-color .25s, box-shadow .25s;
}
.pass-field input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(185,217,154,.08); }
.pass-meter { margin: 16px 20px 0; height: 6px; border-radius: 99px; background: rgba(214,210,200,.08); overflow: hidden; }
.pass-meter span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--bad); transition: width .5s var(--ease), background .5s; }
.pass-out { display: grid; grid-template-columns: 1fr auto; gap: 14px; padding: 18px 20px 4px; }
.pass-out small { display: block; font-family: var(--mono); font-size: 12.5px; color: var(--faint); text-transform: uppercase; letter-spacing: .08em; }
.pass-out b { font-family: var(--mono); font-weight: 500; font-size: clamp(18px, 2vw, 24px); }
.pass-out div:last-child { text-align: right; }
.pass-checks { list-style: none; padding: 14px 20px 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pass-checks li { font-family: var(--mono); font-size: 13px; color: var(--faint); border: 1px solid var(--line); padding: 5px 10px; border-radius: 99px; transition: color .3s, border-color .3s, background .3s; }
.pass-checks li::before { content: "○ "; }
.pass-checks li.on { color: var(--accent); border-color: rgba(185,217,154,.35); background: rgba(185,217,154,.06); }
.pass-checks li.on::before { content: "● "; }
.hint { padding: 18px 20px 0; font-size: 14.5px; color: var(--faint); }

/* ---------- contacto ---------- */
.contact { text-align: left; }
.contact-title { font-family: var(--sans); font-weight: 600; font-size: clamp(36px, 7vw, 96px); line-height: 1.02; letter-spacing: -.035em; margin-bottom: 26px; max-width: 1100px; }
/* palabra que rota: línea propia de alto fijo → el resto del título no se mueve */
.swap {
  display: block; position: relative; overflow: hidden; height: 1.12em; margin-top: .04em;
  color: var(--accent); font-family: var(--mono); font-weight: 500; letter-spacing: -.05em;
}
.swap-word { position: absolute; left: 0; top: 0; white-space: nowrap; will-change: transform; }
.swap-word.enter { animation: swap-in .7s var(--ease) both; }
.swap-word.leave { animation: swap-out .55s var(--ease) both; }
@keyframes swap-in { from { transform: translateY(105%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes swap-out { to { transform: translateY(-105%); opacity: 0; } }
.contact-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.socials { display: flex; gap: 28px; margin-top: 40px; }

/* ---------- footer ---------- */
.footer { padding: 40px var(--gutter) 30px; border-top: 1px solid var(--line); overflow: hidden; }
.footer-big {
  font-family: var(--mono); font-weight: 700; letter-spacing: -.05em; line-height: .85;
  font-size: clamp(64px, 19vw, 300px); color: transparent; -webkit-text-stroke: 1px rgba(214,210,200,.18);
  white-space: nowrap; user-select: none; transition: -webkit-text-stroke-color .4s;
}
.footer-big:hover { -webkit-text-stroke-color: rgba(185,217,154,.5); }
.footer-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin-top: 24px; font-family: var(--mono); font-size: 13px; color: var(--faint); }

/* ---------- terminal ---------- */
.term { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgba(10,10,10,.7); }
.term[hidden] { display: none; }
.term-win { width: min(940px, 100%); height: min(640px, 84vh); display: flex; flex-direction: column; background: rgba(24,24,22,.96); animation: pop .35s var(--ease); }
@keyframes pop { from { transform: translateY(16px) scale(.97); opacity: 0; } }
.term-close { margin-left: auto; font-size: 18px; line-height: 1; color: var(--muted); padding: 0 4px; }
.term-close:hover { color: var(--text); }
.term-out { flex: 1; overflow-y: auto; padding: 20px 24px 6px; font-family: var(--mono); font-size: 15.5px; line-height: 1.75; color: var(--muted); white-space: pre-wrap; }
.term-out .cmd { color: var(--text); }
.term-out .acc { color: var(--accent); }
.term-out .err { color: var(--bad); }
.term-line { display: flex; align-items: center; padding: 8px 24px 20px; font-family: var(--mono); font-size: 15.5px; }
.term-line input { flex: 1; background: none; border: 0; outline: none; color: var(--text); font: inherit; caret-color: var(--accent); }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 95; transform: translate(-50%, 20px); opacity: 0;
  font-family: var(--mono); font-size: 14px; color: var(--bg); background: var(--accent);
  padding: 10px 16px; border-radius: 8px; transition: transform .4s var(--ease), opacity .4s; pointer-events: none;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  .talks { grid-template-columns: 1fr 1fr; }
  .lab { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; row-gap: 36px; }
  .steps-line { display: none; }
}
@media (max-width: 760px) {
  .term-btn { display: none; }
  .about { grid-template-columns: 1fr; }
  .whoami { position: relative; top: 0; }
  .talks { grid-template-columns: 1fr; }
  .talk.featured { grid-column: auto; }
  .talk { min-height: 0; }
  .demo-log { font-size: 12.5px; word-break: normal; overflow-wrap: anywhere; }
  .steps { grid-template-columns: 1fr; }
  .hero-meta { flex-direction: column; gap: 6px; }
  .section-head h2 { white-space: normal; }
  .scroll-hint { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; filter: none; }
  html { scroll-behavior: auto; }
}
.faint { color: var(--faint); }
