@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@300..700&display=swap');

:root {
  --bg: #060608;
  --bg2: #0b0b10;
  --blue: #3b82f6;
  --blue-dim: rgba(59, 130, 246, 0.12);
  --yellow: #facc15;
  --yellow-dim: rgba(250, 204, 21, 0.12);
  --purple: #a855f7;
  --purple-dim: rgba(168, 85, 247, 0.12);
  --purple-glow: rgba(168, 85, 247, 0.06);
  --green: #22c55e;
  --green-dim: rgba(34, 197, 94, 0.1);
  --green-glow: rgba(34, 197, 94, 0.05);
  --text: #e2e8f0f1;
  --muted: rgba(226, 232, 240, 0.4);
  --dim: rgba(226, 232, 240, 0.06);
  --border: rgba(168, 85, 247, 0.18);

  --fs-base: clamp(12px, 1.2vw, 14px);
  --fs-name: clamp(28px, 5vw, 64px);
  --pad-body: clamp(16px, 3vw, 32px);
  --term-w: min(750px, calc(100vw - clamp(20px, 4vw, 80px)));
}

html,
body {
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Fira Code", monospace;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.grid__bg {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--dim) 1px, transparent 1px),
    linear-gradient(90deg, var(--dim) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(
    ellipse 80% 80% at 50% 50%,
    black 30%,
    transparent 100%
  );
  -webkit-mask-image: radial-gradient(
    ellipse 80% 80% at 50% 50%,
    black 30%,
    transparent 100%
  );
  z-index: 0;
}

.terminal {
  position: relative;
  z-index: 10;
  width: var(--term-w);
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow:
    0 0 0 1px rgba(168, 85, 247, 0.06),
    0 0 80px rgba(168, 85, 247, 0.1),
    0 0 140px rgba(34, 197, 94, 0.04),
    0 40px 100px rgba(0, 0, 0, 0.7);
  animation: rise 1s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 0.1s;
}

.terminal__header {
  display: flex;
  align-items: center;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(168, 85, 247, 0.04);
  border-radius: 10px 10px 0 0;
  gap: 12px;
}

.terminal__controls {
  display: flex;
  gap: 7px;
}

.terminal__control {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.terminal__control--red {
  background: #ef4444;
}

.terminal__control--yellow {
  background: #facc15;
}

.terminal__control--green {
  background: #22c55e;
}

.terminal__path {
  flex: 1;
  text-align: center;
  font-size: var(--fs-base);
  letter-spacing: 0.06em;
  color: var(--muted);
}

.terminal__path-home {
  color: var(--purple);
}

.terminal__branch {
  color: var(--green);
}

.terminal__spacer {
  width: 54px;
}

.terminal__body {
  padding: var(--pad-body);
}

.terminal__line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  opacity: 0;
  animation: fadein 0.4s ease forwards;
}

.terminal__prompt {
  color: var(--purple);
  font-size: 13px;
  user-select: none;
  flex-shrink: 0;
}

.terminal__command {
  font-size: var(--fs-base);
  color: var(--text);
}

.terminal__argument {
  color: var(--green);
}

.terminal__output {
  margin: 22px 0 22px 4px;
  padding: 20px 24px;
  border: 1px solid var(--border);
  background: rgba(168, 85, 247, 0.04);
  border-radius: 6px;
  opacity: 0;
  animation: fadein 0.5s ease forwards;
}

.terminal__output-name {
  font-size: var(--fs-name);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--text);
  margin-top: 0;
  margin-bottom: 6px;
}

.terminal__comment {
  color: var(--purple);
}

.terminal__output-subtitle {
  font-size: var(--fs-base);
  color: var(--muted);
  letter-spacing: 0.06em;
  margin-bottom: 18px;
}

.terminal__tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  list-style: none;
  padding: 0;
}

.terminal__tag {
  font-size: var(--fs-base);
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 3px;
  border: 1px solid;
}

.terminal__tag--blue {
  color: var(--blue);
  border-color: rgba(59, 130, 246, 0.35);
  background: var(--blue-dim);
}

.terminal__tag--yellow {
  color: var(--yellow);
  border-color: rgba(250, 204, 21, 0.35);
  background: var(--yellow-dim);
}

.terminal__tag--purple {
  color: var(--purple);
  border-color: rgba(168, 85, 247, 0.35);
  background: var(--purple-dim);
}

.terminal__tag--green {
  color: var(--green);
  border-color: rgba(34, 197, 94, 0.35);
  background: var(--green-dim);
}

.terminal__status {
  font-size: var(--fs-base);
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
}

.terminal__status-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s infinite;
  flex-shrink: 0;
}

.terminal__progress-bar {
  color: var(--green);
}

.terminal__line--cursor {
  display: flex;
  align-items: center;
  gap: 10px;
  animation: fadein 0.4s ease forwards;
}

.terminal__caret {
  display: inline-block;
  width: 8px;
  height: 18px;
  background: var(--green);
  border-radius: 1px;
  animation: blink 1.1s step-end infinite;
}

.footer {
  position: fixed;
  bottom: 24px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: var(--fs-base);
  letter-spacing: 0.14em;
  color: var(--muted);
  z-index: 10;
  opacity: 0;
  animation: fadein 0.5s ease forwards;
  animation-delay: 2.4s;
}

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

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
  }
  50% {
    opacity: 0.6;
    box-shadow: 0 0 0 5px rgba(34, 197, 94, 0);
  }
}

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

@keyframes fadein {
  to {
    opacity: 1;
  }
}

.terminal__line {
  animation-delay: 0.85s;
}
.terminal__output {
  animation-delay: 1.2s;
}
.terminal__line--cursor {
  animation-delay: 1.9s;
}
