:root {
  --bg: #000;
  --fg: #90ee90;   /* light green */
  --dim: #5fb85f;  /* muted green */
  --pad: clamp(1.25rem, 6vw, 6rem);
  --text: 104ch;   /* width of the text column incl. padding */
  --bar: 3.2rem;   /* height of the fixed header/footer bars */
}
* { box-sizing: border-box; }
html { background: var(--bg); scroll-padding-top: 6rem; scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--fg);
  font: 16px/1.65 "Courier New", Courier, monospace;
}

/* Background graph: fixed bottom right, at most as wide as the space beside the text.
   Only the nodes react to the pointer; everything else lets clicks through. */
.wordnet {
  position: fixed;
  right: 0;
  top: var(--bar);
  width: auto;
  height: min(88vh, 900px);                    /* Breite ergibt sich aus 520:640, bei 900px etwa 730px */
  max-width: max(20rem, calc(100vw - var(--text)));
  z-index: 0;
}

header, footer {
  position: fixed;
  left: 0; right: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .15rem 1.6rem;
  padding: .7rem var(--pad);
  background: var(--bg);
}
header { top: 0; border-bottom: 1px solid var(--dim); }
footer { bottom: 0; border-top: 1px solid var(--dim); }
header nav { display: flex; flex-wrap: wrap; gap: .15rem 1.4rem; }
footer navi { display: flex; flex-wrap: wrap; gap: .15rem 1.4rem; }
.brand { font-weight: bold; text-decoration: none; }
nav a { text-decoration: none; }
nav a::before { content: "./"; color: var(--dim); }
navi a { text-decoration: none; }
navi a::before { color: var(--dim); }

a { color: var(--fg); text-decoration: underline; text-underline-offset: .2em; }
a:hover, a:focus-visible { background: var(--fg); color: var(--bg); text-decoration: none; }
a:hover::before, a:focus-visible::before { color: var(--bg); }
a:focus-visible { outline: 2px dashed var(--fg); outline-offset: 2px; }

main {
  position: relative;
  z-index: 1;
  max-width: var(--text);
  padding: 6.5rem var(--pad) calc(var(--bar) + 2rem);
}

section { margin: 0 0 3.5rem; }
h1, h2, h3 { margin: 0; font-size: 1rem; font-weight: bold; }
h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); line-height: 1.2; margin: .3rem 0 .6rem; }
h2 { margin: 0 0 1rem; }
h3 { margin: 1.8rem 0 .5rem; }
#about h2 { margin: 1.8rem 0 .5rem; }
p { margin: 0 0 1rem; }
.prompt { margin: 0; color: var(--dim); }
.prompt::before { content: "$ "; }

ul { list-style: none; margin: 0 0 1rem; padding: 0; }
li { position: relative; padding-left: 2ch; margin-bottom: .35rem; }
li::before { content: "-"; position: absolute; left: 0; color: var(--dim); }

dl { margin: 0 0 1rem; display: grid; grid-template-columns: 11ch 1fr; gap: .5rem 1ch; }
dt { color: var(--dim); }
dd { margin: 0; }

/* bibliography generated by pandoc/citeproc */
.csl-entry { margin: 0 0 .9rem; padding-left: 2ch; text-indent: -2ch; }

/* Blinking cursor behind the prompt of the section that was just linked to;
   with no link followed yet, behind the first prompt. */
section:target > .prompt::after,
body:not(:has(:target)) #about .prompt::after {
  content: "";
  display: inline-block;
  width: .6em;
  height: 1.1em;
  margin-left: .3ch;
  vertical-align: text-bottom;
  background: var(--fg);
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  section:target > .prompt::after,
  body:not(:has(:target)) #about .prompt::after { animation: none; }
}

@media (max-width: 40rem) {
  :root { --bar: 2rem; }
  html { scroll-padding-top: 7.5rem; }
  main { padding-top: 7.5rem; }
  dl { grid-template-columns: 1fr; gap: 0; }
  dd { margin-bottom: .8rem; }
  .wordnet { opacity: .7; }
}
