:root {
  --bg: #f4f2ee;
  --card: #fdfcfa;
  --line: #e3e0d9;
  --fg: #191817;
  --muted: #8a867e;
  --accent: #c2410c;
  --dot: rgba(25, 24, 23, 0.07);
  --shadow: 0 18px 50px -18px rgba(25, 24, 23, 0.25);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0d0c;
    --card: #161514;
    --line: #2a2825;
    --fg: #eceae6;
    --muted: #85817a;
    --accent: #fb923c;
    --dot: rgba(236, 234, 230, 0.06);
    --shadow: 0 18px 50px -12px rgba(0, 0, 0, 0.6);
  }
}
* { box-sizing: border-box; }
::selection { background: var(--accent); color: var(--card); }
body {
  margin: 0;
  background: var(--bg);
  background-image: radial-gradient(var(--dot) 1px, transparent 1px);
  background-size: 22px 22px;
  color: var(--fg);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: min(9vh, 5rem) 1rem 4rem;
}
.term {
  width: 100%;
  max-width: 46rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: appear 0.5s ease;
}
@keyframes appear {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
.bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--line);
}
.bar i { width: 11px; height: 11px; border-radius: 50%; }
.bar i:nth-child(1) { background: #ff5f57; }
.bar i:nth-child(2) { background: #febc2e; }
.bar i:nth-child(3) { background: #28c840; }
.bar span {
  flex: 1;
  text-align: center;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  /* compensa visualmente el ancho de los tres botones */
  margin-right: 44px;
}
main { padding: clamp(1.6rem, 5vw, 3rem); }
.name {
  font-size: 0.78rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1rem;
}
.name::before { content: "// "; color: var(--accent); }
h1 {
  font-size: clamp(1.35rem, 4.5vw, 1.85rem);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
  margin: 0 0 3.2rem;
}
h1 em { font-style: normal; color: var(--accent); }
.cursor {
  display: inline-block;
  width: 0.55em;
  height: 1em;
  background: var(--accent);
  vertical-align: text-bottom;
  margin-left: 0.15em;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
ul { list-style: none; margin: 0; padding: 0; counter-reset: cap; }
li {
  counter-increment: cap;
  font-size: clamp(0.93rem, 2.5vw, 1.02rem);
  margin: 0;
  padding: 1.05rem 0.6rem 1.05rem 2.9rem;
  position: relative;
  border-top: 1px solid var(--line);
  opacity: 0;
  animation: rise 0.55s ease forwards;
  transition: background 0.2s ease;
}
li:last-child { border-bottom: 1px solid var(--line); }
li:hover { background: color-mix(in srgb, var(--accent) 5%, transparent); }
li::before {
  content: counter(cap, decimal-leading-zero);
  position: absolute;
  left: 0.6rem;
  top: 1.15rem;
  font-size: 0.75rem;
  color: var(--accent);
}
li small {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.78rem;
  color: var(--muted);
}
li small::before { content: "# "; }
a.more {
  display: inline-block;
  margin-top: 0.4rem;
  font-size: 0.78rem;
  color: var(--accent);
  text-decoration: none;
}
a.more:hover { text-decoration: underline; text-underline-offset: 3px; }
li:nth-child(1) { animation-delay: 0.15s; }
li:nth-child(2) { animation-delay: 0.27s; }
li:nth-child(3) { animation-delay: 0.39s; }
li:nth-child(4) { animation-delay: 0.51s; }
li:nth-child(5) { animation-delay: 0.63s; }
li:nth-child(6) { animation-delay: 0.75s; }
li:nth-child(7) { animation-delay: 0.87s; }
li:nth-child(8) { animation-delay: 0.99s; }
li:nth-child(9) { animation-delay: 1.11s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  li, .term { animation: none; opacity: 1; }
  .cursor { animation: none; }
}
.coda { margin: 2.6rem 0 0; font-size: 0.82rem; color: var(--muted); }
.coda::before { content: "# "; }
footer {
  margin-top: 2.4rem;
  padding-top: 1.6rem;
  border-top: 1px dashed var(--line);
  font-size: 0.95rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  align-items: baseline;
  justify-content: space-between;
}
footer a.mail {
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
  transition: color 0.2s ease;
}
footer a.mail:hover { color: var(--accent); }
footer .loc { font-size: 0.75rem; color: var(--muted); }

/* --- subpáginas --- */
.back {
  display: inline-block;
  font-size: 0.78rem;
  color: var(--muted);
  text-decoration: none;
  margin: 0 0 2rem;
}
.back:hover { color: var(--accent); }
.article h1 { margin-bottom: 0.6rem; }
.status {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0 0 2.6rem;
}
.status b { color: var(--accent); font-weight: 400; }
.article h2 {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--muted);
  margin: 2.4rem 0 0.6rem;
}
.article h2::before { content: "## "; color: var(--accent); }
.article p {
  font-size: clamp(0.93rem, 2.5vw, 1rem);
  margin: 0 0 1rem;
}
.article p a {
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
}
.article p a:hover { color: var(--accent); }
