body {
  margin: 0;
  padding: 48px;
  background: #ffffff;
  color: #111111;
  font-family: "Times New Roman", Times, serif;
  font-size: 24px;
  line-height: 30px; /* the same for every word: lower it to tighten */
}

h1 {
  display: flex; /* so Colin's line is exactly one line-height tall */
  margin: 0;
  font-size: inherit;
  font-weight: 400;
}

nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

a {
  color: #111111;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Every word sits on its own line; line-height sets how far apart they are */
.plain,
.offset {
  display: inline-block;
}

/* work and services: classic blue links that never turn purple */
.plain,
.plain:visited {
  color: #0000ee;
  font-size: 20px;
  font-style: italic;
  text-decoration: underline;
}

/* Offset-print words: Colin and Shop */
.offset {
  --front: #ff3700;
  --back: #0400ff;
  position: relative;
  z-index: 0; /* keeps the ::before copy tucked behind this word only */
  color: var(--front);
  font-family: "Arial Black", "Arial Bold", Gadget, sans-serif;
  font-weight: 900;
}

/* Offset words keep their own colors after being visited too */
.offset:visited {
  color: var(--front);
}

.offset::before {
  content: attr(data-text);
  position: absolute;
  left: 1px;
  z-index: -1;
  color: var(--back);
}

.offset--up::before {
  top: -1px;
}

.offset--down::before {
  top: -1px;
}

/* Shop's underline: the script in index.html switches it on and off once a second */
.offset--down {
  text-decoration: underline;
  text-decoration-thickness: 3px;
}

.offset--down.underline-off {
  text-decoration-line: none;
}

/* ---------- Bio (opens when Colin is clicked) ---------- */

/* Offset words are always 24px, even inside smaller text like the bio */
.offset {
  font-size: 24px;
}

.bio {
  width: 420px;
  max-width: 100%;
  margin-top: 30px; /* one line below services */
  font-size: 20px;
  line-height: 25px;
}

.bio[hidden] {
  display: none;
}

/* Text runs all the way to both edges of the block, with hyphenation like InDesign */
.bio p {
  margin: 0;
  text-align: justify;
  -webkit-hyphens: auto;
  hyphens: auto;
}

/* Images dropped by "add poop": small, scattered over the bio */
.bio {
  position: relative;
}

.dropped {
  position: absolute;
  max-width: 90px;
  max-height: 90px;
  pointer-events: none; /* clicks pass through, so "add poop" always works */
}

/* Links inside the bio text: plain blue link style */
.bio-link,
.bio-link:visited {
  color: #0000ee;
  text-decoration: underline;
}

/* "add poop": two empty lines below the bio */
.bio-buttons {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-top: 50px; /* two lines */
}

.bio-button {
  padding: 0;
  border: 0;
  background: none;
  color: #0000ee;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

/* Colin and Shop share the first line */
.masthead {
  display: flex;
  flex-wrap: nowrap; /* never let Shop drop to the next line */
  align-items: baseline;
  white-space: nowrap;
  gap: 0.3em; /* one word space between Colin and Shop */
}
