/* Noud Savenije — homepage.
   System fonts only: no webfont means no third-party request, which is the
   point the colophon makes. Light and dark are both first-class. */

:root {
  --paper:   #fcfcfa;
  --ink:     #16181c;
  --muted:   #5c6068;
  --rule:    #e3e2dd;
  --accent:  #1c6b58;
  --accent-soft: rgba(28, 107, 88, 0.10);
  --graph:   #c9cdc8;

  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
          "Liberation Mono", monospace;

  --measure: 40rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:   #0f1216;
    --ink:     #e7e9ec;
    --muted:   #979ca5;
    --rule:    #262b32;
    --accent:  #5cc7a8;
    --accent-soft: rgba(92, 199, 168, 0.12);
    --graph:   #333a43;
  }
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--paper);
  padding: 0.6rem 1rem;
  z-index: 10;
}
.skip:focus { left: 0; }

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover { text-decoration-thickness: 2px; }

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

/* ---------- hero ---------- */

.hero {
  position: relative;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 5.5rem 1.5rem 3rem;
  overflow: hidden;
}

.hero-graph {
  position: absolute;
  top: 1.5rem;
  right: -3rem;
  width: 26rem;
  max-width: 70%;
  opacity: 0.5;
  pointer-events: none;
}

.graph-edges path {
  fill: none;
  stroke: var(--graph);
  stroke-width: 1.25;
}
.graph-arrow { fill: var(--graph); }
.graph-nodes circle {
  fill: var(--paper);
  stroke: var(--graph);
  stroke-width: 1.5;
}
.graph-nodes .graph-node-end {
  fill: var(--accent);
  stroke: var(--accent);
}

.hero-text { position: relative; }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1.25rem;
}

h1 {
  font-size: clamp(1.9rem, 5.2vw, 2.85rem);
  line-height: 1.14;
  letter-spacing: -0.021em;
  font-weight: 640;
  margin: 0 0 1.25rem;
  max-width: 19ch;
}

.lede {
  font-size: 1.1875rem;
  color: var(--muted);
  margin: 0;
  max-width: 46ch;
}

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

main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 3rem 0;
  border-top: 1px solid var(--rule);
}

h2 {
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin: 0 0 1.5rem;
}

h3 {
  font-size: 1.1875rem;
  letter-spacing: -0.01em;
  margin: 0 0 0.35rem;
}

p { margin: 0 0 1.15rem; }
p:last-child { margin-bottom: 0; }

/* ---------- work items ---------- */

.item + .item {
  margin-top: 2.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--rule);
}

.item-meta {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--muted);
  margin: 0 0 0.9rem;
}

.tag {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 0.1rem 0.45rem;
  border-radius: 3px;
  margin-right: 0.5rem;
}

.post-link {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.9rem;
  align-items: baseline;
  padding: 0.9rem 1.1rem;
  background: var(--accent-soft);
  border-radius: 6px;
  margin-bottom: 0;
}
.post-link time {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
}

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

.linklist {
  list-style: none;
  margin: 0;
  padding: 0;
}
.linklist li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.9rem;
  align-items: baseline;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--rule);
}
.linklist li:first-child { padding-top: 0; }
.linklist a { font-weight: 550; }
.linklist span {
  color: var(--muted);
  font-size: 0.9375rem;
}

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

footer {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
  color: var(--muted);
  font-size: 0.875rem;
  border-top: 1px solid var(--rule);
}
footer p { margin: 0; }

@media (max-width: 34rem) {
  .hero { padding-top: 3.5rem; }
  .hero-graph { opacity: 0.25; right: -5rem; }
}
