@font-face {
  font-family: "Martian Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/martian-mono-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Martian Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/martian-mono-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #0b0a08;
  --ink: #ebe5d6;
  --dim: rgba(235, 229, 214, 0.62);
  --faint: rgba(235, 229, 214, 0.1);
  --amber: #ffb224;
  --red: #ff6b5b;
  --gutter: clamp(16px, 4.5vw, 56px);
  --mono: "Martian Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background:
    radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(0, 0, 0, 0.55)),
    var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-size: clamp(0.78rem, 0.72rem + 0.3vw, 0.95rem);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

a:focus-visible {
  outline: 1px solid var(--amber);
  outline-offset: 3px;
}

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

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

/* Faint scanlines: enough to read as a screen, not enough to be a gimmick. */
.crt {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background: repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0, 0, 0, 0.16) 2px 3px);
}

/* ---------- top bar ---------- */

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: max(var(--gutter), env(safe-area-inset-top)) var(--gutter) 0;
}

.topbar a {
  text-decoration: none;
}

.langs {
  display: flex;
  align-items: center;
}

.langs a {
  display: inline-block;
  min-width: 32px;
  padding: 2px 6px;
  line-height: 20px;
  text-align: center;
  text-decoration: none;
  color: var(--dim);
}

.langs a:hover,
.langs a:focus-visible {
  color: var(--ink);
}

.langs a[aria-current="page"] {
  color: var(--bg);
  background: var(--amber);
}

/* ---------- session ---------- */

.session {
  align-self: center;
  width: 100%;
  max-width: 76rem;
  padding: 0 var(--gutter);
}

.line {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

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

.response {
  margin: 0.4em 0 2.2em;
}

.response .line {
  color: var(--dim);
}

.key {
  color: var(--dim);
}

.response .line:not(:first-child) {
  color: var(--ink);
}

.response .line .key {
  color: var(--dim);
}

.status {
  color: var(--amber);
  font-weight: 600;
}

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

.headline {
  margin: 0;
  font-size: clamp(1.9rem, 1rem + 5.2vw, 6.4rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.04em;
  text-shadow: 0 0 0.6em rgba(255, 178, 36, 0.12);
}

.cursor {
  display: inline-block;
  width: 0.58em;
  height: 0.95em;
  margin-left: 0.08em;
  vertical-align: -0.1em;
  background: var(--amber);
  animation: blink 1.05s steps(1) infinite;
}

.back {
  margin-top: 2.4em;
}

.back a {
  text-decoration-color: var(--amber);
  text-underline-offset: 0.3em;
}

/* Before the typing starts (only when JavaScript runs; without it everything is visible). */
.js .typing-pending [data-step],
.js .typing-pending [data-type] {
  visibility: hidden;
}

.js .typing-pending .cursor {
  display: none;
}

.typing-cursor {
  display: inline-block;
  width: 0.58em;
  height: 1.1em;
  vertical-align: -0.2em;
  background: var(--amber);
}

/* ---------- tmux-ish status line ---------- */

.statusline {
  display: flex;
  align-items: center;
  gap: 1.2em;
  margin-top: var(--gutter);
  padding: 0.35em var(--gutter) max(0.35em, env(safe-area-inset-bottom));
  background: #16140f;
  border-top: 1px solid var(--faint);
  font-size: 0.85em;
  white-space: nowrap;
}

.statusline .segment {
  margin-left: calc(-1 * var(--gutter));
  padding: 0 0.8em 0 var(--gutter);
  background: var(--amber);
  color: var(--bg);
  font-weight: 600;
}

.statusline .spacer {
  flex: 1;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@media (max-width: 520px) {
  .statusline .dim {
    display: none;
  }
}

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