:root {
  --bg: #fcfcfb;
  --fg: #16171b;
  --muted: #5d5f68;
  /* --faint sits on the smallest text (10.9px tags and labels); keep it >=4.5:1 on --bg */
  --faint: #6e707a;
  --accent: #2f6a52;
  --border: #e7e6e2;
  --hover: #f4f3f0;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111317;
    --fg: #eaebee;
    --muted: #9a9ca6;
    --faint: #868993;
    --accent: #6fc39b;
    --border: #23262d;
    --hover: #181b21;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 600px;
  margin: 0 auto;
  padding: 5rem 1.5rem 4rem;
}

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

h1 {
  font-size: 1.6rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  margin: 0 0 0.3rem;
}

.role {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0 0 1.5rem;
}

.lede {
  color: var(--muted);
  margin: 0;
  font-size: 1rem;
}

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

.built {
  margin-top: 3.25rem;
}

h2 {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--faint);
  margin: 0 0 0.5rem;
}

/* ---------------- rows ---------------- */

.row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.15rem 0.9rem;
  margin: 0 -0.9rem;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
}

/* sibling selector, not :first-of-type. Rows alternate <a>/<div>, so
   :first-of-type cleared the border on the first of EACH tag type. */
.row + .row {
  border-top: 1px solid var(--border);
}

a.row {
  transition: background 0.18s ease;
}

a.row:hover,
a.row:focus-visible {
  background: var(--hover);
}

.row-main {
  display: block;
  flex: 1;
  min-width: 0;
}

.row-title {
  display: block;
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: -0.005em;
  margin-bottom: 0.2rem;
}

.row-title em {
  font-style: italic;
  font-weight: 600;
}

a.row:hover .row-title,
a.row:focus-visible .row-title {
  color: var(--accent);
}

.go {
  display: inline-block;
  color: var(--accent);
  font-size: 0.82em;
  opacity: 0;
  transform: translate(-3px, 2px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

/* keyboard users need the same affordance mouse users get */
a.row:hover .go,
a.row:focus-visible .go {
  opacity: 1;
  transform: none;
}

.row-desc {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.row-tag {
  flex: none;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  padding-top: 0.22rem;
  white-space: nowrap;
}

.row-tag.is-live {
  color: var(--accent);
}

.row-tag.is-live::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  margin-right: 0.4rem;
  vertical-align: 0.08em;
}

.row-tag.is-wip {
  color: var(--faint);
}

@media (max-width: 480px) {
  .row {
    flex-direction: column;
    gap: 0.45rem;
  }
  .row-tag {
    order: -1;
    padding-top: 0;
  }
  .go {
    opacity: 1;
    transform: none;
  }
}

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

footer {
  margin-top: 3.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.elsewhere {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0 0 1.5rem;
}

.contact {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin: 0;
  font-size: 0.92rem;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.contact a,
.elsewhere a {
  border-bottom-color: color-mix(in srgb, var(--accent) 35%, transparent);
}

.contact a:hover,
.elsewhere a:hover {
  border-bottom-color: currentColor;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ---------------- motion ---------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .go {
    opacity: 1;
    transform: none;
  }
}

/* ---------------- print ---------------- */

@media print {
  :root {
    --bg: #fff;
    --fg: #000;
    --muted: #333;
    --faint: #555;
    --accent: #000;
    --border: #bbb;
    --hover: transparent;
  }
  main {
    max-width: none;
    padding: 0;
  }
  .row {
    break-inside: avoid;
  }
  .go {
    display: none;
  }
  /* a printed page loses hrefs, so write them out */
  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
    color: #555;
    word-break: break-all;
  }
}
