* {
  box-sizing: border-box;
}

body {
  margin: 1rem;
  font-family: sans-serif;
  color: var(--white);
  background-color: var(--background);
  text-align: center;
  line-height: 1.4;
}

::selection {
  background-color: var(--grey);
}

main {
  text-align: left;
  max-width: 40rem;
  margin: auto;
}

img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  border-bottom: 2px solid var(--grey);
  padding-bottom: 1rem;
}

nav ul {
  margin: 0 auto;
}

nav ul li {
  list-style: none;
  text-align: left;
}

nav details {
  text-align: left;
}

a {
  color: var(--pink);
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: all 0.1s ease-in;
}

a:hover {
  text-decoration-color: var(--pink);
}

a:active {
  color: var(--white);
  text-decoration-color: var(--white);
  transition: all 0s ease-in;
}

a[href^="/"],
a[href^="./"],
a[href*="zachmanson.com"] {
  color: var(--purple);
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: all 0.1s ease-in;
}

a[href^="/"]:hover,
a[href^="./"]:hover,
a[href*="zachmanson.com"]:hover {
  text-decoration-color: var(--purple);
}

a[href^="/"]:active,
a[href^="./"]:active,
a[href*="zachmanson.com"]:active {
  color: var(--white);
  text-decoration-color: var(--white);
  transition: all 0s ease-in;
}

.activated-link {
  color: var(--white);
}

.activated-link:hover {
  color: var(--pink);
  text-decoration-color: var(--pink);
}

a[href^="/"].activated-link {
  color: var(--white);
}

a[href^="/"].activated-link:hover {
  color: var(--purple);
  text-decoration-color: var(--purple);
}

.bold {
  font-weight: bold;
}

/* Inline monospace */
p code,
li code {
  color: var(--yellow);
}

hr {
  /* color: var(--dark-white); */
  color: var(--grey);
  margin: 2rem auto;
}

footer {
  font-weight: lighter;
  margin-top: 5rem;
}

summary h2 {
  display: inline;
}

blockquote {
  margin: 1rem;
  padding: 0 1rem;
  border-left: 2px solid var(--dark-blue);
}

blockquote + p > cite {
  margin-left: 1rem;
}

cite.standalone::before {
  content: "– ";
}

.backlinks {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.inline {
  display: inline;
}

table {
  border-spacing: 0;
  display: block;
  overflow-x: auto;
  text-align: left;
  width: 100%;
}

td,
th {
  border-bottom: 0.1rem solid var(--dark-blue);
  padding: 0.5rem;
}

th:nth-child(1),
td:nth-child(1) {
  padding-left: 0;
}

th:nth-last-child(1),
td:nth-last-child(1) {
  padding-right: 0;
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.text-left {
  text-align: left;
}

.main-icon {
  width: 100px;
  height: 100px;
}

.nav-segments-container {
  max-width: 100%;
  overflow-x: auto;
}

.nav-segments {
  overflow-x: auto;
  display: flex;
  flex-wrap: nowrap;
  width: fit-content;
  scroll-snap-align: end;
}

.nav-segments a {
  max-width: 25ch;
  min-width: 10ch;
}

.nav-links {
  display: flex;
  flex-direction: column;
  max-height: 10.5rem;
  max-width: 25ch;
  width: max-content;
  overflow-y: auto;
  overflow-x: visible;
  border-left: 2px solid var(--grey);
  padding: 0 1rem;
}
