/* imabee — swarm
   Black field, one light source: the particles. Type stays out of their way. */

@font-face {
  font-family: "Anybody";
  src: url("/fonts/anybody.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 50% 150%;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/fonts/jetbrains-mono.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
}

:root {
  color-scheme: dark;

  --black: #070605;
  --text: #f1eadb;
  --soft: #cfc6b4;
  --mute: #a2988a;
  --line: rgb(241 234 219 / 0.16);
  --honey: #ffa81f;
  --ember: #ff6a13;

  --display: "Anybody", "Arial Black", Impact, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  --pad: clamp(1.25rem, 4vw, 4rem);
  --t-label: 0.74rem;
  --t-body: clamp(1.08rem, 0.5vw + 0.98rem, 1.32rem);
  --t-h2: clamp(2.1rem, 4.3vw, 4.5rem);

  --ease: cubic-bezier(0.2, 0.8, 0.1, 1);
  --fast: 180ms;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  background: var(--black);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--black);
  color: var(--text);
  font: 380 var(--t-body) / 1.5 var(--display);
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
h1,
h2,
p,
ol,
ul {
  margin: 0;
}
ol,
ul {
  padding: 0;
  list-style: none;
}
a {
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--honey);
  outline-offset: 4px;
}
::selection {
  background: var(--honey);
  color: var(--black);
}

#swarm {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100lvh;
  display: block;
  opacity: 0;
  transition: opacity 1.4s var(--ease);
  touch-action: pan-y;
}
.gl #swarm {
  opacity: 1;
}

.label,
.top,
.rail span,
.role,
.hint,
.projects i,
.links span,
.sign {
  font: 500 var(--t-label) / 1.4 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.label {
  color: var(--honey);
}

.skip {
  position: fixed;
  left: var(--pad);
  top: 0.75rem;
  z-index: 30;
  padding: 0.8rem 1rem;
  background: var(--honey);
  color: var(--black);
  font: 600 var(--t-label) / 1 var(--mono);
  text-transform: uppercase;
  transform: translateY(-300%);
}
.skip:focus {
  transform: none;
}

/* chrome */
.top {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem var(--pad);
  pointer-events: none;
}
.top a {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  text-decoration: none;
  transition: color var(--fast) var(--ease);
}
.top a:hover,
.top a[aria-current] {
  color: var(--honey);
}
.top nav {
  display: flex;
  gap: clamp(1.1rem, 3vw, 2.5rem);
}
.mark {
  font: 800 1.05rem/1 var(--display);
  font-stretch: 140%;
  letter-spacing: 0;
  text-transform: none;
}

.rail {
  position: fixed;
  right: calc(var(--pad) - 0.5rem);
  top: 50%;
  z-index: 20;
  display: flex;
  flex-direction: column;
  transform: translateY(-50%);
}
.rail a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 1.75rem;
  padding-right: 1.4rem;
  text-decoration: none;
}
.rail a::after {
  content: "";
  position: absolute;
  right: 0.4rem;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--mute);
  transition:
    transform var(--fast) var(--ease),
    background var(--fast) var(--ease);
}
.rail a[aria-current]::after,
.rail a:hover::after {
  background: var(--honey);
  transform: scale(2);
}
.rail span {
  color: var(--text);
  opacity: 0;
  transform: translateX(6px);
  transition:
    opacity var(--fast) var(--ease),
    transform var(--fast) var(--ease);
  white-space: nowrap;
}
.rail a:hover span,
.rail a:focus-visible span {
  opacity: 1;
  transform: none;
}

