@media (prefers-color-scheme: light) {
  :root {
    --rosewater: #dc8a78;
    --flamingo: #dd7878;
    --pink: #ea76cb;
    --mauve: #8839ef;
    --red: #d20f39;
    --maroon: #e64553;
    --peach: #fe640b;
    --yellow: #df8e1d;
    --green: #40a02b;
    --teal: #179299;
    --sky: #04a5e5;
    --sapphire: #209fb5;
    --blue: #1e66f5;
    --lavender: #7287fd;

    --text: #4c4f69;
    --subtext1: #5c5f77;
    --subtext0: #6c6f85;
    --overlay2: #7c7f93;
    --overlay1: #8c8fa1;
    --overlay0: #9ca0b0;

    --surface2: #acb0be;
    --surface1: #bcc0cc;
    --surface0: #ccd0da;

    --base: #eff1f5;
    --mantle: #e6e9ef;
    --crust: #dce0e8;

    --background1: var(--base);
    --background2: var(--mantle);
    --background3: var(--crust);

    --font-color: var(--text);
    --muted-font: var(--subtext0);
    --muted-font-alt: var(--subtext1);

    --accent-color: var(--blue);
    --accent-alt: var(--red);
    --highlight: var(--yellow);
    --success: var(--green);
    --warning: var(--peach);
    --info: var(--sky);

    --border-color: var(--surface1);
    --background-image: url(/static/media/background_light.png);
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --rosewater: #f5e0dc;
    --flamingo: #f2cdcd;
    --pink: #f5c2e7;
    --mauve: #cba6f7;
    --red: #f38ba8;
    --maroon: #eba0ac;
    --peach: #fab387;
    --yellow: #f9e2af;
    --green: #a6e3a1;
    --teal: #94e2d5;
    --sky: #89dceb;
    --sapphire: #74c7ec;
    --blue: #89b4fa;
    --lavender: #b4befe;

    --text: #cdd6f4;
    --subtext1: #bac2de;
    --subtext0: #a6adc8;
    --overlay2: #9399b2;
    --overlay1: #7f849c;
    --overlay0: #6c7086;

    --surface2: #585b70;
    --surface1: #45475a;
    --surface0: #313244;

    --base: #1e1e2e;
    --mantle: #181825;
    --crust: #11111b;

    --background1: var(--base);
    --background2: var(--mantle);
    --background3: var(--crust);

    --font-color: var(--text);
    --muted-font: var(--subtext1);
    --muted-font-alt: var(--subtext0);

    --accent-color: var(--blue);
    --accent-alt: var(--red);
    --highlight: var(--yellow);
    --success: var(--green);
    --warning: var(--peach);
    --info: var(--sky);

    --border-color: var(--surface1);
    --background-image:
      linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.5)),
      url(/static/media/background_dark.gif);
  }
}

:root {
  --border-radius: 15px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-size: 18px;
  font-family: "Fira Sans", system-ui, sans-serif;
  color: var(--font-color);
}

.intro {
  background-image: var(--background-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  width: 100%;
  padding: 2rem;
  box-sizing: border-box;
  gap: 1.5rem;
  text-align: center;
}

.intro img {
  justify-self: center;
  width: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: var(--border-radius);
}

.intro-text h1 {
  font-size: 2rem;
  font-weight: 900;
  font-style: normal;
}

.intro-text {
  justify-self: center;
}

.intro-text h1,
.intro-text p {
  margin: 0;
}

.intro-text p {
  font-weight: 500;
  font-style: normal;
}

/* Desktop breakpoint for header */
@media (min-width: 768px) {
  .intro {
    grid-template-columns: 50% 50%;
    text-align: left;
  }

  .intro img {
    justify-self: end;
  }

  .intro-text {
    justify-self: start;
  }

  .intro-text h1 {
    font-size: 2.5rem;
  }
}

/* Defaults for sections and articles */
section {
  padding: 1rem;
  max-width: 100%;
  margin: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

article {
  margin-bottom: 2rem;
}

.navbar {
  width: 100%;
  height: 40px;
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 20px;
  align-items: center;
}

.navbar a {
  display: flex;
  align-items: center;
  height: 100%;
  border: none;
  padding: 0 2rem;
  border-radius: 3px;
  background-color: buttonface;
  text-decoration: none;
  color: var(--font-color);
  background-color: var(--background1);
  text-align: center;
}

.navbar a:hover {
  background-color: var(--surface2);
  color: var(--accent-color);
  animation: all 10s;
}

main a {
  color: var(--font-color);
  transition: all 0.1s;
}

main a:hover {
  color: var(--accent-color);
}

.text-article {
  padding: 2rem;
  width: 100%;
  max-width: 1000px;
}

.text-article h3 {
  margin-bottom: 1rem;
}

.text-article p:not(:last-child) {
  margin-bottom: 1rem;
}

/* Tablet breakpoint */
@media (min-width: 768px) {
  section {
    padding: 2rem;
  }
}

footer {
  padding: 1rem;
  font-size: 0.8rem;
  font-weight: 300;
  text-align: center;
}
