body {
    color: black;
    margin: 0;
    font-family: Arial, sans-serif;
}

#display {
    margin: auto;
    padding: 20px;
    max-width: 1200px; /* Restrict max-width to prevent stretching on large screens */
}

nav {
    display: flex;
    align-items: center;
    justify-content: space-between; /* Aligns the nav items to the left and the button to the right */
    padding: 10px 20px;
    flex-wrap: wrap; /* Allow wrapping for smaller screens */
}

.navg {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap; /* Allow wrapping for smaller screens */
    font-size: 1.5rem;
    font-weight: bold;
}

.navg li {
    margin-right: 20px;
}

.navg li a {
    text-decoration: none;
    padding: 5px 10px;
    color: #666;
    text-decoration: none;
    display: block;
}

.navg a:hover:not(.active) {
    background-color: hsla(0, 0%, 97%);
}

.navg a.active {
    background-color: hsla(0, 0%, 90%);
}

.normal {
    font-size: 1.2rem;
    list-style-type: none;
}

#toggle-mode {
    background-color: hsla(0, 0%, 90%);
    border: none;
    border-radius: 30%;
    font-size: 18px;
    cursor: pointer;
    padding: 5px 10px;
    margin-top: 10px;
}

#toggle-mode:hover {
    border: 2px solid gray;
}

#home, #projects, #about {
    display: none; /* Hide sections by default */
}

#home {
    display: block; /* Show home section by default */
}

footer {
    padding: 20px;
    text-align: center;
    margin-top: 20px;
    border-top: 1px solid hsl(0, 0%, 29%);
}

footer h2 {
    margin: 0;
}

footer p {
    margin: 10px 0 0;
}
a:link {
    font-size: 1.5rem;
    color:#666;
    background-color: transparent;
    text-decoration: none;
  }
  
  a:visited {
    color:#666;
    background-color: transparent;
    text-decoration: none;
  }
  
  a:hover {
    color:burlywood;
    background-color: transparent;
    text-decoration: underline;
  }
  
  a:active {
    color: rgb(245, 141, 5);
    background-color: transparent;
    text-decoration: underline;
  }
/* Media queries for responsiveness */
@media (max-width: 768px) {
    .navg {
        flex-direction: column; /* Stack navigation items vertically on smaller screens */
        font-size: 1.2rem; /* Reduce font size */
    }

    #display {
        margin: 0 10px; /* Reduce margins for smaller screens */
    }

    #toggle-mode {
        margin-top: 15px; /* Adjust spacing */
    }
}

@media (max-width: 480px) {
    .navg li {
        margin-right: 10px; /* Reduce spacing between navigation items */
    }

    .navg li a {
        font-size: 1rem; /* Further reduce font size */
    }

    #toggle-mode {
        font-size: 16px; /* Adjust button size */
        padding: 5px 8px;
    }
}
