body {
    background-color: var(--bg-color);
    color: var(--fg-color);
    font-family: var(--font-family);
    opacity: 0;
    transition: opacity 0.5s ease;
  }
  
  body.ready {
    opacity: 1;
  }
  
  p.spaced {
    line-height: 1.8;
  }

  .darkmode p.spaced {
    line-height: 1.5;
  }

  ul {
    padding-inline-start: 20px;
  }

  ul.spaced {
    line-height: 1.5;
  }

  .darkmode ul.spaced {
    line-height: 1.3;
  }
  
  a {
    color: var(--link-color);
    text-decoration: none;
  }
  
  a:hover {
    text-decoration: underline;
  }

  small, .muted {
    color: var(--muted-color);
  }
  
  button {
    background-color: var(--accent-color);
    color: var(--bg-color);
    border: none;
    padding: 0.5em 1em;
    font-family: var(--font-family);
  }

  .header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin: 2rem auto;
    width: fit-content;
}

.navbar {
    border-top: 1px solid var(--muted-color);
    border-bottom: 1px solid var(--muted-color);
    padding: 0.75rem 1.5rem;
}

.topnav {
    display: flex;
    gap: 2rem;
    width: 100%;
    max-width: 400px; 
    justify-content: space-between;
}

.topnav a {
    font-weight: bold;
    text-decoration: none;
    color: var(--fg-color);
    transition: color 0.2s ease;
}

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

.topnav a.active {
    color: var(--accent-color);
    text-decoration: underline;
}

#theme-toggle{
    height: 50px;
    width: 50px;
    padding: 0;
    border-radius: 50%;
    background-color: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 20px;
    right: 20px;
}

#theme-toggle svg{
    fill: var(--accent-color);
    height: 40px;
    width: 40px;
    transition: transform 0.3s ease;
}

#theme-toggle svg:hover {
    transform: scale(1.2);
}

#theme-toggle svg:last-child{
    display: none;
}

.darkmode #theme-toggle svg:first-child{
    display: none;
}

.darkmode #theme-toggle svg:last-child{
    display:block;
}

.footer {
  padding: 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.bottomnav {
  display: flex;
  gap: 1rem;
}

.bottomnav a svg{
  fill: var(--accent-color);
  transition: transform 0.3s ease;
}

.bottomnav a svg:hover {
  transform: scale(1.2);
}