@font-face {
  font-family: Manrope;
  src: url('/assets/manrope-latin.ttf') format('truetype');
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}

:root {
  color-scheme: dark;
  font-family: Manrope, Arial, sans-serif;
  font-synthesis: none;
  --ink: #0b0d0c;
  --paper: #e9eae1;
  --quiet: #9b9f94;
  --acid: #d8f58a;
  --gutter: clamp(24px, 4vw, 76px);
  background: var(--ink);
  color: var(--paper);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }
body, button, a { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { font: inherit; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--acid); outline-offset: 7px; }
::selection { color: var(--ink); background: var(--acid); }
[hidden] { display: none !important; }

.skip-link {
  position: fixed;
  z-index: 10;
  top: 16px;
  left: 16px;
  padding: 14px 20px;
  background: var(--paper);
  color: var(--ink);
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }
.experience { height: 190svh; }
.viewport {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  isolation: isolate;
}
.artwork { position: absolute; inset: 0; z-index: -1; }
.artwork::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 54% 53%, #19201566, transparent 62%);
}
canvas { position: absolute; display: block; width: 100%; height: 100%; }
.life-fallback { position: absolute; width: 100%; height: 100%; object-fit: contain; }
.webgl-ready .life-fallback { visibility: hidden; }

.header {
  position: absolute;
  inset: clamp(28px, 4vw, 66px) var(--gutter) auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 30px;
  pointer-events: none;
}
h1 {
  position: relative;
  pointer-events: auto;
  margin: 0;
  font-size: clamp(3.5rem, 7.8vw, 8.5rem);
  font-weight: 600;
  line-height: .91;
  letter-spacing: -.075em;
}
.period { color: var(--acid); }
.name-word { transition: opacity 220ms ease; }
.name-life-active .name-word { opacity: .68; }
canvas.name-life { inset: 0; width: 100%; height: 100%; pointer-events: none; }
.life-credit { display: inline-flex; align-items: center; min-height: 36px; font-size: .875rem; line-height: 1.5; color: var(--quiet); }
.life-credit:hover { color: var(--acid); }
nav {
  position: absolute;
  top: clamp(28px, 4vw, 66px);
  right: var(--gutter);
  pointer-events: auto;
  min-width: 245px;
  padding-top: 4px;
}
.contact-links { display: grid; }
.contact-links a {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  font-size: 1rem;
  letter-spacing: -.025em;
}
.contact-links a:hover, .contact-links a.is-active { color: var(--acid); }
.contact-deck { display: none; }
.arrow { display: inline-block; font-size: 1.2rem; transition: transform 180ms ease; }
nav a:hover .arrow { transform: translate(2px, -2px); }

.bottom-bar {
  position: absolute;
  bottom: clamp(28px, 3.6vw, 60px);
  left: var(--gutter);
  right: var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}
.motion-toggle {
  display: flex;
  margin-left: auto;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-width: 95px;
  min-height: 44px;
  border: 1px solid #33392f;
  border-radius: 24px;
  padding: 0 18px;
  color: var(--paper);
  background: #0b0d0ccc;
  font-size: .875rem;
  cursor: pointer;
}
.motion-toggle:hover { border-color: var(--acid); color: var(--acid); }
.motion-symbol { font-family: Arial, sans-serif; font-size: .9rem; }
.scroll-track {
  position: absolute;
  right: var(--gutter);
  top: 38%;
  height: 24%;
  width: 1px;
  background: #2e3528;
}
.scroll-track span {
  display: block;
  width: 1px;
  height: 20%;
  background: var(--acid);
  transform: translateY(0);
}


