@import url('https://fonts.googleapis.com/css2?family=Afacad+Flux:wght@300&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400&display=swap');


:root {
  --header-text-color: rgb(230, 230, 230);
  --primary-text-color: rgb(189, 191, 199);
  --primary-link-color: rgb(52, 152, 219);
  --hover-link-color: rgb(41, 128, 185);
  --background-color: rgb(22, 21, 18);
  --background-accent: rgb(52, 52, 52);
}

/* Global Styles */
body {
  background-color: var(--background-color);
  color: var(--primary-text-color);
  font-family: "Afacad Flux", Arial, Helvetica, sans-serif;
  font-size: 1.25rem;
  max-width: 767px;
  margin: auto;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--header-text-color);
  margin-top: 0;
}

a {
  color: var(--primary-link-color);
  text-decoration: none;
}

a:hover {
  color: var(--hover-link-color);
  text-decoration: underline;
}

p {
  margin-bottom: 1rem;
}

/* Navigation Styles */
nav {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.logo a {
  color: var(--header-text-color);
  text-decoration: none;
}

.logo h1 {
  margin: 0;
}

.menu-icon {
  display: none;
  font-size: 2rem;
  cursor: pointer;
  color: var(--header-text-color);
}

#menu-toggle {
  display: none;
}

.nav-links {
  display: flex;
  flex-direction: row;
  align-items: center;
}

.nav-links li {
  list-style: none;
  padding-inline: 1rem;
}

.nav-links li a {
  color: var(--primary-text-color);
}

.nav-links li a:hover {
  color: var(--hover-link-color);
}

footer {
  text-align: center;
  padding: 1rem 0;
  color: var(--primary-text-color);
}

footer a {
  color: var(--primary-link-color);
  text-decoration: none;
}

footer a:hover {
  color: var(--hover-link-color);
  text-decoration: underline;
}

hr {
  border: none;
  border-top: 1px solid var(--background-accent);
  margin: 1rem 0;
}

#copyright {
  text-decoration: none;
  color: var(--primary-text-color);
}

#homelab {
  text-decoration: none;
  color: var(--primary-text-color);
}

main article h1, h2 {
  margin-bottom: 0;
}

main article p {
  margin-top: 0;
}

main article:not(:first-child) {
  margin-top: 2.5rem;
}

article h1 {
  margin-bottom: 0;
}

article p {
  margin-top: 0;
}

.gradient-divider:not(:last-child) {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--background-accent), transparent);
  margin: 2.5rem 0;
}

.trix-content pre {
  font-family: 'Source Code Pro', monospace;
  font-size: 0.93rem;
  background-color: var(--background-accent);
  border-radius: 0.5rem;
  color: var(--primary-text-color);
  padding: 1rem;
  overflow-x: auto;
}

/* Media Query for screens <= 767px */
@media (max-width: 767px) {
  body {
    max-width: 100%;
    margin: 1rem 2rem;

    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-all;
    hyphens: auto;
  }

  nav {
    position: relative;
  }

  .menu-icon {
    display: block;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    background-color: var(--background-color);
    position: absolute;
    top: 100%;
    left: 0;
    padding: 1rem 0;
  }

  .nav-links li {
    padding: 0.5rem 1rem;
  }

  #menu-toggle:checked ~ .nav-links {
    display: flex;
  }

  /* Adjustments for the logo and menu icon alignment */
  nav {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .logo {
    flex-grow: 1;
  }
}
