:root {
  --bg: #0b0e14;
  --bg-soft: #11151f;
  --line: #1f2532;
  --text: #e9ecf1;
  --text-dim: #8089a0;
  --violet: #7c5cff;
  --coral: #ff7a59;
  --mono: 'Space Mono', monospace;
  --sans: 'Inter', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* textura de fondo sutil */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 15%, rgba(124,92,255,0.10), transparent 40%),
    radial-gradient(circle at 85% 75%, rgba(255,122,89,0.08), transparent 45%);
  pointer-events: none;
  z-index: 0;
}

.wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

header.top {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 28px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-dim);
  z-index: 10;
}

header.top .dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--violet);
  margin-right: 8px;
  box-shadow: 0 0 8px var(--violet);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* === Terminal hero === */
.terminal {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.6);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.terminal-bar .btn { width: 11px; height: 11px; border-radius: 50%; }
.btn.r { background: #ff5f57; }
.btn.y { background: #febc2e; }
.btn.g { background: #28c840; }

.terminal-bar .path {
  margin-left: 10px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
}

.terminal-body {
  padding: 32px clamp(20px, 5vw, 44px) 40px;
  font-family: var(--mono);
  font-size: clamp(14px, 2vw, 16px);
  line-height: 1.9;
}

.line { white-space: pre-wrap; }
.prompt-sym { color: var(--violet); }
.cmd { color: var(--text); }
.out { color: var(--text-dim); }
.accent { color: var(--coral); }

#typed-name {
  color: var(--text);
  font-weight: 700;
  font-size: clamp(20px, 4.5vw, 32px);
  display: inline-block;
}

.role-line {
  color: var(--text-dim);
  font-size: clamp(13px, 2vw, 15px);
  margin-top: 4px;
  margin-bottom: 28px;
  min-height: 1.4em;
}

.cursor {
  display: inline-block;
  width: 9px;
  height: 1.1em;
  background: var(--coral);
  margin-left: 4px;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

@keyframes blink { 50% { opacity: 0; } }

/* === Comandos / links === */
.commands {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cmd-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  transition: background 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
  border: 1px solid transparent;
  opacity: 0;
  animation: rise 0.5s ease forwards;
}

.cmd-row:hover {
  background: rgba(124,92,255,0.08);
  border-color: var(--line);
  transform: translateX(3px);
}

.cmd-row .arrow {
  color: var(--violet);
  font-family: var(--mono);
}

.cmd-row .label {
  font-family: var(--mono);
  font-size: 15px;
}

.cmd-row .desc {
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--text-dim);
  text-align: right;
  white-space: nowrap;
}

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

footer.bottom {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 28px 24px 32px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
}

footer.bottom a {
  color: var(--text-dim);
  text-decoration: none;
  border-bottom: 1px dotted var(--line);
}
footer.bottom a:hover { color: var(--text); }

@media (max-width: 480px) {
  .cmd-row { grid-template-columns: 22px 1fr; }
  .cmd-row .desc { display: none; }
  header.top span.hide-mobile { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
