@font-face {
  font-family: "Monolithic Blocks";
  src: url("assets/console-blocks.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: block;
  unicode-range: U+0020, U+2588;
}

:root {
  color-scheme: dark;
  --ground: #0b0c0a;
  --phosphor: #dfb579;
  --quiet: #b4976d;
  --line: 1.6rem;
  --persistence: 1200ms;
  --panel-count: 3;
  font-family: "Courier New", Courier, monospace;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
  background: #030403;
  color: var(--phosphor);
}

* { box-sizing: border-box; }
body {
  margin: 12px;
  border: 1px solid #37372b;
  border-radius: 22px;
  background: radial-gradient(ellipse at 48% 44%, #2a2515 0%, #191a10 48%, var(--ground) 90%);
  background-attachment: fixed;
  box-shadow: 0 0 0 3px #11120f, inset 0 2px 2px rgb(255 239 195 / 8%);
  text-shadow: 0 0 2px rgb(255 199 113 / 80%), 0 0 6px rgb(255 187 85 / 44%), 0 0 20px rgb(255 187 85 / 22%);
}

/* Static display layers let pointer and keyboard interaction pass through. */
body::before, body::after {
  content: "";
  position: fixed;
  inset: 12px;
  border-radius: 22px;
  pointer-events: none;
  z-index: 1;
}

body::before {
  background: radial-gradient(ellipse at center, transparent 40%, rgb(0 0 0 / 52%) 100%);
  box-shadow: inset 0 0 70px 12px rgb(0 0 0 / 38%);
}

body::after {
  background: repeating-linear-gradient(to bottom, transparent 0 2px, rgb(0 0 0 / 30%) 2px 3px, transparent 3px 4px);
}

::selection { background: var(--phosphor); color: var(--ground); }

.console {
  width: min(100%, 1120px);
  height: calc(100vh - 26px);
  height: calc(100svh - 26px);
  min-height: 460px;
  margin-inline: auto;
  padding: clamp(24px, 5vh, 64px) clamp(24px, 5vw, 64px);
  display: flex;
  flex-direction: column;
  timeline-scope: --feed;
}

.masthead, footer { flex: none; }

.masthead__line, .footer__line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1ch;
}

.masthead__line { position: relative; justify-content: flex-end; }
.masthead__clock { white-space: nowrap; font-variant-numeric: tabular-nums; }
.clock-digit { position: relative; display: inline-block; width: 1ch; white-space: pre; }
.clock-ghost { position: absolute; top: 0; left: 0; pointer-events: none; }
.masthead__brand { margin-right: auto; visibility: hidden; }
.masthead__brand.is-visible { visibility: visible; animation: phosphor-on 180ms linear both; }
.masthead__brand-ghost {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  white-space: nowrap;
}

@keyframes phosphor-on { from { opacity: 0.2; } to { opacity: 1; } }

.rule {
  overflow: hidden;
  white-space: nowrap;
  user-select: none;
  color: var(--quiet);
  line-height: 1;
}

.masthead .rule { margin-top: 1rem; }

.feed-frame {
  flex: 1;
  min-height: 0;
  position: relative;
  margin-block: var(--line);
  isolation: isolate;
}

.feed {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: #75603e transparent;
  scroll-timeline: --feed block;
  container-type: size;
}

.feed:focus-visible { outline: 1px solid var(--quiet); outline-offset: 6px; }
.ghost-layer { display: none; }

.has-scrollbar .feed { scrollbar-width: none; padding-right: 22px; }
.has-scrollbar .feed::-webkit-scrollbar { display: none; }
.scrollbar {
  position: absolute;
  top: 0;
  right: 0;
  width: 16px;
  height: 100%;
  touch-action: none;
  cursor: ns-resize;
}
.scrollbar:focus-visible { outline: 1px solid var(--quiet); outline-offset: 3px; }
.scrollbar::before {
  content: "";
  position: absolute;
  inset: 0 7px;
  background: rgb(223 181 121 / 8%);
}
.scrollbar-thumb, .scrollbar-ghost {
  position: absolute;
  top: 0;
  left: 5px;
  width: 6px;
  background: var(--phosphor);
  box-shadow: 0 0 6px rgb(255 187 85 / 35%);
  pointer-events: none;
}
.scrollbar-ghosts { position: absolute; inset: 0; overflow: clip; pointer-events: none; }
.visual-ghost { animation: ghost-decay var(--persistence) linear both; }

/* Header afterimages retain their original glyph positions. */
.clock-ghost, .masthead__brand-ghost {
  animation-name: header-ghost-decay;
  color: #efc287;
  text-shadow: 0 0 2px rgb(255 199 113 / 70%), 0 0 9px rgb(255 187 85 / 35%);
}

@keyframes header-ghost-decay {
  0%, 25% { opacity: 0.65; }
  55% { opacity: 0.35; }
  80% { opacity: 0.12; }
  100% { opacity: 0; }
}

.panel {
  min-height: 100cqh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding-block: var(--line);
}

.statement { max-width: 44ch; }
.statement h2 {
  margin: 0 0 var(--line);
  font-size: 1rem;
  font-weight: 400;
  line-height: var(--line);
}
.statement p { line-height: var(--line); }
.statement p + p { margin-top: var(--line); }
.statement .mission-lead { color: var(--phosphor); }
.statement p:not(.mission-lead) { color: var(--quiet); }

/* Native scrolling is the baseline, including reduced-motion and small screens. */
@supports (animation-timeline: scroll()) and (height: calc(1px * round(down, 4px / 1px, 1))) {
  @media (prefers-reduced-motion: no-preference) and (min-height: 700px) and (min-width: 360px) {
    @container (min-height: 19em) and (min-width: 18em) {
    .scroll-track {
      --rows: max(1, round(down, calc(100cqh / var(--line)), 1));
      --travel: calc(var(--rows) * var(--line));
      height: calc(100cqh + var(--travel) * (var(--panel-count) - 1));
    }
    .screen-window {
      position: sticky;
      top: 0;
      height: 100cqh;
      overflow: clip;
      isolation: isolate;
    }
    .panel { height: var(--travel); min-height: var(--travel); padding-block: 0; }
    .transcript {
      --terminal-stepped: 1;
      position: relative;
      z-index: 1;
      animation: line-feed 1s steps(calc(var(--rows) * (var(--panel-count) - 1)), end) both;
      animation-timeline: --feed;
    }
    .terminal-managed .transcript {
      animation: none;
      transform: translateY(var(--text-offset, 0px));
    }
    .terminal-managed .screen-window { touch-action: none; }
    .ghost-layer {
      display: block;
      position: absolute;
      inset: 0;
      overflow: clip;
      pointer-events: none;
      z-index: 0;
    }
    .ghost-frame {
      position: absolute;
      inset: 0 0 auto;
      opacity: 0;
      animation: ghost-decay var(--persistence) linear both;
    }
    }
  }
}

@keyframes line-feed { to { transform: translateY(calc(-1 * var(--travel) * (var(--panel-count) - 1))); } }

/* Every frame has its own clock. Its position stays fixed as new frames arrive. */
@keyframes ghost-decay {
  0%, 12% { opacity: 0.20; }
  45% { opacity: 0.10; }
  75% { opacity: 0.03; }
  100% { opacity: 0; }
}

.ascii-wordmark {
  margin: 0 0 var(--line);
  max-width: 100%;
  font-family: "Monolithic Blocks", monospace;
  font-size: min(1.84cqw, 3.6cqh, 24px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  white-space: pre;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  text-shadow: 0 0 2px rgb(255 211 145 / 45%), 0 0 14px rgb(255 187 85 / 20%);
}

h1 {
  margin: 0;
  font-size: clamp(1.5rem, 3.6vw, 2.5rem);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  text-shadow: 0 0 2px rgb(255 211 145 / 90%), 0 0 8px rgb(255 187 85 / 55%), 0 0 28px rgb(255 187 85 / 28%);
}

.intro h1 {
  font-size: clamp(1rem, 2cqw, 1.375rem);
  line-height: var(--line);
}
.headline-break { display: none; }
.intro .mission { margin-top: var(--line); }

p { margin: 0; }
.mission { margin-top: 2rem; color: var(--quiet); max-width: 40ch; }
.contact { max-width: 100%; min-width: 0; }

a {
  display: inline-block;
  min-height: 44px;
  padding-block: 6px;
  color: inherit;
  text-decoration: none;
  overflow-wrap: anywhere;
}

a:hover, a:focus-visible {
  background: var(--phosphor);
  color: var(--ground);
  text-shadow: none;
}

a:focus-visible { outline: 2px solid var(--phosphor); outline-offset: 4px; }
.footer__line { margin-top: 1rem; font-size: 0.78rem; align-items: flex-end; }
.cursor-line { height: var(--line); line-height: var(--line); flex: none; }
.caret-layer {
  position: absolute;
  inset: 0 22px 0 0;
  overflow: clip;
  pointer-events: none;
  z-index: 2;
}
.caret-layer > .cursor, .cursor-ghost { position: absolute; left: 0; top: 0; }
.cursor-ghost { width: 1ch; height: 1.1em; }
.cursor {
  display: inline-block;
  width: 1ch;
  height: 1.1em;
  vertical-align: middle;
  background: var(--phosphor);
  box-shadow: 0 0 6px rgb(255 187 85 / 44%);
  animation: cursor-blink 1.2s linear infinite;
}

@keyframes cursor-blink {
  0%, 49% { opacity: 1; }
  50% { opacity: 0.2; }
  75% { opacity: 0.05; }
  100% { opacity: 0; }
}

@media (max-width: 600px) {
  :root { font-size: 16px; }
  .masthead__line { font-size: 0.75rem; }
  .desktop-break { display: none; }
  .headline-break { display: block; }
  .mission { max-width: 31ch; }
  .footer__line { font-size: 0.6875rem; }
  .statement { font-size: 0.9375rem; }
}

@media (prefers-reduced-motion: reduce) {
  .cursor { animation: none; }
  .masthead__brand.is-visible { animation: none; }
  .visual-ghost { display: none; }
}

@media (forced-colors: active) {
  body { background: Canvas; border-color: CanvasText; box-shadow: none; }
  body, h1, .phosphor { text-shadow: none !important; }
  body::before, body::after { display: none; }
  .visual-ghost { display: none; }
  .masthead__brand.is-visible { animation: none; }
  .scrollbar-thumb { background: CanvasText; box-shadow: none; }
  .cursor { background: CanvasText; box-shadow: none; }
  a { text-decoration: underline; }
  a:hover, a:focus-visible { color: LinkText; background: Canvas; }
}
