@font-face {
  font-family: "Valkyrie";
  src: url("/fonts/valkyrie/valkyrie_ot_a_regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Valkyrie";
  src: url("/fonts/valkyrie/valkyrie_ot_a_italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Valkyrie";
  src: url("/fonts/valkyrie/valkyrie_ot_a_bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Valkyrie";
  src: url("/fonts/valkyrie/valkyrie_ot_a_bold_italic.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #fff;
  --fg: #000;
  --fg-muted: #555;
}

[data-theme="dark"] {
  --bg: #000;
  --fg: #fff;
  --fg-muted: #aaa;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000;
    --fg: #fff;
    --fg-muted: #aaa;
  }
}

body {
  font-family: "Valkyrie", Georgia, "Times New Roman", Times, serif;
  font-size: 14pt;
  background: var(--bg);
  color: var(--fg);
  max-width: 650px;
  margin: 0 auto;
  padding: 2rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.theme-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--fg);
  font-family: "Courier New", Courier, monospace;
  font-size: 0.7rem;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1.1;
  text-align: center;
  white-space: pre;
}

.theme-toggle:hover {
  opacity: 0.7;
}

.theme-toggle .mobile {
  display: none;
}

.theme-toggle .desktop {
  display: block;
}

main {
  text-align: center;
}

.bio {
  text-align: left;
  margin: 2rem 0;
  line-height: 1.6;
}

.bio p {
  margin-bottom: 1rem;
}

.bio p:last-child {
  margin-bottom: 0;
}

pre.ascii {
  font-family: "Courier New", Courier, monospace;
  font-size: 0.85rem;
  line-height: 1.2;
  margin-bottom: 2rem;
  display: inline-block;
  text-align: left;
}

nav {
  font-family: "Valkyrie", Georgia, serif;
  font-size: 1.25rem;
}

nav a {
  margin-right: 1rem;
}

nav a:last-child {
  margin-right: 0;
}

a {
  color: var(--fg);
  text-decoration: none;
  font-variant: small-caps;
  white-space: nowrap;
}

a:hover {
  text-decoration: underline;
}

/* Product pages (like /bud/) */
.product {
  text-align: left;
}

.product h1 {
  font-size: 2.5rem;
  font-weight: normal;
  font-style: italic;
  margin-bottom: 1.5rem;
}

.product p {
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.product ul {
  list-style: none;
  line-height: 2;
  margin-bottom: 2rem;
}

.product .back {
  font-size: 0.95rem;
}

/* Legal/document pages */
.document {
  text-align: left;
}

.document h1 {
  font-size: 2rem;
  font-weight: normal;
  margin-bottom: 0.5rem;
}

.document .subtitle {
  font-size: 1rem;
  color: var(--fg-muted);
  margin-bottom: 2rem;
}

.document h2 {
  font-size: 1.2rem;
  font-weight: bold;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.document p {
  line-height: 1.7;
  margin-bottom: 1rem;
}

.document .nav {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--fg);
  opacity: 0.2;
}

.document .nav a {
  margin-right: 1.5rem;
}

footer {
  margin-top: 2rem;
  font-size: 0.9rem;
  color: var(--fg-muted);
}

@media (max-width: 480px) {
  pre.ascii {
    font-size: 0.55rem;
  }

  body {
    font-size: 12pt;
    padding: 1rem;
  }

  .theme-toggle {
    top: 0.5rem;
    right: 0.5rem;
    font-size: 1.2rem;
  }

  .theme-toggle .mobile {
    display: block;
  }

  .theme-toggle .desktop {
    display: none;
  }
}