@media (max-width: 700px), (hover: none) {
  :root { --gutter: 22px; }
  .experience { height: 175svh; }
  .header { top: calc(28px + env(safe-area-inset-top)); right: var(--gutter); }
  h1 { font-size: clamp(2.5rem, 10.5vw, 4rem); line-height: 1; letter-spacing: -.07em; }
  h1 br { display: none; }
  .period { padding-left: .025em; }
  nav { top: calc(118px + env(safe-area-inset-top)); left: var(--gutter); right: var(--gutter); min-width: 0; padding: 0; }
  .contact-links a { font-size: 1rem; min-height: 48px; }
  .webgl-ready nav { top: auto; bottom: calc(62px + env(safe-area-inset-bottom)); }
  .webgl-ready .contact-links { display: none; }
  .webgl-ready .contact-deck { display: block; }
  .contact-deck::before {
    content: ''; position: absolute; inset: -60px calc(-1 * var(--gutter)) calc(-20px - env(safe-area-inset-bottom));
    background: linear-gradient(transparent, var(--ink) 35%); pointer-events: none; z-index: -1;
  }
  .contact-choices { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid #394030; border-bottom: 1px solid #394030; }
  .contact-choices a { position: relative; display: flex; align-items: center; justify-content: center; min-height: 60px; padding: 12px 3px; color: var(--quiet); font-size: .875rem; overflow-wrap: anywhere; }
  .contact-choices a + a { border-left: 1px solid #232a20; }
  .contact-choices a[aria-current="true"] { color: var(--acid); background: linear-gradient(transparent, #d8f58a0d); }
  .contact-choices a[aria-current="true"]::after { content: ''; position: absolute; left: 10%; right: 10%; bottom: -1px; height: 2px; background: var(--acid); transform-origin: left; animation: preview-countdown 5s linear forwards; }
  .contact-choices a:focus-visible { outline-offset: -5px; }
  .artwork { top: calc(114px + env(safe-area-inset-top)); bottom: calc(138px + env(safe-area-inset-bottom)); }
  body:not(.webgl-ready) .artwork { top: 340px; bottom: 24px; }
  .bottom-bar { bottom: calc(14px + env(safe-area-inset-bottom)); justify-content: center; }
  .motion-toggle { display: none; }
  .life-credit { font-size: .875rem; }
  .scroll-track { top: calc(124px + env(safe-area-inset-top)); right: 10px; height: calc(100% - 282px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
}
@media (max-width: 700px) and (min-height: 521px), (hover: none) and (min-height: 521px) {
  .viewport { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto auto; padding: calc(28px + env(safe-area-inset-top)) var(--gutter) calc(20px + env(safe-area-inset-bottom)); }
  .header { position: static; grid-area: 1 / 1; min-width: 0; }
  .artwork, body:not(.webgl-ready) .artwork { position: relative; grid-area: 2 / 1 / 3 / -1; inset: auto; width: calc(100% + var(--gutter) * 2); height: 100%; min-height: 0; margin-left: calc(-1 * var(--gutter)); }
  nav, .webgl-ready nav { position: relative; grid-area: 3 / 1 / 4 / -1; inset: auto; }
  .bottom-bar { position: static; grid-area: 4 / 1 / 5 / -1; margin-top: 10px; }
}
@media (max-height: 520px) and (hover: none), (max-height: 520px) and (max-width: 700px) {
  h1 { font-size: 2.25rem; }
  .header { top: 18px; }
  .webgl-ready nav { left: auto; width: 208px; bottom: calc(58px + env(safe-area-inset-bottom)); max-height: calc(100svh - 96px); overflow-y: auto; }
  .contact-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-choices a { min-height: 48px; }
  .contact-choices a:nth-child(3) { border-left: 0; }
  .contact-choices a:nth-child(n+3) { border-top: 1px solid #232a20; }
  .artwork { top: 72px; bottom: 58px; right: 238px; }
  .scroll-track { display: none; }
}
@media (max-height: 600px) and (min-width: 701px) and (hover: hover) {
  h1 { font-size: 3.5rem; }
  .header { top: 24px; }
  .bottom-bar { bottom: 20px; }
}
@keyframes preview-countdown { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .contact-choices a::after { animation: none !important; }
}
