* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background-color: lightgrey;
  padding-bottom: 4rem;
  color: #111111;
}

main {
  display: flex;
  flex-direction: column;
  padding: 0 12rem;
}

.site-header {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  padding: 0 12rem;
  min-height: 6rem;
  border-bottom: 1px solid black;
  background-color: #b1b1b1;
  gap: 1rem;
}

.site-header .logo {
  max-height: 4rem;
  display: block;
}

.header-item:not(:first-child) {
  margin-left: clamp(1rem, 2vw, 2rem);
}

.site-nav a:not(:first-child) {
  margin-left: clamp(1rem, 2vw, 2rem);
}

.site-nav a,
.mobile-nav-panel nav a {
  color: #111111;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.mobile-nav-panel nav a:hover,
.mobile-nav-panel nav a:focus-visible {
  color: #000000;
}

.site-header .header-item,
.site-nav a {
  white-space: nowrap;
}

.site-footer {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 0 12rem;
  position: fixed;
  bottom: 0;
  left: 0;
  height: 4rem;
  background-color: #b1b1b1;
  width: 100%;
  border-top: 1px solid black;
  z-index: 10;
}

.spacer {
  flex-grow: 1;
}

.flex-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
}

.nav-toggle {
  display: none;
  border: none;
  background: transparent;
  padding: 8px;
  margin-left: auto;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
}

.nav-toggle .bar {
  display: block;
  width: 24px;
  height: 2px;
  background: #111111;
}

.mobile-nav {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  z-index: 20;
}

.mobile-nav.is-open {
  display: block;
}

.mobile-nav-panel {
  background: #f0f0f0;
  width: 80%;
  max-width: 320px;
  height: 100%;
  padding: 2rem 0;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.25);
  margin-left: auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  position: relative;
}

.mobile-nav-panel nav {
  display: flex;
  flex-direction: column;
  margin-top: 1.5rem;
  align-items: center;
  width: 100%;
}

.mobile-nav-panel nav a {
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
  width: 100%;
  padding-top: 1rem;
  padding-bottom: 1rem;
  margin: 0;
}

.mobile-nav-panel nav a:first-child {
  border-top: 1px solid rgba(0, 0, 0, 0.2);
}

.mobile-nav-panel a {
  font-size: 1.2rem;
}

.mobile-nav-close {
  border: none;
  background: transparent;
  color: #111111;
  padding: 6px;
  border-radius: 999px;
  cursor: pointer;
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 24px;
  line-height: 1;
}

.mobile-nav-meta {
  margin-top: 2rem;
  font-size: 0.9rem;
  color: #333333;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

body.nav-open {
  overflow: hidden;
}

@media (max-width: 900px) {
  main {
    padding: 0 1.5rem;
  }

  .site-header {
    padding: 0 1.5rem;
    flex-wrap: wrap;
    min-height: auto;
  }

  .site-header .logo {
    max-height: 3rem;
  }

  .header-item:not(:first-child) {
    display: none;
  }

  .header-item:not(:first-child) {
    margin-left: 0;
  }

  .site-nav {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .site-footer {
    display: none;
  }

  body {
    padding-bottom: 0;
    margin-bottom: 0;
  }

  body::after {
    content: "";
    display: block;
    height: 1rem;
  }
}
