@import url("https://fonts.googleapis.com/css2?family=DM+Mono:ital,wght@0,300;0,400;0,500;1,300;1,400;1,500&family=Playfair+Display:ital,wght@0,400..900;1,400..900&family=Play:wght@400;700&family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap");

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--primary-color) var(--back-color);
}
html.lenis,
html.lenis body {
  height: auto;
}
.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}
.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}
.lenis.lenis-stopped {
  overflow: hidden;
}
.lenis.lenis-smooth iframe {
  pointer-events: none;
}
:root {
  --back-color: hsl(0, 0%, 95%);
  --text-color: hsl(200, 10%, 6%);
  --primary-color: hsl(234, 89%, 74%);
  --accent: hsl(234, 89%, 74%);
  --accent-dark: hsl(234, 89%, 60%);

  --border: 2px var(--variant-3) solid;
  --gap: 1rem;
  --gap-big: 1.5rem;

  --variant-1: var(--primary-color);
  --variant-2: #d5d9d2;
  --variant-3: #b0b3ad;
  --disabled-folder-bg: #e8ebe4;
  --disabled-folder-fg: #b0b3ad;
}
::-moz-selection,
::selection {
  color: var(--text-color);
  background: var(--primary-color);
}
body {
  height: 100%;
  width: 100%;
  background-color: var(--back-color);
  color: var(--text-color);
  overflow-x: hidden;
}
section {
  min-height: 100vh;
}
li {
  list-style: none;
  text-decoration: none;
}
a {
  color: inherit;
  text-decoration: none;
}
hr {
  margin-block: 1rem 0;
  border: none;
  border-top: var(--border);
}
img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.container {
  padding-inline: 8rem;
}
.marquee {
  font-family: "Play", sans-serif;
  overflow: hidden;
  display: flex;
  background-color: var(--primary-color);
  color: var(--back-color);
  width: 150vw;
  margin-left: -50rem;
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
}
.marquee h1 {
  margin-block: 1rem;
  font-size: 2.5rem;
  white-space: nowrap;
  text-transform: uppercase;
}
.projects {
  position: relative;

  h1 {
    font-family: "Play", sans-serif;
    font-size: 2.75rem;
    font-weight: 400;
  }
  p,
  h2 {
    text-transform: uppercase;
    font-family: "DM Mono", monospace;
    font-size: 0.9rem;
    font-weight: 500;
  }
  h1,
  p,
  h2 {
    transition: color 0.2s ease;
  }
  h2 {
    font-family: "Play", sans-serif;
    font-weight: 700;
    letter-spacing: 1px;
    font-size: 1.25rem;
  }
  nav {
    position: absolute;
    top: 10rem;
    width: 100%;
    padding: 2rem;
    display: flex;
    justify-content: space-between;
  }
  .folders {
    width: 100%;
    height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
  }
  .row {
    position: relative;
    width: 100%;
    display: flex;
  }
  .folder {
    position: relative;
    flex: 1;
    height: 220px;
    display: flex;
    flex-direction: column;
    cursor: pointer;
  }
  .row:nth-child(2) .folder:nth-child(1) {
    flex: 2;
  }
  .row:nth-child(2) .folder:nth-child(2) {
    flex: 3;
  }
  .folder-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 25rem;
    height: 100%;
    pointer-events: none;
  }
  .folder-preview-img {
    position: absolute;
    top: 50%;
    width: 20vw;
    height: 20vh;
  }
  .folder-preview-img:nth-child(1) {
    left: 20%;
    transform-origin: top left;
  }
  .folder-preview-img:nth-child(2) {
    left: 50%;
    transform-origin: center;
  }
  .folder-preview-img:nth-child(3) {
    left: 80%;
    transform-origin: top right;
  }
  .folder-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    will-change: transform;
  }
  .folder-index {
    position: relative;
    width: 40%;
    border-top-left-radius: 0.5rem;
    padding: 0.75rem;
    padding-left: 1rem;
  }
  .purple-slash {
    color: var(--accent-dark);
  }
  .folder-index::after {
    content: "";
    position: absolute;
    top: 0;
    left: 99%;
    height: 101%;
    aspect-ratio: 1;
    clip-path: polygon(0 0, 20% 0, 100% 100%, 0% 100%);
  }
  .folder-name {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-start;
    padding: 0rem 0.25rem;
    padding-left: 2rem;
  }
  .folder-index,
  .folder-index::after,
  .folder-name {
    transition: background-color 0.2s ease;
  }
  .folder.variant-1 .folder-index,
  .folder.variant-1 .folder-index::after,
  .folder.variant-1 .folder-name {
    background-color: var(--variant-1);
  }
  .folder.variant-2 .folder-index,
  .folder.variant-2 .folder-index::after,
  .folder.variant-2 .folder-name {
    background-color: var(--variant-2);
  }
  .folder.variant-3 .folder-index,
  .folder.variant-3 .folder-index::after,
  .folder.variant-3 .folder-name {
    background-color: var(--variant-3);
  }
  .folder.disabled .folder-index,
  .folder.disabled .folder-index::after,
  .folder.disabled .folder-name {
    background-color: var(--disabled-folder-bg);
  }
  .folder.disabled p,
  .folder.disabled h1 {
    color: var(--disabled-folder-fg);
  }
  .row:nth-child(1) {
    bottom: -13rem;
  }
  .row:nth-child(2) {
    bottom: -7.5rem;
  }
  .row:nth-child(3) {
    bottom: -1rem;
  }
  @media (max-width: 1000px) {
    h1 {
      font-size: 2rem;
    }
    .row {
      flex-direction: column;
      bottom: 0 !important;
    }
    .folder {
      margin-bottom: -0.5rem;
    }
    .folder-preview {
      display: none;
    }
    .folder-name {
      padding: 0 2rem 2rem;
    }
    .row:nth-child(2) .folder.variant-2 .folder-index,
    .row:nth-child(2) .folder.variant-2 .folder-index::after,
    .row:nth-child(2) .folder.variant-2 .folder-name {
      background-color: var(--variant-3);
    }
    .row:nth-child(2) .folder.variant-3 .folder-index,
    .row:nth-child(2) .folder.variant-3 .folder-index::after,
    .row:nth-child(2) .folder.variant-3 .folder-name {
      background-color: var(--variant-2);
    }
  }
  &.overlay-open::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    pointer-events: none;
    z-index: 1;
  }
  .overlay {
    position: absolute;
    bottom: -1200px;
    right: 0;
    width: 90%;
    height: 90%;
    padding: 2rem;
    color: var(--text-color);
    background-color: var(--back-color);
    border-top-right-radius: 1rem;
    border-top-left-radius: 1rem;
    overflow-x: hidden;
    overflow-y: scroll;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    z-index: 2;
    will-change: bottom;
    transform: translateZ(0) rotate(20deg);
    transform-origin: bottom center;
    display: none;
    scrollbar-width: none;

    p {
      text-transform: capitalize;
      font-size: 1rem;
    }
    h1 {
      font-family: "Play", sans-serif;
      font-size: 3rem;
      font-weight: 400;
      letter-spacing: 1px;
    }
    .purple-slash {
      color: var(--primary-color);
    }
  }
  .overlay::-webkit-scrollbar {
    display: none;
  }
  .img-container {
    width: 100%;
    padding-bottom: 2em;
  }
  #item-desc {
    display: block;
  }
  #item-desc p {
    margin: 1rem 0 1.25rem 0;
    line-height: 1.75;
  }
  img {
    border-radius: 0.25rem;
  }
  .overlay-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 2em 0;
  }
  .col:nth-child(1) {
    flex: 3;
  }
  .col:nth-child(2) {
    flex: 2;
  }
  #close-btn {
    cursor: pointer;
    opacity: 0.4;
  }
  .item-details {
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 1em 0 4em 0;

    div {
      display: flex;
      gap: 2rem;

      p a {
        transition: color 0.2s ease;
      }
      p a:hover {
        color: var(--primary-color);
      }
    }
  }
  .item-details div:nth-child(1) {
    flex: 3;
  }
  .item-details p:nth-child(2) {
    flex: 2;
  }
  @media (max-width: 900px) {
    .items {
      width: 100%;
      bottom: 8em;
    }
    .overlay {
      width: 100%;
      height: 100svh;
    }
  }
}
