main {
  padding: 0 20px 40px 20px;
}

.error-msg {
  padding: 50px;
  text-align: center;
}

.project {
  overflow: hidden;
  word-break: break-word;
}

.grid-item:not(.text) .project.has-detail {
  cursor: pointer;
}

.project .thumbnails {
  position: relative;
  width: 100%;
}

.project .thumbnails img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s;
}

.project .thumbnails img:last-child {
  position: absolute;
  top: 0;
  left: 0;
}

.project:hover .thumbnails img.fade-on-hover {
  opacity: 0;
}

.project .project-title {
  position: relative;
  padding-block: 14px 12px;
  font-size: 2.4rem;
  font-weight: 500;
  max-width: max-content;
  margin: auto;
}

.project .project-title.left {
  margin: unset;
  margin-right: auto;
}

.project .project-title.right {
  margin: unset;
  margin-left: auto;
  text-align: right;
}

.project .project-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 100%;
  background-color: var(--color-text);
}

div.project a {
  font-weight: bold;
  text-decoration: underline;
}

div.project a:hover,
div.project a:focus-visible {
  text-decoration: none;
}

@media only screen and (max-width: 850px) {
  main {
    grid-template-columns: 100%;
    padding: 0;
    padding-bottom: 40px;
  }
}
