body {
  margin: 0;
  padding: 0;
  background-color: #121212;
  color: #f5f5f5;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  scroll-behavior: smooth;
  transition: background-color 0.4s ease, color 0.4s ease, opacity 0.4s ease;
  opacity: 1;
}

body.fade-out {
  opacity: 0;
  transition: opacity 0.4s ease;
}

body.fade-in {
  opacity: 1;
  transition: opacity 0.4s ease;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #1e1e1e;
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

#modeToggle {
  all: unset;
  font-size: 1.4rem;
  cursor: pointer;
  color: #f5f5f5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
}

.logo {
  font-weight: bold;
  font-size: 1.3rem;
  color: #f5f5f5;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links li {
  display: inline;
}

.nav-links a {
  color: #66d9ef;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: #a6e22e;
}


header, main, section {
  padding: 2rem 1rem;
  text-align: center;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

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

h3 {
  font-weight: normal;
  color: #bbb;
}

.link-list {
  list-style: none;
  padding: 0;
}

.link-list li {
  margin: 1rem 0;
}

.link-list a {
  color: #66d9ef;
  text-decoration: none;
  font-size: 1.2rem;
}

.link-list a:hover {
  color: #a6e22e;
}

footer {
  margin-top: 3rem;
  padding: 2rem;
  font-size: 0.9rem;
  color: #666;
  background: #1e1e1e;
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1100;
}

.hamburger span {
  height: 3px;
  width: 100%;
  background-color: #f5f5f5;
  border-radius: 2px;
  transition: 0.3s;
}

@media (max-width: 600px) {
   .navbar {
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
    position: relative;
  }

   .nav-links {
    position: absolute;
    top: 60px;
    right: 0;
    background-color: #1e1e1e;
    flex-direction: column;
    align-items: flex-start;
    width: 200px;
    padding: 1rem;
    transform: translateX(100%); /* hidden off-screen */
    transition: transform 0.3s ease-in-out;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.4);
    z-index: 999;
  }

  .nav-links a {
    font-size: 1rem;
  }

  .logo {
    font-size: 1.1rem;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .link-list a {
    font-size: 1rem;
  }

  .hamburger {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 60px;
    right: 0;
    flex-direction: column;
    background-color: #1e1e1e;
    width: 200px;
    padding: 1rem;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    box-shadow: -2px 0 8px rgba(0,0,0,0.4);
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-links li {
    margin: 0.5rem 0;
  }

  .hamburger.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  
  .hamburger.open span:nth-child(2) {
    opacity: 0;
  }

  .hamburger.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }
}

@keyframes fadeSlideDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-on-load {
  opacity: 0;
}

.show-on-load {
  animation: fadeSlideDown 1s ease-out forwards;
}





/* LIGHT MODE STUFF */
body.light-mode {
  background-color: #f5f5f5;
  color: #121212;
}

body.light-mode .navbar {
  background-color: #e0e0e0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

body.light-mode .logo {
  color: #121212;
}

body.light-mode .nav-links a {
  color: #007acc;
}

body.light-mode .nav-links a:hover {
  color: #006400;
}

body.light-mode .link-list a {
  color: #007acc;
}

body.light-mode .link-list a:hover {
  color: #006400;
}

body.light-mode footer {
  background-color: #ddd;
  color: #333;
}

body.light-mode .hamburger span {
  background-color: #121212;
}

body.light-mode #modeToggle {
  color: #121212;
}


/* FIX FOR DESKTOP MODE TOGGLE BUTTON LOoKING UGLY; DO NOT TOUCH IF IT WORKS */
@media (hover: hover) and (pointer: fine) {
  #modeToggle {
    background-color: transparent;
    box-shadow: none;
    appearance: none;
    -webkit-appearance: none;
  }
  
  #modeToggle:hover {
    opacity: 0.7;
  }
}
