Responsive Club Website - Front end Path

Hello People i’m struggling with media queries in Responsive Club Website - Front end Path. I’m not able to restrict the li elements in the navbar when i restrict the page.
This is my code

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Delice's Bistrot Bar</title>
    <link rel="stylesheet" href="./resources/index.css" />
  </head>
  <body>

    <!--NAvbar-->


    <div class="navbar">
      <ul>
        <a href="#food"><li>Food</li></a>
        <a href="#fun"><li>Fun</li></a>
        <a href="#about-us"><li>About us</li></a>
      </ul>
    </div>

    <!--Banner-->


    <div class="banner">
      <h1>Delice's Bistrot Bar</h1>
    </div>

    <!--Main-->


    <div class="concept">
      <h4>Eat, Laugh, Experience</h4>
      <p>
        From years of research and passion, we provide the best quality food for
        our dear customers.<br />Visit our <a href="social">Social</a> page to
        know more
      </p>
    </div>

    <!--images-->


    <div class="image-container">
      <img
        src="./resources/images/clay-banks-ZTtaJjiF_0M-unsplash.jpg"
        alt="cake"
      />
      <img
        src="./resources/images/rob-wicks-qRseM5JoP-A-unsplash.jpg"
        alt="cheeseburger"
      />
      <img
        src="./resources/images/tatography--FYsnChGhbI-unsplash.jpg"
        alt="pancake"
      />
    </div>


    <div class="customer-review">
      <h2>Everytime that i come, i find courtesy, quality and cozyness</h2>
      <p>Mark F. - An historical customer</p>
    </div>

    <!--imagespart2-->


    <div class="image-container">
      <img
        src="./resources/images/margaret-jaszowska-Pj7Yf6Etb0A-unsplash.jpg"
        alt="starter"
      />
      <img
        src="./resources/images/rui-silvestre-vaxKLhmeNlQ-unsplash.jpg"
        alt="sandwich"
      />
      <img
        src="./resources/images/svitlana-btxzWcSvu-g-unsplash.jpg"
        alt="drink"
      />
    </div>

    <!--cta-->



    <div class="image-cta">
      <h2>Come and enjoy with us</h2>
      <img
        src="./resources/images/william-king-oxpNN-NJHmM-unsplash.jpg"
        alt="rooftop"
      />
      <h2>Open 7/7 from 10.00 AM to 00.00 AM</h2>
    </div>

    <!--footer-->


    <div class="footer">
      <ul>
        <li><a href="#food">Food</a></li>
        <li><a href="#food">Fun</a></li>
        <li><a href="#food">About us</a></li>
      </ul>
    </div>
  </body>
</html>

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  background-color: #b8b8b8;
  text-align: center;
}

img {
  width: 100%;
  height: 800px;
}



/*Navbar*/

