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

@font-face {
  font-family: "Ioskeley Mono";
  src: url("/fonts/IoskeleyMono-Medium.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

:root {
  color-scheme: dark;
  overscroll-behavior-y: none;
  --paper: #141313;
  --ink: #dedbd5;
  --muted: #98918b;
  --red: #e45c51;
  --line: 20px;
  --edge: 24px;
  font-family: "Ioskeley Mono", "SFMono-Regular", Consolas, monospace;
  font-synthesis: none;
  font-size: 12px;
  font-weight: 400;
  line-height: var(--line);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

:root.allow-top-overscroll {
  overscroll-behavior-y: auto;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

::selection {
  color: var(--paper);
  background: var(--red);
}

h1,
h2,
p {
  margin: 0;
  font-size: inherit;
  line-height: inherit;
}

h1,
h2 {
  font-weight: 500;
}

a {
  color: var(--red);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  white-space: nowrap;
}

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible {
  outline: 1px solid var(--red);
  outline-offset: 5px;
}

.page {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  padding: var(--line) var(--edge) 0;
}

.masthead h1 {
  color: var(--red);
}

.footer {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--line);
  color: var(--muted);
}

.copyright {
  max-width: 480px;
}

.content {
  width: 100%;
  max-width: 480px;
  margin-top: var(--line);
}

.content h2 span {
  color: var(--red);
}

.content h2 {
  margin-bottom: var(--line);
}

.content p + p,
.contact,
.footer {
  margin-top: var(--line);
}

.redwood {
  --root-offset: 5px;
  align-self: flex-end;
  margin-top: auto;
  overflow: clip;
  color: var(--red);
  pointer-events: none;
  user-select: none;
}

.redwood pre {
  margin: 0;
  font: inherit;
  letter-spacing: 0;
  font-variant-ligatures: none;
  transform: translateY(var(--root-offset));
}

@media (max-width: 600px) {
  :root {
    --edge: 20px;
    font-size: 13px;
  }
}

/* Leave a full column for the tree before pinning it beside the copy. */
@media (min-width: 880px) and (min-height: 660px) {
  :root {
    --edge: 32px;
  }

  .footer {
    display: block;
  }

  /* Count text rows from the same bottom edge as the tree's roots. */
  @supports (padding-top: mod(100svh, 20px)) {
    .page {
      padding-top: calc(var(--line) + mod(100svh, var(--line)) + 5px);
    }
  }

  .redwood {
    position: fixed;
    right: var(--edge);
    bottom: 0;
  }
}
