* {
  box-sizing: border-box;
}

body {
  background-color: whitesmoke;
  color: #333;
  font-family: monospace;

  margin: 0;
  padding: 0;
}

header {
  color: whitesmoke;
  font-weight: bold;
  z-index: 1;
  padding: 1em 0;
  position: fixed;
  width: 100vw;

  height: 3em;

  display: flex;
  justify-content: space-between;
  text-align: end;

  background-color: rgba(0, 0, 0, .8);
  border-bottom: 1px solid #333;
}

li {
  cursor: pointer;
}

.alphabet {
  display: flex;
  flex-wrap: wrap;
  gap: 1em;
}

.alphabet * {
  flex: 1 1 auto;
}

.alphabet#A {
  flex-grow: 6;
}

div.box {
  height: 5em;
  border-radius: 1em;
  border: 1px solid #333;
}

main {
  padding: 1em;
  padding-top: 4em;
}

nav {
  display: flex;
}

img.box {
  max-width: 50vw;
  max-height: 50vw;
}

#A {
  background-color: #8c8888;
  opacity: 1;
}

#B {
  background-color: #8c8888;
  opacity: 0.8;
}

#C {
  background-color: #8c8888;
  opacity: 0.5;
}

#D {
  background-color: #8c8888;
  opacity: 0.4;
}

#E {
  background-color: #8c8888;
  opacity: 0.2;
}

/* Menu */
@media screen and (min-width: 768px) {
  #A {
    min-width: 100%;
  }

  #B,
  #E {
    min-width: 70%;
  }

  #C,
  #D {
    min-width: 20%;
  }

  label {
    display: none;
  }
}

@media screen and (max-width: 768px) {

  #A,
  #B,
  #C {
    min-width: 100%;
  }

  #E,
  #D {
    min-width: 45%;
  }

  body {
    font-size: large;
  }

  nav {
    display: none;
  }

  label {
    margin: 0 1em;
    text-align: end;
  }
}

/* Navigation */
.top-nav {
  display: flex;

  justify-content: space-between;
  height: 50px;
  padding: 1em;
}

.menu {
  display: flex;
  flex-direction: row;
  list-style-type: none;
  margin: 0;
  padding: 0;
}

.menu>li {
  margin: 0 1em;
  overflow: hidden;
}

.cross-container {
  display: none;
  height: 100%;
  width: 30px;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#checkbox {
  display: none;
}

.cross::before,
.cross::after {
  display: block;
  background-color: whitesmoke;

  position: absolute;
  height: 6px;
  width: 30px;

  transition: 0.5s;
}

.cross::before {
  content: "";
  margin-top: -6px;
}

.cross::after {
  content: "";
  margin-top: 6px;
}

#checkbox:checked+.cross-container .cross::before {
  margin-top: 0px;
  transform: rotate(45deg);
}

#checkbox:checked+.cross-container .cross {
  background: rgba(255, 255, 255, 0);
}

#checkbox:checked+.cross-container .cross::after {
  margin-top: 0px;
  transform: rotate(-45deg);
}

@media (max-width: 768px) {
  .cross-container {
    display: flex;
  }

  .menu {
    position: absolute;
    top: 0;
    left: 0;

    margin-top: 3em;
    flex-direction: column;
    width: 100%;
    align-items: center;
  }

  #checkbox~.menu li {
    height: 0;
    transition: 0.5s;
  }

  #checkbox:checked~.menu li {
    background-color: rgba(0, 0, 0, .8);

    height: 2.5em;
    padding: 0.5em;
    transition: 0.5s;
  }

  .menu>li {
    width: 100%;
  }
}

/* Image field */
.gallery {
  column-count: 3;
  gap: 1em;
}

.gallery img {
  width: 100%;
  margin-bottom: 1em;
  border-radius: 1em;
}

@media screen and (max-width: 768px) {
  .gallery {
    column-count: 2;
  }
}