@font-face {
  font-family: "Press Start 2P";
  src: url("/fonts/press-start-2p-latin.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: "VT323";
  src: url("/fonts/vt323-latin.woff2") format("woff2");
  font-display: swap;
}

:root {
  --bg: #0d0e12;
  --fg: #e9e6dc;
  --dim: #7d7a72;
  --line: #2a2b31;
  --green: #7cf29a;
  --pixel: "Press Start 2P", ui-monospace, monospace;
  --term: "VT323", ui-monospace, monospace;
}

* { box-sizing: border-box; }

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

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--term);
  font-size: 22px;
  line-height: 1.25;
  display: grid;
  place-items: center;
  padding: 16px;
  -webkit-font-smoothing: none;
}

/* Subtle CRT scanlines */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,0) 0 2px, rgba(0,0,0,.18) 2px 3px);
}

main {
  width: 100%;
  max-width: 560px;
}

.logo {
  font-family: var(--pixel);
  font-size: 20px;
  letter-spacing: 1px;
  margin: 0 0 6px;
}
.logo .tld { color: var(--dim); }

.sub { color: var(--dim); margin: 0 0 40px; }

.prompt { margin: 0 0 14px; }
.prompt .ps { color: var(--green); }

ul { list-style: none; margin: 0 0 28px; padding: 0; }

.app {
  display: grid;
  grid-template-columns: 18px 48px 1fr;
  align-items: center;
  gap: 14px;
  padding: 12px 10px 12px 4px;
  color: inherit;
  text-decoration: none;
  border: 2px solid transparent;
}
.app .arrow {
  font-family: var(--pixel);
  font-size: 12px;
  color: var(--accent);
  visibility: hidden;
}
.app.active { border-color: var(--line); background: #15161b; }
.app.active .arrow { visibility: visible; animation: nudge .6s steps(2) infinite; }
.app:focus-visible { outline: none; }
.app-alboo { --accent: #9b85ff; }
.app-qubo { --accent: #f4f5f8; }

.sprite { width: 48px; height: 48px; image-rendering: pixelated; shape-rendering: crispEdges; }

.name {
  font-family: var(--pixel);
  font-size: 14px;
  color: var(--accent);
  display: block;
  margin-bottom: 6px;
}
.desc { color: var(--dim); }
.app.active .desc { color: var(--fg); }

/* Fixed-height scrollback: new lines push old ones out the top. */
#log {
  max-height: 9em;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
#log.full { mask-image: linear-gradient(to bottom, transparent, #000 2.5em); }
#log p { margin: 0 0 4px; white-space: pre-wrap; flex-shrink: 0; }
#log p.prompt { margin: 0 0 4px; }
#log .out { color: var(--dim); margin-bottom: 14px; }
#log .out b { color: var(--fg); font-weight: normal; }
#input { white-space: pre; }

.cursor {
  display: inline-block;
  width: .55em;
  height: 1em;
  background: var(--fg);
  vertical-align: -0.15em;
  animation: blink 1s steps(1) infinite;
}

footer {
  margin-top: 48px;
  color: var(--dim);
  font-size: 18px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
footer a { color: var(--dim); }
footer a:hover { color: var(--fg); }
.keys kbd {
  font-family: var(--term);
  border: 1px solid var(--line);
  padding: 0 5px;
}

@media (hover: none), (pointer: coarse) {
  .keys { display: none; }
}

@keyframes blink { 50% { opacity: 0; } }
@keyframes nudge { 50% { transform: translateX(3px); } }

@media (max-width: 480px) {
  body { font-size: 20px; place-items: start center; padding-top: 48px; }
  .logo { font-size: 16px; }
  .keys { display: none; }
}

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