:root {
  color-scheme: dark;
  --bg: #080713;
  --panel: rgba(14, 13, 31, 0.82);
  --panel-strong: rgba(19, 17, 43, 0.96);
  --text: #f7ecff;
  --muted: #a9a2c7;
  --cyan: #40f4ff;
  --pink: #ff3bbd;
  --amber: #ffd166;
  --green: #5dff9a;
  --line: rgba(255, 255, 255, 0.14);
  --shadow: rgba(255, 59, 189, 0.32);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background:
    linear-gradient(90deg, rgba(8, 7, 19, 0.97) 0%, rgba(8, 7, 19, 0.9) 52%, rgba(8, 7, 19, 0.96) 100%),
    linear-gradient(180deg, rgba(8, 7, 19, 0.64) 0%, rgba(8, 7, 19, 0.96) 100%),
    url("assets/hero-retrowave.png") center / cover fixed,
    linear-gradient(180deg, #100c20 0%, #090817 44%, #080713 100%);
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background:
    linear-gradient(180deg, transparent 0 48%, rgba(255, 59, 189, 0.035) 49%, transparent 50%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 5px);
  pointer-events: none;
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    radial-gradient(circle at 50% 46%, transparent 0 18rem, rgba(8, 7, 19, 0.52) 44rem),
    repeating-linear-gradient(180deg, rgba(64, 244, 255, 0.022) 0 1px, transparent 1px 10px);
  mix-blend-mode: screen;
  opacity: 0.28;
  pointer-events: none;
  animation: scan-drift 8s linear infinite;
}

.matrix-rain {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  opacity: 0.08;
  pointer-events: none;
}

.grid-sky {
  position: fixed;
  right: -12vw;
  bottom: -18vh;
  left: -12vw;
  z-index: -2;
  height: 45vh;
  transform: perspective(360px) rotateX(58deg);
  transform-origin: bottom;
  background:
    linear-gradient(rgba(64, 244, 255, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 59, 189, 0.1) 1px, transparent 1px);
  background-size: 100% 44px, 70px 100%;
  filter: drop-shadow(0 0 8px rgba(64, 244, 255, 0.08));
}

.shell {
  width: calc(100% - 32px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 16px 0;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 12px;
  align-content: center;
}

.hero {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 0;
  text-align: center;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--cyan);
  font-size: 0.86rem;
  font-weight: 700;
  text-transform: uppercase;
}

h1 {
  max-width: none;
  margin: 0;
  font-size: clamp(2.6rem, 9vw, 5.8rem);
  line-height: 0.96;
  letter-spacing: 0;
  text-shadow: 0 0 24px rgba(255, 59, 189, 0.46), 0 0 42px rgba(64, 244, 255, 0.16);
}

.intro {
  max-width: 62ch;
  margin: 16px auto 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

.status-bar {
  width: fit-content;
  max-width: 100%;
  margin: 18px auto 0;
  padding: 11px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 7, 18, 0.62);
  color: var(--muted);
  font-size: 0.8rem;
}

.status-bar span:first-child {
  color: var(--green);
}

.status-bar i {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px var(--green);
}

.terminal-window {
  position: relative;
  width: 100%;
  min-height: 0;
  height: calc(100vh - 96px);
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto auto 1fr auto auto;
  overflow: hidden;
  border: 1px solid rgba(64, 244, 255, 0.32);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42), 0 0 46px var(--shadow);
  backdrop-filter: blur(16px);
  animation: terminal-enter 700ms ease-out both, terminal-glow 5s ease-in-out infinite;
}

.terminal-window::before {
  position: absolute;
  inset: 0;
  z-index: 2;
  content: "";
  background: linear-gradient(180deg, transparent, rgba(64, 244, 255, 0.08), transparent);
  height: 24%;
  opacity: 0.5;
  pointer-events: none;
  animation: terminal-sweep 4.8s linear infinite;
}

.terminal-window::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(255, 59, 189, 0.12), transparent 18%, transparent 82%, rgba(64, 244, 255, 0.12)),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 6px);
  pointer-events: none;
}

.terminal-header {
  position: relative;
  z-index: 3;
  min-height: 44px;
  padding: 0 12px;
  display: grid;
  grid-template-columns: 74px 1fr auto;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: var(--panel-strong);
}

.lights {
  display: flex;
  gap: 8px;
}

.lights span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 0 0 10px currentColor;
}

.lights span:nth-child(2) {
  background: var(--amber);
}

.lights span:nth-child(3) {
  background: var(--cyan);
}

.terminal-header strong {
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}

.terminal-meta {
  position: relative;
  z-index: 3;
  padding: 10px 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(6, 6, 18, 0.42);
  color: rgba(169, 162, 199, 0.82);
  font-size: 0.78rem;
}

.terminal-meta span::before {
  content: ">";
  margin-right: 7px;
  color: var(--pink);
}

button {
  min-height: 34px;
  border: 1px solid rgba(64, 244, 255, 0.36);
  border-radius: 8px;
  background: rgba(64, 244, 255, 0.08);
  color: var(--cyan);
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
}