/* sections */
main {
  position: relative;
  z-index: 10;
}
section {
  min-height: 100svh;
  padding: 6rem var(--pad);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero {
  position: relative;
  justify-content: flex-end;
  padding-bottom: clamp(2rem, 6vh, 4rem);
}
.hero h1 {
  font: 900 clamp(2.6rem, 13.5vw, 14rem) / 0.82 var(--display);
  font-stretch: 150%;
  letter-spacing: -0.03em;
  color: var(--honey);
  margin-bottom: auto;
  padding-top: 18vh;
}
/* the swarm writes the name, so the type steps aside (still read aloud) */
.gl .hero h1 {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.role {
  color: var(--honey);
  margin-bottom: 1rem;
}
.lede {
  max-width: 19em;
  font-size: clamp(1.5rem, 3vw, 2.9rem);
  font-weight: 320;
  font-stretch: 112%;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.hint {
  position: absolute;
  right: calc(var(--pad) + 2.5rem);
  bottom: clamp(2rem, 6vh, 4rem);
  color: var(--mute);
  transition: opacity 0.6s var(--ease);
}
html:not(.gl) .hint,
.struck .hint {
  opacity: 0;
}
.coarse {
  display: none;
}

.copy {
  width: min(100%, 38rem);
}
.wide .copy {
  width: min(100%, 44rem);
}
.copy > * + * {
  margin-top: 1.4rem;
}
h2 {
  font: 850 var(--t-h2) / 0.9 var(--display);
  font-stretch: 150%;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  text-wrap: balance;
  margin-top: 0.9rem !important;
}
.copy p:not(.label) {
  color: var(--soft);
  max-width: 31em;
  text-wrap: pretty;
}

/* work */
.projects {
  margin-top: 2.2rem !important;
  border-top: 1px solid var(--line);
}
.projects a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.1rem 1.5rem;
  align-items: baseline;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition:
    color var(--fast) var(--ease),
    padding var(--fast) var(--ease);
}
.projects b {
  font: 750 clamp(1.25rem, 2vw, 1.7rem) / 1.1 var(--display);
  font-stretch: 125%;
  letter-spacing: -0.015em;
  overflow-wrap: anywhere;
}
.projects span {
  grid-column: 1;
  color: var(--soft);
  font-size: 0.98rem;
  line-height: 1.4;
}
.projects i {
  grid-column: 2;
  grid-row: 1;
  color: var(--mute);
  font-style: normal;
}
.projects a:hover,
.projects a:focus-visible {
  color: var(--honey);
}
.projects a:hover b,
.projects a:focus-visible b {
  transform: translateX(0.5rem);
}
.projects b {
  display: block;
  transition: transform var(--fast) var(--ease);
}
.now {
  margin-top: 2rem !important;
}
.now .label {
  display: block;
  margin-bottom: 0.3rem;
}

/* contact */
.links {
  margin-top: 2rem !important;
}
.links a {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 0.55rem 0;
  text-decoration: none;
}
.links b {
  font: 850 clamp(2.2rem, 6.2vw, 5.6rem) / 0.98 var(--display);
  font-stretch: 150%;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--text);
  transition:
    color var(--fast) var(--ease),
    -webkit-text-stroke-color var(--fast) var(--ease);
}
.links a:hover b,
.links a:focus-visible b {
  color: var(--honey);
  -webkit-text-stroke-color: var(--honey);
}
.links span {
  color: var(--mute);
}
.sign {
  margin-top: 3rem !important;
  color: var(--mute) !important;
}

/* about and 404 share the plain column */
.page {
  min-height: 100svh;
  padding: 7rem var(--pad) 5rem;
  display: block;
}
.page h1 {
  font: 900 clamp(2.8rem, 9.5vw, 9rem) / 0.86 var(--display);
  font-stretch: 150%;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.page h1 em {
  font-style: normal;
  color: var(--honey);
}
.page .lede {
  margin-top: 2.5rem;
  max-width: 24em;
}
.page section {
  min-height: 0;
  padding: 0;
  margin-top: clamp(3.5rem, 8vw, 6rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 1rem clamp(1.5rem, 4vw, 4rem);
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}
.page section h2 {
  font: 500 var(--t-label) / 1.4 var(--mono);
  font-stretch: 100%;
  letter-spacing: 0.14em;
  color: var(--honey);
  margin: 0 !important;
}
.page section > div > * + * {
  margin-top: 1.1rem;
}
.page section p {
  color: var(--soft);
  max-width: 34em;
}
.page section p strong {
  color: var(--text);
  font-weight: 650;
}
.page .projects,
.page .links {
  margin-top: 0 !important;
}
.page a:not(.projects a, .links a) {
  color: var(--honey);
  text-underline-offset: 0.2em;
}
.lost {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.lost p {
  margin-top: 1.5rem;
  color: var(--soft);
  max-width: 28em;
}
.lost .go {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  margin-top: 1rem;
  font: 600 var(--t-label) / 1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

@view-transition {
  navigation: auto;
}
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 260ms;
  animation-timing-function: var(--ease);
}

@media (hover: none) {
  .fine {
    display: none;
  }
  .coarse {
    display: inline;
  }
}

/* portrait: the swarm takes the top of the screen, the copy the bottom */
@media (max-aspect-ratio: 9/10), (max-width: 46rem) {
  .rail {
    display: none;
  }
  .beat {
    min-height: 135svh;
    justify-content: flex-end;
    padding-bottom: 14svh;
  }
  .beat.wide {
    min-height: 0;
    padding-top: 62svh;
  }
  .copy {
    padding: 1.25rem 0 0;
    background: linear-gradient(rgb(7 6 5 / 0), rgb(7 6 5 / 0.82) 3rem);
  }
  .hint {
    position: static;
    margin-top: 1.5rem;
  }
  .hero h1 {
    padding-top: 14vh;
  }
  .page section {
    grid-template-columns: minmax(0, 1fr);
  }
  .projects a {
    grid-template-columns: minmax(0, 1fr);
  }
  .projects i {
    grid-column: 1;
    grid-row: auto;
    margin-top: 0.3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
  }
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none;
  }
  /* the swarm holds still here, so it makes no promise about being hit */
  .hint {
    display: none;
  }
}
