* {
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-header);
  font-optical-sizing: auto;
  font-weight: 500;
  font-style: normal;
  color: var(--color-text);

  background-color: var(--color-background);
}

main {
  /* height: 100%; */
  width: 60%;
  min-width: calc(100vmin - 64px);
  margin: 0 auto;
  padding: 16px 40px;

  background-color: var(--color-body);

  display: flex;
  flex-direction: column;
}

header {
  background-color: var(--color-header);
  color: var(--color-header-text);
  position: relative;
  border-radius: var(--border-radius) var(--border-radius) var(--border-radius) 0;
  border: 4px solid var(--color-header);
  display: flex;
  flex-direction: row;
  justify-content: left;
  align-items: center;
}
#icon {
  height: 6em;
  margin-left: 1.5em;
  margin-right: -0.5em;
}
@media screen and (max-width: 600px) {
  #icon {
    visibility: hidden;
    display: none;
  }
  main {
    width: 100%;
  }
}

.header-text {
  margin: 2rem 1.5rem;
}
header h1,
h3 {
  margin: 0;
}
header h1 {
  margin-bottom: 0.5rem;
}
header a {
  color: var(--color-header-text);
  text-decoration: none;
  transition: 0.1s;
}
header a:hover {
  color: var(--color-header);
  background-color: var(--color-header-text);
  transition: 0.1s;
}

#theme-picker {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  font: var(--font-header);
  border: none;
  font-weight: 600;
  background-color: var(--color-text);
  color: var(--color-text-inverse);
}

nav {
  display: flex;
  flex-direction: row;
  gap: 2px;
}
.link-expand {
  width: 3rem;
  height: 3rem;
  margin: 0;
}
.link-expand > a {
  background-color: var(--color-text-inverse);
  color: var(--color-header);

  display: flex;
  height: 100%;
  width: 100%;
  justify-content: center;
  align-items: flex-end;

  border-radius: 0 0 var(--border-radius) var(--border-radius);
  border: 4px solid var(--color-header);
  border-top-style: none;

  transition: height 0.1s;
}
.link-expand > a:hover {
  height: calc(125%);
}
.nav-icon {
  width: 2rem;
  margin-bottom: 0.4rem;
}

footer {
  color: var(--color-text-secondary);
  width: 100%;
  text-align: center;
  padding: 2rem 0;
}

#content small {
  display: block;
  width: 100%;
  text-align: center;
  font-style: italic;
  margin-bottom: 2rem;
  color: var(--color-text-secondary);
}
#content p,
#content li,
#content blockquote {
  font-family: var(--font-body);
  line-height: 1.5;
  font-size: 1.14rem;
}
#content blockquote {
  margin: 0;
  padding: 0;
  padding-left: 0.75rem;
  border-left: 2px solid var(--color-text);
  font-style: italic;
}

a {
  color: var(--color-link);
}

code {
  font-size: 1rem;
  margin: 0 0.2rem;
}

/* Anchor links */
#content > h2 {
  display: flow-root;
}
#content > h2 > a {
  text-decoration: none !important;
  width: 95%;
  display: block;
  border-bottom: 2px solid var(--color-link);
}
#content > h2 > a::before {
  content: "# ";
  font-size: 75%;
}

h2 > a::before {
  content: "> ";
}

.pixelated {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.blurred {
  filter: blur(12px);
}

.cw-image {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  font-weight: bold;
  font-size: 1em;
  background-color: rgba(0,0,0,0.5);
  text-align: center;
  padding: 8px;
}

.hidden-link {
  color: var(--color-text);
  text-decoration: none;
}