/* THE DOCK: what stays at the top of the screen. The menu on the left, the ball of thread and "Say hi" on the right. */

/* the top of the page: only a menu on the left and "Say hi" on the right, no bar behind them. The headline and the figure are the page */
.dock {
  position: fixed;
  z-index: 10;
  left: 0;
  right: 0;
  top: calc(20px + env(safe-area-inset-top, 0px));
  height: 44px;
  pointer-events: none;
  padding-left: max(24px, 2.6vw, env(safe-area-inset-left, 0px));
  padding-right: max(24px, 2.6vw, env(safe-area-inset-right, 0px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  font:
    500 14.5px/1 Archivo,
    'Arial Narrow',
    Arial,
    sans-serif;
  font-stretch: 104%;
}
.dock > * {
  pointer-events: auto;
}
:where(.dock) :where(button, a) {
  all: unset;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
} /* a reset with no weight of its own, so the rules below win */
.dock button:focus-visible,
.dock a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
  border-radius: 6px;
}
/* the menu: three lines. Hover them and each line runs out to the right and becomes the underline of a word, Work, About, Resume, which rise in above it.
   Leave, and the words sink back and the lines run home. No box, no shadow: just the lines and the words */
.menuwrap {
  position: relative;
  display: flex;
  align-items: center;
  height: 44px;
  margin-left: -10px;
  padding-right: 24px;
}
.menu {
  position: relative;
  width: 44px;
  height: 44px;
  flex: none;
}
.menu i {
  position: absolute;
  left: 11px;
  height: 1.6px;
  width: 22px;
  border-radius: 2px;
  background: var(--ink);
  transform-origin: 0 50%;
  transition:
    transform 0.55s cubic-bezier(0.3, 0.7, 0.2, 1),
    opacity 0.35s ease,
    background-color 0.4s ease;
}
.menu i:nth-child(1) {
  top: 15px;
  transform: scaleX(1);
}
.menu i:nth-child(2) {
  top: 21px;
  transform: scaleX(0.68);
}
.menu i:nth-child(3) {
  top: 27px;
  transform: scaleX(0.86);
}
.menuwrap.open .menu i {
  transform: translate(var(--x), var(--y)) scaleX(var(--s));
  opacity: 0;
  transition:
    transform 0.55s cubic-bezier(0.3, 0.7, 0.2, 1),
    opacity 0.25s ease 0.42s;
} /* each line runs to its word and stretches to the word's width, then lets the word take over */
.menuwrap.open .menu i:nth-child(2) {
  transition-delay: 0.04s, 0.46s;
}
.menuwrap.open .menu i:nth-child(3) {
  transition-delay: 0.08s, 0.5s;
}
.words {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: 10px;
  pointer-events: none;
}
.words a {
  position: relative;
  font:
    500 15px/1 Archivo,
    'Arial Narrow',
    Arial,
    sans-serif;
  font-stretch: 104%;
  color: var(--ink);
  padding: 8px 0;
  opacity: 0;
  transform: translateY(7px);
  transition:
    opacity 0.3s ease,
    transform 0.4s cubic-bezier(0.3, 0.7, 0.2, 1),
    color 0.2s;
}
.words a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  height: 1.6px;
  border-radius: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.3s cubic-bezier(0.3, 0.7, 0.2, 1);
}
.menuwrap.open .words {
  pointer-events: auto;
}
.menuwrap.pin .words {
  margin-left: -34px;
} /* open by itself on the first screen, the words stand where the lines were, on the page's left edge, in line with the headline */
.menuwrap.open .words a {
  opacity: 1;
  transform: none;
  transition-delay: 0.22s, 0.22s, 0s;
}
.menuwrap.open .words a:nth-child(3) {
  transition-delay: 0.27s, 0.27s, 0s;
}
.menuwrap.open .words a:nth-child(4) {
  transition-delay: 0.32s, 0.32s, 0s;
}
.dock.attop .words .hm {
  display: none;
} /* "Home" is offered once you have left the first screen: inside the story, or down at the work */
.words a:hover,
.words a:focus-visible {
  color: var(--blue);
}
.words a:hover::after,
.words a:focus-visible::after {
  transform: scaleX(1);
} /* the line comes back under the word you point at */
/* the ball of blue thread, top right: loops of thread wound on a ball, always turning. Its thread has run out and drawn a "Say hi" pill beside it from the start, so the way to write is never hidden.
   The button is only that blue outline with the words in ink, so it never competes with the blue headline; under the pointer the blue rises up into it */
