:root {
  --bg: #050705;
  --terminal-bg: #020402;
  --text: #94ff9b;
  --muted: #5aa95f;
  --accent: #72ff7b;
  --error: #ff7878;
  --border: #123114;
}

* {
  box-sizing: border-box;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
}

body {
  background: radial-gradient(circle at top, #112010, var(--bg));
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.terminal {
  width: 100vw;
  height: 100dvh;
  background: var(--terminal-bg);
  border: 1px solid var(--border);
  box-shadow: inset 0 0 40px rgba(114, 255, 123, 0.08);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.terminal::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(to bottom, rgba(114, 255, 123, 0.06) 1px, transparent 1px);
  background-size: 100% 3px;
  opacity: 0.22;
}

.terminal__output {
  padding: 28px 14px 14px;
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  line-height: 1.6;
  font-size: 15px;
  text-shadow: 0 0 6px rgba(114, 255, 123, 0.35);
  overscroll-behavior: contain;
  user-select: text;
  -webkit-user-select: text;
}

.line {
  margin: 0 0 8px;
  white-space: pre-wrap;
}

.line--command {
  color: #c8ffd0;
}

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

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

.prompt {
  color: var(--accent);
  font-size: 14px;
  margin-right: 8px;
}

.prompt-line {
  display: flex;
  align-items: center;
  gap: 0;
}

.typed-command {
  color: var(--text);
  min-height: 1em;
}

.cursor {
  display: inline-block;
  width: 8px;
  height: 1em;
  background: var(--accent);
  margin-left: 0;
  vertical-align: text-bottom;
  animation: blink 1s steps(1, end) infinite;
}

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

.command-capture {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  user-select: none;
  /* Keep focusable so keyboard reaches the real input; clicks focus via window unless typing/copying */
}

.gallery {
  margin: 8px 0 14px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.gallery__item {
  margin: 0;
}

.gallery__item img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  border: 1px solid #375a39;
  border-radius: 6px;
}

/* Monochrome “phosphor” green — same family as terminal text */
img.terminal-tone,
.gallery__item img {
  filter: grayscale(100%) brightness(0.88) sepia(1) hue-rotate(72deg) saturate(2.15) contrast(1.08);
  box-shadow: 0 0 18px rgba(114, 255, 123, 0.18);
}

.terminal-image-wrap {
  margin: 10px 0 14px;
  max-width: min(100%, 540px);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
}

.terminal-image-wrap img.terminal-tone {
  display: block;
  width: 100%;
  height: auto;
  max-height: 320px;
  object-fit: contain;
  box-shadow: none;
  border-radius: 0;
}

.gallery__item figcaption {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}
