section {
  height: 90dvh;
  padding: 1rem;
  padding-top: 12vh;
}

.magic-text {
  display: flex;
  flex-direction: column;
  height: 1lh;
  overflow: hidden;
  transition: all 0.2s ease-in-out;
  width: 50%;
  margin-top: 1rem;

  &:hover {
    height: max-content;
  }
}

@media (max-width: 768px) {
  .magic-text {
    width: 100%;
  }
}


.works {
  display: flex;
  gap: 1.5rem;
  height: 100%;
  flex-direction: row;
  overflow-x: auto;
  overflow-y: hidden;
  gap: 1rem;
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE/Edge */

  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  /* smooth swipe/scroll */

  article {
    flex: 0 0 auto;
    position: relative;
    width: clamp(250px, 60vw, 500px);
    height: clamp(400px, 70vh, 900px);
    border: 1px solid var(--text-muted);
    overflow: hidden;
    cursor: pointer;
    background: rgba(11, 11, 11, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1rem;
    color: var(--background);
    transition: all 0.2s ease-in-out;
    scroll-snap-align: start;

    /* snap each card */
    img {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: transform 0.4s ease;
      z-index: -1;
    }

    &:hover {
      background: rgba(11, 11, 11, 0.25);
    }

    &:hover img {
      transform: scale(1.1);
    }

    /* project name at top-right */
    .project-name {
      position: absolute;
      top: 1rem;
      right: 1rem;
      font-size: 1rem;
      padding: 0.3rem 0.6rem;
      border-radius: 0.5rem;
      background: rgba(0, 0, 0, 0.5);
    }

    .project-description {
      font-size: 0.95rem;
      line-height: 1.4;
      font-family: "nikyou";
      margin-bottom: 0.75rem;
    }

    .project-type {
      align-self: flex-start;
      font-size: 0.85rem;
      padding: 0.25rem 0.6rem;
      border-radius: 0.4rem;
      font-family: "nikyou";
      background: rgba(0, 0, 0, 0.5);
      border: 1px solid #fff;
      /* white border */
    }
  }
}


/* this should be filtered negative */
.negative {
  filter: invert(1);

  h6 {
    filter: invert(1);
  }

  .project-description {
    filter: invert(1);
  }

  .project-type {
    filter: invert(1);
  }
}

.works::-webkit-scrollbar {
  display: none;
  /* Chrome */
}

.works-wrapper {
  position: relative;
  padding: 1rem;
}

.scrollbar {
  position: absolute;
  top: 100%;
  bottom: 0;
  left: 0;
  right: 0;
  margin-inline: auto;
  width: 70vw;
  height: 1.2rem;
  z-index: 9;
}


.scrollbar-track {
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(90deg,
      #ccc,
      #ccc 2px,
      transparent 2px,
      transparent 8px);
  overflow: hidden;
}

.scrollbar-thumb {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  /* same height as track */
  background: var(--background);
  color: var(--text);
  font-size: 1rem;
  font-family: "nikyou";
  text-align: center;
  line-height: 1.2rem;
  cursor: grab;
  user-select: none;
  white-space: nowrap;

}


article .hover-circle {
  position: absolute;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.4);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  pointer-events: none;
  transform: scale(0);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
  z-index: 5;
}