button:hover,
button:focus-visible {
  border-color: var(--pink);
  color: var(--text);
  outline: none;
  box-shadow: 0 0 18px rgba(255, 59, 189, 0.28);
}

.clear-btn {
  padding: 4px 10px;
}

.terminal-output {
  position: relative;
  z-index: 3;
  min-height: 0;
  padding: 22px;
  overflow-y: auto;
  font-size: clamp(0.86rem, 1.7vw, 1rem);
  line-height: 1.65;
  scrollbar-color: var(--pink) rgba(255, 255, 255, 0.08);
}

.terminal-line {
  margin: 0 0 10px;
  white-space: pre-wrap;
  animation: line-in 180ms ease-out both;
}

.terminal-link {
  color: var(--cyan);
  text-decoration: none;
  border-bottom: 1px solid rgba(64, 244, 255, 0.42);
}

.terminal-link:hover,
.terminal-link:focus-visible {
  color: var(--text);
  border-color: var(--pink);
  outline: none;
}

.prompt {
  color: var(--cyan);
}

.system {
  color: var(--muted);
}

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

.accent {
  color: var(--pink);
}

.thanks {
  margin: 8px 0 14px;
  color: var(--green);
  font-size: clamp(1.35rem, 3vw, 2.35rem);
  font-weight: 700;
  line-height: 1.2;
  text-shadow: 0 0 18px rgba(93, 255, 154, 0.28);
}

.terminal-form {
  position: relative;
  z-index: 3;
  min-height: 48px;
  padding: 0 22px 18px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: center;
}

.mobile-experience-actions {
  position: relative;
  z-index: 3;
  padding: 0 22px 12px;
  display: none;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.mobile-experience-actions.is-visible {
  display: none;
}

.terminal-form label {
  color: var(--green);
  font-size: 0.9rem;
}

.terminal-form input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  caret-color: var(--pink);
}

.terminal-form.is-disabled {
  opacity: 0.52;
}

.terminal-form.is-disabled input {
  cursor: not-allowed;
}

.experience-item {
  width: 100%;
  min-height: 44px;
  margin: 0 0 8px;
  padding: 9px 12px;
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 12px;
  align-items: center;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  text-align: left;
}

.experience-item.is-active,
.experience-item:hover,
.experience-item:focus-visible {
  border-color: rgba(64, 244, 255, 0.58);
  background: rgba(64, 244, 255, 0.08);
  color: var(--text);
}

.experience-item strong {
  color: var(--green);
}

.experience-item small {
  color: var(--muted);
}

@media (max-width: 620px) {
  .experience-item {
    grid-template-columns: 28px 1fr;
  }

  .experience-item small {
    grid-column: 2;
  }
}

.input-shell {
  position: relative;
  min-width: 0;
}

.suggestions {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  left: 0;
  z-index: 6;
  display: none;
  overflow: hidden;
  border: 1px solid rgba(64, 244, 255, 0.28);
  border-radius: 8px;
  background: rgba(7, 7, 19, 0.96);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.36), 0 0 22px rgba(64, 244, 255, 0.14);
}

.suggestions.is-visible {
  display: block;
}

.suggestions button {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  display: grid;
  grid-template-columns: minmax(80px, 0.34fr) 1fr;
  gap: 10px;
  align-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: left;
}

.suggestions button + button {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.suggestions button.is-active,
.suggestions button:hover {
  background: rgba(255, 59, 189, 0.14);
}

.suggestions span {
  color: var(--green);
  font-weight: 700;
}

.suggestions small {
  min-width: 0;
  color: var(--muted);
  font-size: 0.72rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-commands {
  width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 10px;
}

.quick-commands button {
  width: 100%;
}

@media (max-width: 860px) {
  .shell {
    width: calc(100% - 18px);
    padding: 9px 0;
  }

  .terminal-window {
    height: calc(100vh - 94px);
  }

  .quick-commands {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .mobile-experience-actions.is-visible {
    display: grid;
  }
}

@media (max-width: 520px) {
  .terminal-header {
    grid-template-columns: 58px 1fr auto;
  }

  .terminal-output {
    padding: 14px;
    font-size: 0.84rem;
  }

  .terminal-form {
    grid-template-columns: 1fr;
    gap: 3px;
    padding: 0 14px 14px;
  }

  .suggestions button {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .quick-commands {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mobile-experience-actions {
    padding: 0 14px 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@keyframes terminal-enter {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes terminal-glow {
  0%,
  100% {
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42), 0 0 38px rgba(255, 59, 189, 0.28);
  }

  50% {
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.46), 0 0 58px rgba(64, 244, 255, 0.26);
  }
}

@keyframes terminal-sweep {
  from {
    transform: translateY(-120%);
  }

  to {
    transform: translateY(440%);
  }
}

@keyframes line-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scan-drift {
  from {
    background-position: 0 0;
  }

  to {
    background-position: 0 72px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
