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

:root {
  --bg: #fbfbfa;
  --fg: #111111;
  --muted: #8a8a8a;
  --rule: #e6e6e3;
  --accent: #c98a00;
  --show-moon: block;
  --show-sun: none;
  --webkit-smoothing: auto;
  --moz-smoothing: auto;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e0e0e;
    --fg: #e8e8e6;
    --muted: #7a7a7a;
    --rule: #262626;
    --accent: #fcc23d;
    --show-moon: none;
    --show-sun: block;
    --webkit-smoothing: antialiased;
    --moz-smoothing: grayscale;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0e0e0e;
  --fg: #e8e8e6;
  --muted: #7a7a7a;
  --rule: #262626;
  --accent: #fcc23d;
  --show-moon: none;
  --show-sun: block;
  --webkit-smoothing: antialiased;
  --moz-smoothing: grayscale;
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Electrolize", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 1.125rem;
  line-height: 1.7;
  -webkit-font-smoothing: var(--webkit-smoothing);
  -moz-osx-font-smoothing: var(--moz-smoothing);
  transition: background-color 0.2s ease, color 0.2s ease;
}

::selection {
  background: var(--accent);
  color: #111111;
}

.mark {
  margin-bottom: 1.5rem;
  font-size: 1.75rem;
  line-height: 1;
}

main {
  max-width: 34rem;
  margin: 0 auto;
  padding: clamp(4rem, 24vh, 14rem) 1.5rem 4rem;
}

p {
  margin: 0;
  text-wrap: pretty;
}

p + p {
  margin-top: 1rem;
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  transition: border-color 0.2s ease;
}

nav {
  display: flex;
  gap: 1.375rem;
}

nav a,
.theme-toggle {
  display: inline-flex;
  color: var(--muted);
  text-decoration: none;
  border-radius: 4px;
  transition: color 0.15s ease;
}

.theme-toggle {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

nav a:hover,
.theme-toggle:hover {
  color: var(--accent);
}

nav a:focus-visible,
.theme-toggle:focus-visible {
  color: var(--accent);
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.theme-toggle .moon {
  display: var(--show-moon);
}

.theme-toggle .sun {
  display: var(--show-sun);
}

svg {
  display: block;
  width: 1.125rem;
  height: 1.125rem;
  fill: currentColor;
}