.navbar {
  background-color: #003119;
  height: 69px;
  width: 100%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.navbar ul {
  list-style: none;
}


li{
  padding: 10px;
  width: 80px;
  margin-right: 50px;
  display: inline;
  letter-spacing: 0.1rem;
}


a {
  color: white;
  text-decoration: none;
  text-transform: uppercase;
  font-weight: bold;
}

a:hover {
  color: brown;
  text-decoration: underline;
}




ul li a {
  color: white;
  display: inline-block;
  
}

/*banner*/


.banner h1 {
  font-family: 'Courier New', Courier, monospace;
  font-size: 2rem;
  text-align: center;
  margin: 3.5rem auto 3.5rem auto;
  background-color: aquamarine;
  width: 100%;
  height: 100px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 4rem;
}

/*Main*/

.concept {
  margin: 50px auto auto 10px;
  height: 100px;
  text-align: left;
  padding: 2rem;
}
.concept h4 {
  font-size: 1.2rem;
  font-weight: bold;
  font-family: monospace;
}
.concept p {
  margin-top: 10px;
  line-height: 1.6;
  letter-spacing: 0.1em;
}

/*image-container*/

.image-container {
  display: flex;
  flex-direction: column;
  margin-top: 20px;
  margin-bottom: 20px;
}
.image-container img {
  margin-top: 50px;
}

.customer-review {
  text-align: left;   
  height: 250px;
  background-color: darkgreen;
  display: flex;
  justify-content: center;
  flex-direction: column;
  font-family: monospace;
  color: aliceblue;
  padding-left: 15px;
  line-height: 2;
}

.customer-review p {
margin-top: 10px;
font-size: 1.2rem;
font-weight: bold;
}

/*cta*/


.image-cta {
display: flex;
flex-direction: column;
align-items: center;
height: 600px;
margin-bottom: 20px;
}


.image-cta h2 {
margin-bottom: 20px;
margin: 50px auto 50px auto;
color: rgb(255, 106, 0);
font-family: monospace;
}


.image-cta img {
height: 450px;
width: 250px;
}

/*footer*/

.footer {
  background-color: #003119;
  height: 69px;
  width: 100%;
  display: flex;
  justify-content: flex-start;
  align-items: center;
}
  /*mediaqueries*/

  * {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
  }
  
  html {
    font-size: 16px;
  }
  
  body {
    background-color: #b8b8b8;
    text-align: center;
  }
  
  img {
    width: 100%;
    height: 800px;
  }
  
  
  
  /*Navbar*/
  
  .navbar {
    background-color: #003119;
    height: 69px;
    width: 100%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
  }
  
  .navbar ul {
    list-style: none;
  }
  
  
  li{
    padding: 10px;
    width: 80px;
    margin-right: 50px;
    display: inline;
    letter-spacing: 0.1rem;
  }
  
  
  a {
    color: white;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: bold;
  }
  
  a:hover {
    color: brown;
    text-decoration: underline;
  }
  
  
  
  
  ul li a {
    color: white;
    display: inline-block;
    
  }
  
  /*banner*/
  
  
  .banner h1 {
    font-family: 'Courier New', Courier, monospace;
    font-size: 2rem;
    text-align: center;
    margin: 3.5rem auto 3.5rem auto;
    background-color: aquamarine;
    width: 100%;
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4rem;
  }
  
  /*Main*/
  
  .concept {
    margin: 50px auto auto 10px;
    height: 100px;
    text-align: left;
    padding: 2rem;
  }
  .concept h4 {
    font-size: 1.2rem;
    font-weight: bold;
    font-family: monospace;
  }
  .concept p {
    margin-top: 10px;
    line-height: 1.6;
    letter-spacing: 0.1em;
  }
  
  /*image-container*/
  
  .image-container {
    display: flex;
    flex-direction: column;
    margin-top: 20px;
    margin-bottom: 20px;
  }
  .image-container img {
    margin-top: 50px;
  }
  
  .customer-review {
    text-align: left;   
    height: 250px;
    background-color: darkgreen;
    display: flex;
    justify-content: center;
    flex-direction: column;
    font-family: monospace;
    color: aliceblue;
    padding-left: 15px;
    line-height: 2;
  }
  
  .customer-review p {
  margin-top: 10px;
  font-size: 1.2rem;
  font-weight: bold;
  }
  
  /*cta*/
  
  
  .image-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 600px;
  margin-bottom: 20px;
  }
  
  
  .image-cta h2 {
  margin-bottom: 20px;
  margin: 50px auto 50px auto;
  color: rgb(255, 106, 0);
  font-family: monospace;
  }
  
  
  .image-cta img {
  height: 450px;
  width: 250px;
  }
  
  /*footer*/
  
  .footer {
    background-color: #003119;
    height: 69px;
    width: 100%;
    display: flex;
    justify-content: flex-start;
    align-items: center;
  }
    /*mediaqueries*/
  
    @media only screen and (max-width: 640px) {
  
      .banner h1 {
        margin-top: 2rem;
         
      }
      

  
  .banner {
    max-height: 200px;
  }
  
  .image-container img {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
  }
  
  .navbar {
    display: flex;
    align-items: center;
    flex-direction: row;
  }
  }

Thank you for any recommendation