@import url("https://fonts.googleapis.com/css2?family=Karla:ital,wght@0,200..800;1,200..800&family=Outfit:wght@100..900&display=swap");

:where(body) {
  --background-color: white;
  --dot-color: rgba(0, 0, 0, 0.1);
}

:where(h1) {
  --background-color: white;
  --text-color: black;
  --line-color: #e5e5e5;
}

:where(h2, h3, p, ul li a) {
  --text-color: black;
}

:where(.expression, .label, ul li) {
  --background-color: white;
  --text-color: black;
  --shadow: 0 20px 25px -5px rgb(0 0 0 / 0.05), 0 8px 10px -6px rgb(0 0 0 / 0.05);
}

:where(body.dark) {
  --background-color: #292524;
  --dot-color: rgba(255, 255, 255, 0.075);
}

:where(h1.dark) {
  --background-color: #1c1917;
  --text-color: #fafafa;
  --line-color: #44403c;
}

:where(h2.dark, h3.dark, p.dark, ul li a.dark) {
  --text-color: #e5e5e5;
}

:where(p.dark) {
  --text-color: #d4d4d4;
}

:where(.expression.dark, .label.dark, ul li.dark) {
  --background-color: #1c1917;
  --text-color: #e5e5e5;
}

* {
  box-sizing: border-box;
  position: relative;
  padding: 0;
  margin: 0;
}

body {
  width: 100%;
  background: var(--background-color);
  padding-bottom: 6rem;
  background-image: radial-gradient(var(--dot-color) 1px, transparent 0);
  background-size: 20px 20px;
  background-position: -8.5px -8.5px;
}

.image-dark {
  visibility: hidden;
}

.learning-content {
  max-width: 1000px;
  width: 92.5%;
  margin: auto;
}

h1,
h2,
h3 {
  font-family: "Outfit", sans-serif;
  font-optical-sizing: auto;
  font-weight: 600;
  font-style: normal;
  letter-spacing: 1px;
  color: var(--text-color);
}

h1 {
  text-align: center;
  font-size: 2rem;
  padding: 2rem;
  border-bottom: 4px solid var(--line-color);
  background-color: var(--background-color);
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.025), 0 8px 10px -6px rgb(0 0 0 / 0.025);
}

h2 {
  font-size: 1.5rem;
  margin-top: 4rem;
  margin-bottom: 1rem;
}

h3 {
  font-family: "Karla", sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
  letter-spacing: 0;
}

p {
  font-family: "Karla", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  font-size: 1.25rem;
  color: var(--text-color);
  /* text-align: justify; */
}

ul {
  font-family: "Karla", sans-serif;
  font-optical-sizing: auto;
  font-weight: 500;
  font-style: normal;
  font-size: 1.25rem;
  list-style-type: none;
}

ul li {
  background: var(--background-color);
  padding: 1.5rem;
  border-radius: 0.5rem;
  margin-bottom: 0.5rem;
  box-shadow: var(--shadow);
}

ul li a {
  display: block;
  text-decoration: none;
  color: var(--text-color);
}

p a {
  color: var(--text-color);
  opacity: 0.5;
}

table {
  width: 100%;
  font-family: "Karla", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  font-size: 1.25rem;
}

.expression {
  width: fit-content;
  max-width: 100%;
  font-size: 1.5rem;
  padding: 1.5rem;
  background: var(--background-color);
  border-radius: 0.5rem;
  box-shadow: var(--shadow);
}

.label {
  width: fit-content;
  padding: 2rem;
  background: var(--background-color);
  border-radius: 0.5rem;
  box-shadow: var(--shadow);
}

.label h3 {
  margin-bottom: 0.5rem;
}

svg {
  width: 100%;
  stroke: black;
  stroke-width: 2.5px;
  fill: none;
  display: block;
  overflow: visible;
}

svg > * {
  vector-effect: non-scaling-stroke;
}

button {
  font-family: "Outfit", sans-serif;
  font-size: 1rem;
  padding: 0.25rem 0.75rem;
  font-weight: 600;
  border: 2px solid #404040;
  border-radius: 0.5rem;
  background: black;
  color: white;
  margin-right: 1rem;
  margin-bottom: 0.125rem;
  cursor: pointer;
}

button.light-switch {
  display: block;
  padding: 0.75rem;
  margin: 1rem auto -1rem;
}

.flex {
  display: flex;
  align-items: start;
  flex-wrap: wrap;
}

.flex:has(.expression) {
  gap: 0.5rem;
}

.flex-center {
  justify-content: center;
}

.flex img {
  height: 250px;
}

.flex-mright {
  margin-right: 4rem;
}

.learning-content > p,
.learning-content > img,
.learning-content > .flex {
  margin-bottom: 1rem;
}

.learning-content > svg {
  margin: 2rem 0;
}

.animation-vid {
  max-width: 256px;
  border-radius: 0.25rem;
}

p.source {
  font-size: 1rem;
  font-weight: 600;
  opacity: 0.5;
  text-align: left;
}

@media only screen and (max-width: 768px) {
  .flex-mright {
    margin-right: 0;
    margin-bottom: 2rem;
  }
  .expression {
    font-size: 1.25rem;
    overflow-x: scroll;
  }
  p {
    text-align: left;
  }
}
