/* Average Bots — green-screen terminal look, after swinsonconsulting.com.
   What changed from that stylesheet, and why:
   - text lives in the HTML, not in a script, so the page reads without JS
   - min-height instead of height: 100vh, so a long page scrolls instead of
     spilling over the top of a flex-centred box
   - a readable measure (~68ch) and a font size that follows the screen
   - links look like links (underlined), with a visible keyboard focus
   - a softer green and a lighter glow for body text; the full glow is kept
     for headings, where it reads as a screen rather than as blur
   - the font is served from this site, so a page carrying a privacy policy
     makes no third-party requests
   - motion (cursor blink, typing) stops for prefers-reduced-motion */

@font-face {
  font-family: "VT323";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/vt323-latin.woff2") format("woff2");
}

:root {
  --bg: #030703;
  --fg: #3dff6e;
  --fg-dim: #29b24c;
  --fg-bright: #b6ffc8;
  --rule: #1d5a2c;
  --glow: 0 0 6px rgba(61, 255, 110, 0.35);
  --glow-strong: 0 0 10px rgba(61, 255, 110, 0.65);
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font-family: "VT323", ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.6rem);
  line-height: 1.3;
  text-shadow: var(--glow);
}

/* Faint scanlines over everything; never in the way of a click. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0,
    rgba(0, 0, 0, 0) 2px,
    rgba(0, 0, 0, 0.22) 3px
  );
}

::selection {
  background: var(--fg);
  color: var(--bg);
  text-shadow: none;
}

.wrap {
  width: 100%;
  max-width: 68ch;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ---- header / nav ---- */

.site-header {
  border-bottom: 1px dashed var(--rule);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.brand {
  color: var(--fg-bright);
  text-decoration: none;
  text-shadow: var(--glow-strong);
  font-size: 1.15em;
}

.brand::before {
  content: "> ";
  color: var(--fg-dim);
}

.site-nav {
  display: flex;
  gap: 1.25rem;
}

.site-nav a {
  text-decoration: none;
}

.site-nav a[aria-current="page"] {
  color: var(--fg-bright);
}

.site-nav a[aria-current="page"]::before {
  content: "[";
}

.site-nav a[aria-current="page"]::after {
  content: "]";
}

/* ---- main ---- */

main {
  flex: 1;
  padding: 2rem 0 3rem;
}

h1,
h2,
h3 {
  color: var(--fg-bright);
  font-weight: 400;
  line-height: 1.1;
  text-shadow: var(--glow-strong);
  margin: 1.6em 0 0.4em;
}

h1 {
  font-size: 2.4em;
  margin-top: 0.2em;
}

h2 {
  font-size: 1.6em;
}

h3 {
  font-size: 1.25em;
}

p,
ul,
ol {
  margin: 0 0 0.9em;
}

ul {
  list-style: none;
  padding-left: 1.5em;
}

ul > li {
  position: relative;
}

ul > li::before {
  content: "*";
  position: absolute;
  left: -1.25em;
  color: var(--fg-dim);
}

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

hr {
  border: 0;
  border-top: 1px dashed var(--rule);
  margin: 2em 0;
}

code {
  font-family: inherit;
  color: var(--fg-bright);
}

/* ---- links ---- */

a {
  color: var(--fg-bright);
  text-decoration: underline;
  text-decoration-color: var(--fg-dim);
  text-underline-offset: 0.18em;
}

a:hover {
  background: var(--fg);
  color: var(--bg);
  text-decoration: none;
  text-shadow: none;
}

a:focus-visible {
  outline: 2px solid var(--fg-bright);
  outline-offset: 3px;
}

/* ---- home ---- */

.hero {
  min-height: 55vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero p {
  font-size: 1.15em;
}

.cursor {
  display: inline-block;
  width: 0.55em;
  margin-left: 0.1em;
  background: var(--fg);
  box-shadow: var(--glow-strong);
  animation: blink 1s step-start infinite;
}

.cursor::before {
  content: "\00a0";
}

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

/* ---- app listing ---- */

.app {
  border: 1px solid var(--rule);
  padding: 0.25rem 1.25rem 1rem;
  margin: 1.5rem 0;
  box-shadow: inset 0 0 24px rgba(61, 255, 110, 0.05);
}

.app h2 {
  margin-top: 0.6em;
}

.app .tagline {
  color: var(--fg-dim);
  margin-top: -0.2em;
}

.app-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin: 1.2em 0 0;
  padding: 0;
}

.app-links li::before {
  content: none;
}

.soon {
  color: var(--fg-dim);
  border: 1px dashed var(--fg-dim);
  padding: 0 0.4em;
}

/* ---- long text (privacy, terms) ---- */

.prose {
  text-shadow: none;
}

.prose h1,
.prose h2 {
  text-shadow: var(--glow-strong);
}

.prose .updated {
  color: var(--fg-dim);
}

/* ---- footer ---- */

.site-footer {
  border-top: 1px dashed var(--rule);
  color: var(--fg-dim);
}

/* Smaller text on the spans, not the footer: .wrap is measured in ch, so a
   smaller font on it would narrow the column out of line with the header. */
.site-footer span {
  font-size: 0.9em;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  padding-top: 0.75rem;
  padding-bottom: 1rem;
}

.site-footer a {
  color: var(--fg-dim);
}

.site-footer a:hover {
  color: var(--bg);
}

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

@media print {
  body::after {
    display: none;
  }

  html,
  body {
    background: #fff;
    color: #000;
    text-shadow: none;
  }

  a,
  h1,
  h2,
  h3 {
    color: #000;
    text-shadow: none;
  }
}
