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

html,
body {
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0e0e0e;
  --fg: #f5f4ee;
}

:root[data-theme="light"] {
  --bg: #f5f4ee;
  --fg: #0e0e0e;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: "early-sans", sans-serif;
  display: grid;
  place-items: center;
  min-height: 100svh;
  transition: background-color 0.2s ease, color 0.2s ease;
}

@media (prefers-reduced-motion: reduce) {
  body {
    transition: none;
  }
}

h1 {
  font-size: clamp(3rem, 12vw, 8rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 0;
}

.corner-mark {
  position: fixed;
  bottom: max(1.25rem, env(safe-area-inset-bottom));
  right: max(1.25rem, env(safe-area-inset-right));
  width: 2.75rem;
  height: 2.75rem;
  padding: 0.5rem;
  background: transparent;
  border: 0;
  border-radius: 999px;
  color: inherit;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.corner-mark:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

.corner-mark svg {
  width: 100%;
  height: 100%;
  display: block;
}

.corner-mark .icon-moon {
  display: none;
}

:root[data-theme="light"] .corner-mark .icon-sun {
  display: none;
}

:root[data-theme="light"] .corner-mark .icon-moon {
  display: block;
}
