:root {
  --bg: #08090b;
  --fg: #ecebe6;
  --muted: #9c9c96;
  --accent: #ff4d63;
  --accent-hot: #ff6478;
  --line: rgba(236, 235, 230, 0.2);
  --line-strong: rgba(236, 235, 230, 0.36);
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --s7: 48px;
  --s8: 64px;
  --font-mono: "Nordwand Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --size-large: clamp(2rem, 4.2vw, 3.5rem);
  --size-body: 1rem;
  --size-small: 0.875rem;
}

@font-face {
  font-family: "Nordwand Mono";
  src: url("fonts/NordwandMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Nordwand Mono";
  src: url("fonts/NordwandMono-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: var(--size-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
}

.fallback {
  display: none;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  color: var(--fg);
  z-index: 0;
}

.no-webgl .scene {
  display: none;
}

.no-webgl .fallback {
  display: block;
}

/* leader line from the defect to the contact label, drawn above the scrim
   so it stays a continuous hairline all the way into the label */
.leader {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  overflow: visible;
  shape-rendering: geometricPrecision;
}

.leader-line {
  fill: none;
  stroke: var(--line-strong);
  stroke-width: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.leader-ring {
  fill: none;
  stroke: var(--accent);
  stroke-opacity: 0.55;
  stroke-width: 1;
  transition: stroke-opacity 180ms ease-out, r 180ms ease-out;
}

.hot .leader-ring {
  stroke-opacity: 1;
  r: 7;
}

.page {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: var(--s6);
  max-width: 1240px;
  min-height: 100vh;
  margin: 0 auto;
  padding: var(--s5) var(--s5) var(--s6);
}

.page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(100deg, var(--bg) 0%, rgba(8, 9, 11, 0.95) 32%, rgba(8, 9, 11, 0) 58%);
}

.bar {
  display: flex;
  align-items: baseline;
  padding-bottom: var(--s3);
}

.mark {
  letter-spacing: 0.01em;
}

main {
  position: relative;
  display: flex;
  flex-direction: column;
}

h1 {
  margin: 0;
  max-width: 13ch;
  font-family: var(--font-mono);
  font-size: var(--size-large);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.annotation {
  position: absolute;
  left: 0;
  right: auto;
  bottom: var(--s5);
  display: grid;
  gap: var(--s1);
  justify-items: start;
}

.prompt {
  margin: 0;
  font-size: var(--size-small);
  color: var(--muted);
}

.mail {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: var(--size-body);
  text-decoration: none;
  transition: color 150ms ease-out;
}

.mail span {
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  transition: border-color 150ms ease-out;
}

.mail:hover {
  color: var(--accent-hot);
}

.mail:hover span {
  border-color: var(--accent);
}

.mail:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 4px;
}

.tag {
  margin: 0;
  font-size: var(--size-small);
  color: var(--muted);
  letter-spacing: 0.01em;
}

.tilt {
  position: fixed;
  right: var(--s5);
  bottom: var(--s5);
  z-index: 3;
  min-height: 44px;
  padding: 0 var(--s3);
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: var(--size-small);
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: color 150ms ease-out, border-color 150ms ease-out;
}

.tilt:hover {
  color: var(--fg);
  border-color: var(--line-strong);
}

.tilt:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 4px;
}

@media (max-width: 899px) {
  .page {
    grid-template-rows: auto auto auto 1fr;
  }

  .page::before {
    background: linear-gradient(180deg, var(--bg) 0%, rgba(8, 9, 11, 0.93) 34%, rgba(8, 9, 11, 0.6) 52%, rgba(8, 9, 11, 0) 70%);
  }

  .leader {
    display: none;
  }

  h1 {
    max-width: none;
  }

  .annotation {
    position: static;
    margin-top: var(--s5);
  }
}
