@import "https://cdn.cubing.net/v0/css/@fontsource/ubuntu";

:root {
  color-scheme: light dark;

  --theme-color-light: #90b8df;
  --theme-color-dark: #0c5093;

  --primary-background-color: light-dark(var(--theme-color-light), var(--theme-color-dark));
  --primary-accent-color: light-dark(var(--theme-color-dark), var(--theme-color-light));
  --primary-strong-color: light-dark(black, white);

  --secondary-background-color: light-dark(var(--theme-color-dark), var(--theme-color-light));
  --secondary-accent-color: light-dark(var(--theme-color-light), var(--theme-color-dark));
  --secondary-strong-color: light-dark(white, black);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  font-size: 1.1rem;
  line-height: 1.3em;
}

body {
  margin: 0;
  font-family: Ubuntu, Helvetica, Tahoma, sans-serif;
  background: var(--primary-background-color);
  color: var(--primary-strong-color);
  display: grid;
  gap: 12px;
}

body a {
  color: var(--primary-accent-color);
}

body a:visited {
  color: color-mix(in oklab, var(--primary-accent-color) 60%, mediumorchid);
}

header {
  display: grid;
  font-variant: small-caps;
  letter-spacing: 1px;
  gap: 0.5em;
  background: var(--secondary-background-color);
  color: var(--secondary-accent-color);
  padding: 0.5em;
  justify-items: center;
}

header > img {
  height: 4.5em;
}

header ul {
  display: grid;
  grid-auto-flow: column;
  justify-content: center;
  list-style: none;
  gap: 0.75em;
}

header a {
  font-size: 1.5em;
}

header :is(a, a:visited) {
  color: currentColor;
}

header a:not(:hover) {
  text-decoration: none;
}

header ul {
  margin: 0;
}

body[data-topic="home"] header li[data-topic="home"],
body[data-topic="dance"] header li[data-topic="dance"],
body[data-topic="cubing"] header li[data-topic="cubing"],
body[data-topic="music"] header li[data-topic="music"],
body[data-topic="photography"] header li[data-topic="photography"] {
  color: var(--secondary-strong-color);
}

header .hidden-by-default {
  display: none;
}

body[data-topic="music"] header li[data-topic="music"].hidden-by-default {
  display: inherit;
}

main {
  width: 100%;
  justify-self: center;
  margin-bottom: 2em;
}

body main,
div.default-content-width {
  max-width: calc(min(100vw - 2em, 1024px));
  margin: auto;
}

.center-text {
  text-align: center;
}

body[data-width="auto"] main {
  width: auto;
}

body[data-width="medium"] main {
  max-width: calc(min(100vw - 4em, 640px));
}

body[data-width="full"] main {
  max-width: 100%;
  padding-top: 0px;
}

body[data-width="auto"] main {
  width: auto;
}

body:not(.unpadded-bottom) {
  padding-bottom: 2.5em;
}

h1 {
  text-align: center;
  font-variant: small-caps;
}

h2 {
  margin-bottom: 0.5em;
  font-size: 1.25em;
}

hr {
  width: 100%;
  height: 0;
  background: none;
  margin: auto;

  border-top: 1px solid color-mix(in oklab, var(--primary-strong-color) 20%, transparent);
  border-bottom: 1px solid color-mix(in oklab, var(--primary-strong-color) 4%, transparent);
  border-left: none;
  border-right: none;
}
