@font-face {
  font-family: "Schibsted Grotesk";
  src: url("/fonts/schibsted-grotesk.woff2") format("woff2-variations");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --paper: #f5f6f4;
  --ink: #17191c;
  --soft: #41464c;
  --rule: #cfd4d8;
  --accent: #2a43c4;
  --sans: "Schibsted Grotesk", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

html {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

body { margin: 0; }

::selection { background: var(--accent); color: var(--paper); }

a { color: inherit; }

.page {
  max-width: 64rem;
  margin: 0 auto;
  padding: clamp(3rem, 12vh, 8rem) clamp(1rem, 5vw, 3rem) clamp(2.5rem, 8vh, 5rem);
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

/* Name on the left, the graph mark on the right. */
.head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 2rem;
}

h1 {
  margin: 0;
  font-size: clamp(2.75rem, 8vw, 5.5rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.035em;
}

.intro {
  margin: 1rem 0 0;
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  color: var(--soft);
  max-width: 48ch;
  text-wrap: balance;
}

/* Graph mark: Lance as a node, an edge to each link below. */
.graph {
  width: clamp(200px, 26vw, 300px);
  height: auto;
  overflow: visible;
}
.edge { fill: none; stroke: var(--rule); stroke-width: 1.5; transition: stroke 300ms var(--ease); }
.run {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 16 100;
  stroke-dashoffset: 16;
  opacity: 0;
}
.me { fill: var(--ink); }
.me-label { fill: var(--paper); font: 700 17px var(--sans); text-anchor: middle; letter-spacing: -0.02em; }
.node circle { fill: var(--paper); stroke: var(--ink); stroke-width: 1.5; transition: fill 300ms var(--ease), stroke 300ms var(--ease); }
.node text { fill: var(--soft); font: 500 14px var(--sans); transition: fill 300ms var(--ease); }

/* Hovering or focusing a link lights its edge and sends a pulse along it. */
.page:has(a[data-node="sp"]:is(:hover, :focus-visible)) .edge.g-sp,
.page:has(a[data-node="spoqe"]:is(:hover, :focus-visible)) .edge.g-spoqe,
.page:has(a[data-node="mustrd"]:is(:hover, :focus-visible)) .edge.g-mustrd {
  stroke: var(--accent);
}
.page:has(a[data-node="sp"]:is(:hover, :focus-visible)) .node.g-sp circle,
.page:has(a[data-node="spoqe"]:is(:hover, :focus-visible)) .node.g-spoqe circle,
.page:has(a[data-node="mustrd"]:is(:hover, :focus-visible)) .node.g-mustrd circle {
  fill: var(--accent);
  stroke: var(--accent);
}
.page:has(a[data-node="sp"]:is(:hover, :focus-visible)) .node.g-sp text,
.page:has(a[data-node="spoqe"]:is(:hover, :focus-visible)) .node.g-spoqe text,
.page:has(a[data-node="mustrd"]:is(:hover, :focus-visible)) .node.g-mustrd text {
  fill: var(--accent);
}
.page:has(a[data-node="sp"]:is(:hover, :focus-visible)) .run.g-sp,
.page:has(a[data-node="spoqe"]:is(:hover, :focus-visible)) .run.g-spoqe,
.page:has(a[data-node="mustrd"]:is(:hover, :focus-visible)) .run.g-mustrd {
  animation: run 700ms var(--ease) forwards;
}
@keyframes run {
  from { stroke-dashoffset: 16; opacity: 1; }
  to { stroke-dashoffset: -100; opacity: 1; }
}

.links {
  list-style: none;
  margin: clamp(3rem, 9vh, 5.5rem) 0 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}
.links li { border-bottom: 1px solid var(--rule); }
.links a {
  display: grid;
  grid-template-columns: minmax(10rem, 16rem) 1fr auto;
  align-items: baseline;
  gap: 0.5rem 2rem;
  padding: clamp(1.25rem, 3vh, 1.75rem) 0;
  text-decoration: none;
  outline: none;
}
.name {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  transition: color 300ms var(--ease);
}
.what { color: var(--soft); max-width: 52ch; text-wrap: pretty; }
.host {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-weight: 500;
  white-space: nowrap;
  transition: color 300ms var(--ease);
}
.host svg {
  width: 1.1em;
  height: 1.1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  transition: transform 300ms var(--ease);
}
.links a:is(:hover, :focus-visible) :is(.name, .host) { color: var(--accent); }
.links a:is(:hover, :focus-visible) .host svg { transform: translateX(0.25em); }
.links a:focus-visible .name { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.15em; }

.foot {
  margin-top: auto;
  padding-top: clamp(3rem, 10vh, 6rem);
  display: grid;
  gap: 1.5rem;
}
.mail {
  justify-self: start;
  font-size: 1.125rem;
  font-weight: 500;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
  transition: color 300ms var(--ease);
}
.mail:hover { color: var(--accent); }
.mail:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.ttl {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, max-content);
  gap: 1.25rem 3rem;
  color: var(--soft);
}
.ttl pre {
  margin: 0;
  font: 0.8125rem/1.6 var(--mono);
  white-space: pre;
  overflow-x: auto;
}
.ttl-prefix { grid-column: 1 / -1; }

/* 404 */
.lost .intro + .home { display: inline-block; margin-top: 1.5rem; font-weight: 500; text-underline-offset: 0.2em; }
.lost .home:hover { color: var(--accent); }
.lost .home:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

@media (max-width: 720px) {
  .head { grid-template-columns: 1fr; gap: 1.5rem; }
  .graph { width: min(220px, 64vw); }
  .ttl { grid-template-columns: 1fr; gap: 1rem; }
  .ttl pre { font-size: 0.75rem; }
  .links a { grid-template-columns: 1fr; gap: 0.35rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
