@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/bricolage-grotesque-latin-wght.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --night: #020a11;
  --shallows: #03141c;
  --foam: #e6fff9;
  --mist: #9fd3cc;
  --glow: #2ef2e0;
  --mint: #3dffa2;
  --kite: #ffb11f;
  --pad: clamp(1.25rem, 6vw, 6rem);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--night);
}

body {
  margin: 0;
  font-family: "Bricolage Grotesque", ui-rounded, "Avenir Next", "Segoe UI", system-ui, sans-serif;
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--foam);
  background: var(--night);
}

h1,
h2,
h3,
p,
ul {
  margin: 0;
}

:focus-visible {
  outline: 3px solid var(--kite);
  outline-offset: 4px;
  border-radius: 4px;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 38rem;
  overflow: hidden;
  background: var(--night);
}

#scene {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.glyph {
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

.sea {
  fill: var(--glow);
  font-weight: 600;
}

.tail {
  font-weight: 700;
}

.grid {
  fill: none;
  stroke: var(--glow);
  stroke-width: 1;
  opacity: 0.2;
}

.hero-copy {
  position: relative;
  width: fit-content;
  max-width: 100%;
  padding: clamp(2.25rem, 11vh, 7rem) var(--pad) 0;
}

h1 {
  font-size: clamp(3.25rem, 9vw, 7.5rem);
  font-weight: 800;
  line-height: 0.86;
  letter-spacing: -0.035em;
  text-shadow: 0 0 2.5rem rgb(46 242 224 / 0.28);
}

h1 span {
  display: block;
}

.tagline {
  max-width: 30ch;
  margin-top: 0.9em;
  font-size: clamp(1.125rem, 1.7vw, 1.5rem);
  font-weight: 500;
  line-height: 1.3;
  color: #c4f1ea;
  text-wrap: balance;
}

.motion-toggle {
  position: absolute;
  right: max(1rem, env(safe-area-inset-right));
  bottom: 1rem;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  color: var(--glow);
  background: rgb(2 10 17 / 0.6);
  border: 1.5px solid rgb(46 242 224 / 0.55);
  border-radius: 50%;
  cursor: pointer;
}

.motion-toggle[hidden] {
  display: none;
}

.motion-toggle:hover {
  background: rgb(46 242 224 / 0.16);
}

.motion-toggle svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: currentColor;
}

.motion-toggle .icon-play,
.motion-toggle[data-state="paused"] .icon-pause {
  display: none;
}

.motion-toggle[data-state="paused"] .icon-play {
  display: block;
}

/* ---------- below the waterline ---------- */

main {
  padding: clamp(3.5rem, 9vw, 7rem) var(--pad) clamp(3rem, 7vw, 5rem);
  background: linear-gradient(var(--shallows), var(--night));
}

.band {
  display: grid;
  gap: 1.5rem;
  max-width: 62rem;
}

.band + .band {
  margin-top: clamp(4rem, 9vw, 7rem);
}

@media (min-width: 52rem) {
  .band {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    gap: 3rem;
  }
}

h2 {
  font-size: clamp(1.9rem, 3.2vw, 2.6rem);
  font-weight: 750;
  line-height: 1.05;
  letter-spacing: -0.025em;
}

.work {
  padding: 0;
  list-style: none;
}

.work li + li {
  margin-top: 1.9rem;
}

h3 {
  margin-bottom: 0.2rem;
  font-size: 1.3rem;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.work p,
.band > div > p:first-child {
  max-width: 34rem;
  color: var(--mist);
}

.email {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: clamp(1.4rem, 3.4vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  color: #fff;
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-decoration-color: var(--glow);
  text-decoration-thickness: 0.09em;
  text-underline-offset: 0.2em;
}

.email::before {
  content: attr(data-user);
}

.email::after {
  content: attr(data-host);
}

.email .at::before {
  content: "@";
}

.email.is-live {
  cursor: pointer;
}

.email.is-live::before,
.email.is-live::after {
  content: none;
}

.email:hover {
  color: var(--glow);
}

.foot {
  padding: 1.5rem var(--pad) 2.25rem;
  font-size: 0.95rem;
  color: var(--mist);
  background: var(--night);
}

/* ---------- 404 ---------- */

.lost {
  display: grid;
  align-content: center;
  gap: 1rem;
  min-height: 100vh;
  min-height: 100svh;
  padding: var(--pad);
  background: linear-gradient(var(--shallows), var(--night));
}

.lost a {
  color: #fff;
  text-decoration-color: var(--glow);
  text-underline-offset: 0.2em;
}
