@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("fonts/newsreader-latin.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/ibmplexmono-latin.woff2") format("woff2");
}

:root {
  --bg: #0c0c0e;
  --bg-edge: #070708;
  --fg: #ededea;
  --fg-muted: #8a8a86;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --measure: 64ch;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--fg);
  background-color: var(--bg);
  background-image: radial-gradient(
    130% 130% at 50% 38%,
    rgba(255, 255, 255, 0.025) 0%,
    rgba(0, 0, 0, 0) 34%,
    var(--bg) 72%,
    var(--bg-edge) 100%
  );
  background-attachment: fixed;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible {
  outline: 1px solid var(--fg);
  outline-offset: 4px;
  border-radius: 1px;
}

.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  padding: clamp(1.5rem, 5vw, 3rem);
}

.stage {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: clamp(2.25rem, 7vh, 4rem);
}

.wordmark {
  margin: 0;
  font-family: var(--serif);
  font-weight: 300;
  font-optical-sizing: auto;
  font-size: clamp(2.9rem, 11vw, 5.75rem);
  line-height: 1;
  letter-spacing: 0.05em;
  text-indent: 0.05em;
  color: var(--fg);
}

.descriptor {
  margin: clamp(1rem, 2.2vh, 1.4rem) 0 0;
  font-family: var(--mono);
  font-weight: 400;
  font-size: clamp(0.62rem, 1.7vw, 0.74rem);
  text-transform: uppercase;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  color: var(--fg-muted);
}

.contact { font-style: normal; }

.email {
  font-family: var(--mono);
  font-size: 0.86rem;
  letter-spacing: 0.02em;
  color: var(--fg);
  border-bottom: 1px solid transparent;
  transition: border-color 180ms ease, color 180ms ease;
}
.email:hover,
.email:focus-visible { border-bottom-color: var(--fg); }

.footer {
  flex: 0 0 auto;
  padding-top: 2rem;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  color: var(--fg-muted);
}
.footer a {
  border-bottom: 1px solid var(--fg-muted);
  transition: border-color 180ms ease, color 180ms ease;
}
.footer a:hover,
.footer a:focus-visible {
  color: var(--fg);
  border-bottom-color: var(--fg);
}
.footer .sep {
  margin: 0 0.5em;
  color: var(--fg-muted);
}

.doc {
  max-width: var(--measure);
  margin: 0 auto;
  padding: clamp(3rem, 9vh, 6rem) clamp(1.5rem, 5vw, 2rem) clamp(2.5rem, 6vh, 4rem);
}

.back {
  display: inline-block;
  margin-bottom: clamp(2.5rem, 7vh, 4rem);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-muted);
  border-bottom: 1px solid transparent;
  transition: border-color 180ms ease, color 180ms ease;
}
.back:hover,
.back:focus-visible {
  color: var(--fg);
  border-bottom-color: var(--fg-muted);
}

.doc h1 {
  margin: 0 0 2.25rem;
  font-family: var(--serif);
  font-weight: 300;
  font-optical-sizing: auto;
  font-size: clamp(2rem, 6vw, 2.9rem);
  letter-spacing: 0.01em;
  color: var(--fg);
}

.doc h2 {
  margin: 2.5rem 0 0.6rem;
  font-family: var(--mono);
  font-weight: 400;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--fg-muted);
}

.doc p { margin: 0 0 1.1rem; color: var(--fg); }

.doc a {
  color: var(--fg);
  border-bottom: 1px solid var(--fg-muted);
  transition: border-color 180ms ease;
}
.doc a:hover,
.doc a:focus-visible { border-bottom-color: var(--fg); }

.doc address {
  font-style: normal;
  margin: 0 0 1.1rem;
}

.doc .meta {
  margin-top: 3rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--fg-muted);
}

.reveal { opacity: 1; }

@media (prefers-reduced-motion: no-preference) {
  @keyframes rise {
    from { opacity: 0; transform: translateY(9px); }
    to   { opacity: 1; transform: none; }
  }
  .reveal { animation: rise 720ms cubic-bezier(0.2, 0.6, 0.2, 1) both; }
  .wordmark   { animation-delay:  80ms; }
  .descriptor { animation-delay: 200ms; }
  .contact    { animation-delay: 320ms; }
  .footer     { animation-delay: 440ms; }
  .doc .reveal { animation-delay: 60ms; }
}
