/* carrie.sh. Static, no build step, no JavaScript. ASCII only. */

@font-face {
  font-family: "Geist Mono";
  src: url("fonts/geist-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --black: #000;
  --green: #3be36f;      /* body text on black, about 12:1 */
  --green-dim: #23a84b;  /* prompts and asides, about 7:1 */
  --green-deep: #0f3d1d; /* rules and selection only */
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

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

html {
  background: var(--black);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--black);
  color: var(--green);
  font: 400 1rem/1.65 var(--mono);
  overflow-wrap: break-word;
}

::selection { background: var(--green); color: var(--black); }

main {
  max-width: 44rem;
  margin: 0 auto;
  padding: clamp(2.5rem, 9vh, 6rem) clamp(1.25rem, 5vw, 2.5rem) clamp(3rem, 10vh, 6rem);
}

p, ol, blockquote { margin: 0; }

a {
  color: var(--green);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
}
a:hover { background: var(--green); color: var(--black); text-decoration: none; }
a:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

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

.top { margin-bottom: clamp(2.5rem, 6vh, 3.5rem); }

.host {
  color: var(--green-dim);
  font-size: .875rem;
  margin-bottom: 1.25rem;
}

h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(1.75rem, 6.2vw, 2.75rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -.02em;
}
h1 .name { display: block; font-size: 1.6em; line-height: 1.1; margin-bottom: .1em; }

.lead { max-width: 34rem; color: var(--green); }

/* The cursor. It sits still most of the time and blinks now and then,
   unevenly, like someone thinking. Under reduced motion it just sits. */
.cursor {
  display: inline-block;
  width: .55em;
  height: .95em;
  margin-left: .2em;
  vertical-align: -.1em;
  background: var(--green);
}
@media (prefers-reduced-motion: no-preference) {
  .cursor { animation: think 6.4s steps(1, end) infinite; }
}
@keyframes think {
  0%   { opacity: 1; }
  44%  { opacity: 0; }
  52%  { opacity: 1; }
  60%  { opacity: 0; }
  68%  { opacity: 1; }
  92%  { opacity: 0; }
  100% { opacity: 1; }
}

/* ----------------------------------------------------------- sections -- */

section + section { margin-top: 2.5rem; }

h2 {
  margin: 0 0 .6rem;
  font-size: 1rem;
  font-weight: 400;
  color: var(--green-dim);
}
h2::before { content: "$ "; }

.log { list-style: none; padding: 0; }
.log li {
  display: grid;
  grid-template-columns: 6ch 1fr;
  column-gap: 1ch;
}
.log li + li { margin-top: .35rem; }
.log span { color: var(--green-dim); }

blockquote {
  padding-left: 1.5ch;
  border-left: 1px solid var(--green-dim);
}

/* --------------------------------------------------------------- 404 -- */

.lost h1 { margin-bottom: 1.25rem; }
.lost .lead + .lead { margin-top: 1.5rem; }

@media (max-width: 30rem) {
  body { font-size: .9375rem; }
}