.hiwrap {
  position: relative;
  display: flex;
  align-items: center;
  height: 56px;
  padding-left: 6px;
}
.yarn {
  position: relative;
  width: 56px;
  height: 56px;
  margin-right: -6px;
  flex: none;
  cursor: pointer;
}
.yarn canvas {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 132px;
  height: 132px;
  margin: -66px 0 0 -66px;
  pointer-events: none;
} /* drawn bigger than the ball, so its loose end can swing free */
.wind {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.wind path {
  fill: none;
  stroke: var(--blue);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.hi {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  height: 38px;
  padding: 0 17px;
  display: flex;
  align-items: center;
  border-radius: 999px;
  color: var(--ink);
  font-weight: 600;
  transition: color 0.3s ease;
  white-space: nowrap;
  margin-right: 6px;
  pointer-events: none;
}
.hi::before {
  content: '';
  position: absolute;
  inset: -1px;
  z-index: -1;
  background: var(--blue);
  border-radius: 0;
  transform: translateY(102%);
  transition: transform 0.45s cubic-bezier(0.3, 0.7, 0.2, 1);
} /* the fill waits below the button and rises into it under the pointer */
.hiwrap.shown .hi:hover,
.hiwrap.shown .hi:focus-visible {
  color: #fff;
}
.hiwrap.shown .hi:hover::before,
.hiwrap.shown .hi:focus-visible::before {
  transform: none;
}
.hi span {
  opacity: 0;
  transform: translateX(6px);
  transition:
    opacity 0.25s ease,
    transform 0.35s cubic-bezier(0.3, 0.7, 0.2, 1);
}
.hiwrap.shown .hi {
  pointer-events: auto;
}
.hi.full span {
  opacity: 1;
  transform: none;
  transition-delay: 0.05s;
}
/* once the big ball of thread has landed on the work, there is only that one ball on the page: up here the small one folds away and the button stays out on its own,
   outlined in ink; blue still rises into it under the pointer */
.yarn {
  transition:
    opacity 0.3s ease,
    width 0.45s cubic-bezier(0.3, 0.7, 0.2, 1),
    margin 0.45s cubic-bezier(0.3, 0.7, 0.2, 1);
}
.wind {
  transition: opacity 0.3s ease;
}
.dock::before {
  content: '';
  position: absolute;
  z-index: -1;
  left: 0;
  right: 0;
  top: calc(-20px - env(safe-area-inset-top, 0px));
  height: calc(100% + 46px + env(safe-area-inset-top, 0px));
  background: linear-gradient(var(--paper) 62%, rgba(246, 244, 239, 0));
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}
.dock.solo::before {
  opacity: 1;
} /* over the work, the bar stands on a strip of paper that fades out below it, so cards and titles scroll under it without tangling with the menu */
.dock.solo .yarn {
  width: 0;
  margin-right: 0;
  opacity: 0;
  pointer-events: none;
}
.dock.solo .wind {
  opacity: 0;
}
.dock.solo .hi {
  margin-right: 0;
  box-shadow: inset 0 0 0 1.4px var(--ink);
} /* with the ball gone, the outline is drawn by the button itself, in ink */
/* inside, the menu comes back in white so there is always a way out; the ball of thread stays on the first screen */
.dock.inhead {
  --ink: #f6f4ef;
}
.hiwrap {
  transition: opacity 0.6s ease;
}
.dock.noball .hiwrap {
  opacity: 0;
}
.dock.noball .hiwrap,
.dock.noball .hiwrap * {
  pointer-events: none;
}
.dock.inhead .words a:hover,
.dock.inhead .words a:focus-visible {
  color: var(--ink);
}
.dock.hush .words a:hover {
  color: var(--ink);
}
.dock.hush .words a:hover::after {
  transform: scaleX(0);
} /* just after a jump the words have moved under a pointer that has not: the word that slid under it is not lit until the pointer moves again */
@media (max-width: 760px) {
  .words {
    gap: 18px;
  }
  .words a {
    font-size: 14px;
  }
  .dock {
    top: calc(12px + env(safe-area-inset-top, 0px));
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
    font-size: 13.5px;
  }
  .hi {
    height: 36px;
    padding: 0 14px;
  }
}
