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

:root {
  --bg:       #030810;
  --accent:   #4fc0e8;
  --accent2:  #38e8c0;
  --muted:    #1e4060;
  --text:     #d8eaf5;
  --text-dim: rgba(216, 234, 245, 0.4);

  --font-display: 'Syne', sans-serif;
  --font-mono:    'Space Mono', monospace;
}

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  position: relative;
}

/* ── Grid canvas ───────────────────────────────────────────── */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ── Grano ─────────────────────────────────────────────────── */
.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

/* ── Código lateral ────────────────────────────────────────── */
.side-code {
  position: fixed;
  right: 0;
  top: 0;
  height: 100%;
  width: clamp(180px, 25vw, 320px);
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem 1.5rem;
  gap: 0;
  mask-image: linear-gradient(to bottom, transparent, black 20%, black 80%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 20%, black 80%, transparent);
}

.sc-line {
  font-family: var(--font-mono);
  font-size: clamp(0.45rem, 0.9vw, 0.65rem);
  line-height: 1.9;
  color: rgba(79, 192, 232, 0.07);
  white-space: nowrap;
  overflow: hidden;
  user-select: none;
  animation: sc-drift 40s linear infinite alternate;
}

@keyframes sc-drift {
  from { transform: translateY(-15px); }
  to   { transform: translateY(15px); }
}

/* ── Container ─────────────────────────────────────────────── */
.container {
  position: relative;
  z-index: 10;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(1.8rem, 5vh, 3.5rem) clamp(2rem, 8vw, 6rem);
  max-width: 900px;
}

/* ── Header ────────────────────────────────────────────────── */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  animation: fade-in 0.8s ease 0.1s both;
}

.header__status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  color: var(--text-dim);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent2);
  animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.2; }
}

.header__version {
  font-size: 0.55rem;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  opacity: 0.5;
}

/* ── Hero ──────────────────────────────────────────────────── */
.hero {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  animation: fade-in 0.8s ease 0.25s both;
}

.hero__label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.6rem;
  letter-spacing: 0.4em;
  color: var(--accent);
  opacity: 0.7;
}

.bracket {
  color: var(--accent2);
  opacity: 0.6;
}

.hero__name {
  font-family: var(--font-display);
  line-height: 0.88;
  display: flex;
  flex-direction: column;
  width: max-content;
}

.hero__name-first {
  font-size: clamp(3rem, 8vw, 6.5rem);
  font-weight: 300;
  color: var(--text-dim);
  letter-spacing: -0.02em;
}

.hero__name-last {
  font-size: clamp(4.5rem, 12vw, 10rem);
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.04em;
  margin-top: -0.04em;
  /* Efecto de recorte con gradiente */
  background: linear-gradient(
    135deg,
    var(--text) 0%,
    rgba(79, 192, 232, 0.85) 60%,
    var(--accent2) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__desc {
  font-family: var(--font-mono);
  font-size: clamp(0.7rem, 1.5vw, 0.95rem);
  line-height: 2;
  color: var(--text-dim);
}

.desc__comment { color: rgba(79, 192, 232, 0.35); font-style: italic; }
.kw  { color: #c792ea; }
.var { color: #82aaff; }
.op  { color: rgba(216, 234, 245, 0.5); }
.str { color: #c3e88d; }

/* ── Terminal ──────────────────────────────────────────────── */
.coming {
  animation: fade-in 0.8s ease 0.45s both;
}

.coming__terminal {
  border: 1px solid rgba(79, 192, 232, 0.18);
  border-radius: 6px;
  overflow: hidden;
  max-width: 520px;
  background: rgba(4, 14, 28, 0.7);
  backdrop-filter: blur(4px);
}

.terminal__bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.8rem;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(79, 192, 232, 0.1);
}

.t-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.t-dot--red    { background: #ff5f57; }
.t-dot--yellow { background: #febc2e; }
.t-dot--green  { background: #28c840; }

.t-title {
  margin-left: 0.5rem;
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  opacity: 0.6;
}

.terminal__body {
  padding: 1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.t-line {
  font-size: 0.75rem;
  line-height: 1.6;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.t-prompt {
  color: var(--accent2);
  opacity: 0.7;
  flex-shrink: 0;
}

.t-cmd {
  color: var(--text);
}

.cursor {
  color: var(--accent);
  animation: cursor-blink 1s step-end infinite;
}

@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.t-output {
  font-size: 0.7rem;
  color: rgba(79, 192, 232, 0.45);
  padding-left: 1.4rem;
  letter-spacing: 0.02em;
}

.t-link-line { margin-top: 0.2rem; }

.t-link {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(79, 192, 232, 0.3);
  padding-bottom: 1px;
  font-size: 0.75rem;
  transition: color 0.25s, border-color 0.25s;
}

.t-link:hover {
  color: var(--text);
  border-color: rgba(216, 234, 245, 0.4);
}

.t-arrow {
  color: var(--accent2);
  font-size: 0.75rem;
  opacity: 0.7;
}

/* ── Footer ────────────────────────────────────────────────── */
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  animation: fade-in 0.8s ease 0.6s both;
}

.footer__copy {
  font-size: 0.55rem;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  opacity: 0.45;
}

.footer__tags {
  display: flex;
  gap: 0.5rem;
}

.tag {
  font-size: 0.5rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(79, 192, 232, 0.5);
  border: 1px solid rgba(79, 192, 232, 0.2);
  padding: 0.2em 0.6em;
  border-radius: 2px;
}

/* ── Animaciones ───────────────────────────────────────────── */
@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Mobile ────────────────────────────────────────────────── */
@media (max-width: 600px) {
  html, body { overflow: auto; }

  .container {
    height: auto;
    min-height: 100vh;
    padding: 2rem 1.5rem;
    gap: 3rem;
  }

  .side-code { display: none; }

  .hero__name-first { font-size: clamp(2rem, 13vw, 3.5rem); }
  .hero__name-last  { font-size: clamp(3rem, 18vw, 6rem); }

  .footer { flex-direction: column; align-items: flex-start; gap: 1rem; }

  .coming__terminal { max-width: 100%; }
}