/* The highlighter nav: a row of serif links on a white page, a yellow mark on the current one and the pen that draws it. */
:root {
  --page: #ffffff;          /* the page */
  --ink: #141414;           /* the current link, and the one pointed at */
  --muted: #5a5853;         /* the other links */
  --mark: #ffe45c;          /* the highlighter's ink */
  --mark-edge: #f3c623;     /* the ink that gathers along the edges of a stroke */
  --pen: #ffd60a;           /* the pen */
  --pen-dark: #1f1f1f;
}

* {
  box-sizing: border-box;
}

/* a tap is a click at once: no wait for a double tap */
html {
  touch-action: manipulation;
}

html,
body {
  margin: 0;
  overflow-x: clip;
}

body {
  min-height: 100svh;
  background: var(--page);
  color: var(--ink);
  font-family: 'Petrona Variable', Georgia, serif;
  -webkit-font-smoothing: antialiased;
}

.stage {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 120px 16px 48px;
}

.hl {
  position: relative;
  font-size: clamp(19px, 2.3vw, 27px);
}

.hl__list {
  position: relative;
  z-index: 1;
  display: flex;
  gap: clamp(14px, 3.4vw, 40px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.hl__link {
  display: block;
  padding: 12px 6px;
  color: var(--muted);
  font-weight: 460;
  letter-spacing: -0.01em;
  text-decoration: none;
  border-radius: 6px;
  transition: color 0.3s ease;
  -webkit-tap-highlight-color: transparent;
}

.hl__link[aria-current='page'] {
  color: var(--ink);
}

@media (hover: hover) {
  .hl__link:hover {
    color: var(--ink);
  }
}

.hl__link:focus {
  outline: none;
}

.hl__link:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

/* the marks lie on the paper, under the words */
.hl__marks {
  position: absolute;
  inset: 0;
  overflow: visible;
  pointer-events: none;
}

.mark__ink {
  fill: var(--mark);
}

.mark__streak {
  fill: none;
  stroke: #ffffff;
  stroke-width: 1;
  stroke-linecap: round;
  opacity: 0.32;
}

.mark__rim {
  fill: none;
  stroke: var(--mark-edge);
  stroke-width: 1.5;
  stroke-linecap: round;
}

/* the pen and its shadow: boxes of no size, at the point of the tip, with the drawing hanging above it. Each on a
   layer of its own: moved on the page, Safari leaves traces of the blurred shadow behind */
.hl__pen,
.hl__shadow {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  transform-origin: 0 0;
  pointer-events: none;
  will-change: transform;
}

.hl__pen {
  z-index: 2;
}

.hl__bob {
  position: absolute;
  left: -0.62em;
  top: -4.96em;
  width: 1.24em;
  height: 4.96em;
  transform-origin: 50% 100%;
}

.hl__shadow svg,
.hl__bob svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.hl__shadow svg {
  position: absolute;
  left: -0.62em;
  top: -4.96em;
  width: 1.24em;
  height: 4.96em;
  fill: #000000;
  filter: blur(3px);
}

.pen__tip {
  fill: var(--mark-edge);
}

.pen__collar,
.pen__cap {
  fill: var(--pen-dark);
}

.pen__ring {
  fill: #3a3a3a;
}

.pen__body {
  fill: var(--pen);
}

.pen__grip {
  fill: none;
  stroke: color-mix(in srgb, var(--pen) 70%, #000000);
  stroke-width: 1.2;
  stroke-linecap: round;
}

.pen__label {
  fill: #ffffff;
  opacity: 0.88;
}

.pen__sheen {
  fill: #ffffff;
  opacity: 0.55;
}
