.work-close {
  position: fixed;
  z-index: 1000;
  top: 1.75rem;
  right: 1.75rem;

  display: flex;
  align-items: center;
  justify-content: center;

  box-sizing: border-box;
  width: 40px;
  height: 40px;
  padding: 0;

  border: 0;
  border-radius: 50%;

  background: #ff5f57;
  color: transparent;

  font-size: 27px;
  font-weight: 400;
  line-height: 1;

  text-decoration: none;

  cursor: pointer;

  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.work-close:hover,
.work-close:focus-visible {
  background: #ff5f57;
  color: #000;
  transform: scale(1.05);
}


/* ---------------------------------
   Work layout
--------------------------------- */

.work-detail {
  display: grid;
  grid-template-columns: minmax(18rem, 1fr) minmax(0, 32rem);
  gap: 5rem;
  align-items: start;

  box-sizing: border-box;
  width: 100%;
  max-width: 72rem;
  min-width: 0;
  margin: 0 auto;
  padding: 4rem 4rem 6rem;
}

.work-info {
  position: sticky;
  top: 4rem;
  align-self: start;

  min-width: 0;
  max-width: 100%;

  overflow-wrap: anywhere;
}


/* ---------------------------------
   Work title and text
--------------------------------- */

.work-heading {
  max-width: 100%;
  margin: 0 0 0.5rem;

  color: #3057c7;
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.1;

  overflow-wrap: anywhere;
}

.work-meta-line {
  max-width: 100%;
  margin: 0 0 2.5rem;

  color: #3057c7;
  font-weight: 400;

  overflow-wrap: anywhere;
}

.work-text {
  max-width: 100%;
  margin-bottom: 2.5rem;

  overflow-wrap: anywhere;
}

.work-text p:first-child {
  margin-top: 0;
}

.work-text a {
  color: #3057c7;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

.work-text a:hover {
  color: #3057c7;
}


/* ---------------------------------
   Work data
--------------------------------- */

.work-data {
  max-width: 100%;
  margin: 0;
}

.work-data-item {
  max-width: 100%;
  margin-bottom: 1.5rem;
}

.work-data-item dt {
  font-weight: 700;
}

.work-data-item dd {
  max-width: 100%;
  margin: 0.25rem 0 0;

  overflow-wrap: anywhere;
}


/* ---------------------------------
   Gallery
--------------------------------- */

.work-gallery {
  display: flex;
  flex-direction: column;
  gap: 2rem;

  box-sizing: border-box;
  width: 100%;
  max-width: 32rem;
  min-width: 0;
  margin-left: auto;
}

.work-image {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
}

.work-image img {
  display: block;

  width: 100%;
  max-width: 100%;
  height: auto;
}

.work-image figcaption {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  margin-top: 0.25rem;
  padding: 0;

  color: #333;
  font-size: 0.85rem;
  line-height: 1.25;
  text-align: left;

  overflow-wrap: anywhere;
}

.work-image figcaption div,
.work-image figcaption p {
  max-width: 100%;
  margin: 0;
  padding: 0;
}

.work-image figcaption div + div {
  margin-top: 0.1rem;
}


/* ---------------------------------
   Video
--------------------------------- */

.video-wrapper {
  position: relative;

  width: 100%;
  max-width: 100%;

  cursor: pointer;
}

.video-wrapper video {
  display: block;

  width: 100%;
  max-width: 100%;
  height: auto;
}

.video-play-button {
  position: absolute;
  top: 50%;
  left: 50%;

  transform: translate(-50%, -50%);

  color: rgba(255, 255, 255, 0.95);
  font-size: 5.5rem;
  font-weight: 400;
  line-height: 1;

  text-shadow:
    0 0 8px rgba(0, 0, 0, 0.4),
    0 0 18px rgba(0, 0, 0, 0.3);

  pointer-events: none;

  opacity: 1;

  transition: opacity 0.2s ease;
}

.video-wrapper:hover .video-play-button,
.video-wrapper:focus-within .video-play-button {
  opacity: 0;
}


/* ---------------------------------
   Tablet / Mobile
--------------------------------- */

@media (max-width: 800px) {

  .work-close {
    top: 1.25rem;
    right: 1.25rem;
  }

  .work-detail {
    grid-template-columns: minmax(0, 1fr);
    gap: 3rem;

    width: 100%;
    max-width: 100%;

    padding: 3rem 1.25rem 4rem;
  }

  .work-info {
    position: static;

    width: 100%;
    max-width: 100%;
    min-width: 0;

    padding-right: 4rem;
  }

  .work-gallery {
    width: 100%;
    max-width: 100%;
    min-width: 0;

    margin-left: 0;
  }

  .work-image {
    width: 100%;
    max-width: 100%;
  }

  .video-play-button {
    font-size: 5rem;
  }
}


/* ---------------------------------
   Small Mobile
--------------------------------- */

@media (max-width: 480px) {

  .work-close {
    top: 1rem;
    right: 1rem;

    width: 38px;
    height: 38px;

    font-size: 25px;
  }

  .work-detail {
    gap: 2.5rem;

    padding-top: 2rem;
    padding-right: 1rem;
    padding-bottom: 3rem;
    padding-left: 1rem;
  }

  .work-info {
    padding-right: 3.5rem;
  }

  .work-heading {
    font-size: 1.9rem;
  }

  .work-meta-line {
    margin-bottom: 2rem;
  }

  .work-text {
    margin-bottom: 2rem;
  }

  .work-gallery {
    gap: 1.75rem;
  }

  .video-play-button {
    font-size: 4.5rem;
  }
}


/* ---------------------------------
   Touch devices
--------------------------------- */

@media (hover: none) {

  .work-close {
    color: #000;
  }
}


/* ---------------------------------
   Reduced Motion
--------------------------------- */

@media (prefers-reduced-motion: reduce) {

  .work-close,
  .video-play-button {
    transition: none;
  }

  .work-close:hover {
    transform: none;
  }
}
