/* 1. Use a more-intuitive box-sizing model */
body {
  padding-top: 140px; /* match the navbar’s total height */
}

*, *::before, *::after {
    box-sizing: border-box;
  }
  
  /* 2. Remove default margin */
  * {
    margin: 0;
  }
  
  /* 3. Enable keyword animations */
  @media (prefers-reduced-motion: no-preference) {
    html {
      interpolate-size: allow-keywords;
    }
  }
  
  body {
    /* 4. Add accessible line-height */
    line-height: 1.5;
    /* 5. Improve text rendering */
    -webkit-font-smoothing: antialiased;
  }
  
  /* 6. Improve media defaults */
  img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
  }
  
  /* 7. Inherit fonts for form controls */
  input, button, textarea, select {
    font: inherit;
  }
  
  /* 8. Avoid text overflows */
  p, h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
  }
  
  /* 9. Improve line wrapping */
  p {
    text-wrap: pretty;
  }
  h1, h2, h3, h4, h5, h6 {
    text-wrap: balance;
  }

/* FONTS */

@font-face {
    font-family: "JMH Typewriter";
    src: url("../fonts/ Typewriter Regular.woff") format('woff');
  }

/* NAVBAR */

.navbar {
  position: fixed;
  top: 0%;
  width: 100%;
  display: flex;
  flex-direction: column; /* title above list */
  align-items: center;    /* centers both title + navlist horizontally */
  font-family: JMH Typewriter;
  background: white;      /* optional: prevent text from overlapping bg */
  padding: 10px 0;      /* keeps navbar above other content */
}

.title {
font-family: JMH Typewriter;
font-size: 1.75rem;
text-align: center;
margin: 10px 0;
}

.title a {
text-decoration: none;
color: black;
}

.title a:hover {
  color: white;
  background-color: black;
}

.navlist ul {
  display: flex;
  align-items: center;  /* makes all children (li + dropdown) vertically aligned */
  justify-content: center;
  padding: 0;
  margin: 0;
  list-style: none;
}

.navlist li,
.dropdown {
  display: flex;
  align-items: center; /* keeps text & buttons centered in line */
}

.navlist a {
text-decoration: none;
color: black;
padding: 6px 12px;
font-size: 1rem;
}

.navlist a:hover {
color: white;
background-color: black;
}

@media screen and (max-width: 768px) {
  .title {
    font-size: 2rem;
  }
  
}

footer {
    text-align: center;
    font-family: JMH Typewriter;
    bottom: 0;
    width: 100%;
    padding: 10px 0;
}

.dropbtn {
  border: none;
  background: transparent;
  font-family: 'JMH Typewriter';
  font-size: 1rem;
  padding: 6px 12px;
  color: black;
  cursor: pointer;
  line-height: 1;         /* normalize text height */
  vertical-align: middle; /* align with links */
}


.dropbtn:hover {
  color: white;
  background-color: black;
}

.dropdown {
  position: relative;   /* anchor child dropdown menu */
  display: flex;
  align-items: center;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;           /* sit directly below the button */
  left: 0;             /* align with button’s left edge */
  background-color: #f1f1f1;
  min-width: 130px;
  z-index: 1000;       /* keep it above everything else */
  font-family: 'JMH Typewriter';
  box-shadow: 0px 4px 6px rgba(0,0,0,0.1); /* optional: add a soft shadow */
}

  
  /* Links inside the dropdown */
  .dropdown-content a {
    color: black;
    text-decoration: none;
    display: block;
  }
  
  /* Change color of dropdown links on hover */
  .dropdown-content a:hover {background-color: #000000;}
  
  /* Show the dropdown menu on hover */
  .dropdown:hover .dropdown-content {display: block;}
  
  