:root {
  --bg: #090d0a;
  --bg-soft: #0d130f;
  --text: #d8e3da;
  --muted: #728078;
  --green: #7ee787;
  --green-strong: #4ed866;
  --cyan: #79c0ff;
  --yellow: #e3b341;
  --red: #ff7b72;
  --border: #1b2a20;
  --selection: rgba(126, 231, 135, 0.22);
  --max-width: 1140px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color-scheme: dark;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 80% 0%, rgba(126, 231, 135, 0.035), transparent 30rem),
    var(--bg);
  color: var(--text);
  font-family:
    "JetBrains Mono",
    "Fira Code",
    "Cascadia Code",
    "SFMono-Regular",
    Consolas,
    "Liberation Mono",
    monospace;
  font-size: 15px;
  line-height: 1.7;
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

::selection {
  background: var(--selection);
  color: #fff;
}

#terminal {
  min-height: 100vh;
  padding:
    clamp(24px, 5vw, 62px)
    clamp(18px, 6vw, 84px)
    72px;
  cursor: text;
}

.terminal-shell {
  width: min(var(--max-width), 100%);
  margin: 0 auto;
}

.boot {
  margin-bottom: 26px;
  white-space: pre-wrap;
}

.block {
  margin: 0 0 26px;
}

.output {
  margin-top: 8px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.prompt-row {
  display: flex;
  align-items: flex-start;
  width: 100%;
  min-height: 28px;
}

.prompt {
  flex: 0 0 auto;
  white-space: nowrap;
  user-select: none;
}

.prompt-user { color: var(--green); }
.prompt-host { color: var(--cyan); }
.prompt-path { color: var(--yellow); }
.prompt-symbol { color: var(--text); }

.input-wrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  margin-left: 8px;
}

#commandInput {
  position: fixed;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
  left: -9999px;
}

#inputDisplay {
  color: var(--text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.cursor {
  display: inline-block;
  width: 9px;
  height: 1.16em;
  margin-left: 1px;
  vertical-align: -0.17em;
  background: var(--green);
  box-shadow: 0 0 10px rgba(126, 231, 135, 0.25);
  animation: blink 1s steps(1) infinite;
}

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

.title {
  color: #fff;
  font-weight: 700;
}

.section-title {
  color: var(--green);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.label {
  color: var(--yellow);
}

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

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

.error {
  color: var(--red);
}

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

.divider {
  color: var(--border);
}

.inline-command {
  display: inline;
  appearance: none;
  border: 0;
  border-bottom: 1px dashed rgba(121, 192, 255, 0.35);
  padding: 0;
  background: transparent;
  color: var(--cyan);
  cursor: pointer;
}

.inline-command:hover,
.inline-command:focus-visible {
  color: #a9d7ff;
  border-bottom-color: currentColor;
  outline: none;
}

.quick-commands {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 24px;
}

.quick-commands button {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--muted);
  border-radius: 5px;
  padding: 7px 10px;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease, transform .15s ease;
}

.quick-commands button:hover,
.quick-commands button:focus-visible {
  color: var(--green);
  border-color: rgba(126, 231, 135, 0.45);
  outline: none;
  transform: translateY(-1px);
}

.keyboard-hint {
  margin-top: 18px;
  color: var(--muted);
  font-size: 12px;
}

.profile-preview {
  display: grid;
  grid-template-columns: minmax(180px, 280px) 1fr;
  gap: 24px;
  align-items: start;
  margin-top: 16px;
}

.profile-frame {
  margin: 0;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 8px;
}

.profile-frame img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 360px;
  object-fit: cover;
  object-position: center;
  filter: saturate(.88) contrast(1.02);
}

.profile-frame figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.profile-meta {
  white-space: pre-wrap;
}

.link {
  color: var(--cyan);
  text-decoration: none;
}

.link:hover {
  text-decoration: underline;
}

.noscript {
  color: var(--red);
  margin-top: 24px;
}

@media (max-width: 760px) {
  body {
    font-size: 13px;
  }

  #terminal {
    padding: 22px 16px 52px;
  }

  .input-wrap {
    margin-left: 6px;
  }

  .profile-preview {
    grid-template-columns: 1fr;
  }

  .profile-frame {
    max-width: 360px;
  }

  .keyboard-hint {
    line-height: 1.8;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cursor {
    animation: none;
  }

  .quick-commands button {
    transition: none;
  }
}
