.status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-tiny);

  &::before {
    content: "";
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    background: var(--success);
    animation: breathe 3s ease-in-out infinite;
  }
}

.tag-slider.scroll {
  overflow: clip;
}

.tag-slider.scroll .tag-slider-inner {
  animation: tags-slide linear both;
  animation-timeline: view();
}

.tag-slider.scroll.reverse .tag-slider-inner {
  animation-direction: reverse;
}

/* ---------- HOMEPAGE ---------- */
.hero {
  display: flex;
  flex-direction: column;
  gap: var(--space-medium);
  /* height: 100vh; */
  padding: 0;

  margin-bottom: var(--space-sections);

  @media (min-width: 1024px) {
    flex-direction: column-reverse;
    gap: 0;
    height: 80vh;

    position: relative;
  }

  .hero-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-inner);
    text-align: center;
    justify-content: center;
    align-items: center;

    padding: 0 var(--space-sides);

    @media (min-width: 1024px) {
      text-align: left;
      align-items: baseline;
      width: 60%;
      z-index: 1;

      position: absolute;
      bottom: 0;
    }

    h1 {
      text-wrap: pretty;
    }

    p {
      width: 75%;
    }
  }

  .hero-carousel {
    position: relative;
    width: 100%;
    height: 160px;
    /* overflow: hidden; */
    cursor: grab;

    @media (min-width: 1024px) {
      height: 75vh;
      position: absolute;
      top: 15%;
      /* right: -10%; */
    }

    .slide {
      position: absolute;
      will-change: transform, width, height;
    }

    img {
      /* object-fit: cover;
      width: 20%; */

      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;

      -webkit-user-drag: none;
      user-select: none;
      border-radius: var(--border-radius);
    }
  }
  .hero-carousel.is-dragging {
    cursor: grabbing;
  }
}

html:not(.js) {
  .hero {
    @media (min-width: 1024px) {
      align-items: center;
    }
  }

  .hero-content {
    @media (min-width: 1024px) {
      top: -10%;
      align-items: center;
      text-align: center;
    }
  }

  .hero-carousel {
    display: none;
  }
}
.featured-half {
  display: flex;
  flex-direction: column;
  gap: var(--space-medium);

  /* margin-bottom: var(--space-sections); */

  @media (min-width: 768px) {
    flex-direction: row-reverse;
    padding-left: 0;
    padding-right: var(--space-sides);
    gap: var(--space-medium);
    align-items: center;
  }

  .featured-half-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-inner);

    p {
      @media (min-width: 768px) {
        width: 66%;
      }
    }
  }

  .featured-half-img {
    height: 300px;
    object-fit: cover;
    /* object-position: top; */

    @media (min-width: 768px) {
      height: 400px;
    }
  }
}

/* TAG COLORS */
.tag.colored {
  &.tag-color-1 {
    background-color: #60f28e;
  }
  &.tag-color-2 {
    background-color: #1a99a0;
  }
  &.tag-color-3 {
    background-color: #8a2be0;
  }
  &.tag-color-4 {
    background-color: #0000ff;
  }
  &.tag-color-5 {
    background-color: #ff4e95;
  }
  &.tag-color-6 {
    background-color: #cc3535;
  }
  &.tag-color-7 {
    background-color: #ff7a1a;
  }
}

/* TAG SLIDER */
.tag-slider {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;

  &::-webkit-scrollbar {
    display: none;
  }

  .tag-slider-inner {
    display: flex;
    flex-direction: row;
    gap: var(--space-inner);
    padding-right: var(--space-inner);
    animation: slider 20s infinite linear;
  }

  &.scroll {
    overflow: clip;

    .tag-slider-inner {
      animation: tags-slide linear both;
      animation-timeline: view();
    }
  }

  /* After .scroll, so it isn't reset by the animation shorthand */
  &.reverse .tag-slider-inner {
    animation-direction: reverse;
  }
  @media (prefers-reduced-motion: reduce) {
    .tag-slider-inner,
    &.scroll .tag-slider-inner {
      animation: none;
    }
  }
}

.website-principles {
  display: flex;
  flex-direction: column;
  gap: var(--space-medium);
  justify-content: center;

  padding-top: var(--space-sections);
  padding-bottom: var(--space-sections);

  h2 {
    text-align: center;

    svg {
      width: 1.5em;
      height: 1.5em;
      fill: currentColor;
      transform: rotate(-40deg);
      margin-left: -5px;
    }
  }

  /* Draggable tags (class added by JS, desktop only) */
  &.draggable {
    @media (min-width: 768px) {
      overflow: clip;

      .tag-slider.scroll {
        overflow: visible;

        .tag-slider-inner {
          animation: none;
          flex-wrap: wrap;
          justify-content: center;
          width: 100%;
          padding-right: 0;
        }
      }

      .tag {
        cursor: grab;
        user-select: none;
        box-shadow:
          rgba(50, 50, 93, 0.25) 0px 6px 12px -2px,
          rgba(0, 0, 0, 0.3) 0px 3px 7px -3px;
      }
    }
  }
}

.projects {
  display: flex;
  flex-direction: column;
  gap: var(--space-inner);

  /* margin-bottom: var(--space-sections); */

  .projects-header {
    display: flex;
    flex-direction: column;
    gap: var(--space-tiny);
    margin-bottom: var(--space-inner);

    @media (min-width: 768px) {
      flex-direction: row;
      align-items: baseline;
      justify-content: space-between;
    }
  }
}

/* ---------- ABOUT PAGE ---------- */
.about {
  display: grid;
  grid-template-columns: 1fr;
  /* grid-template-rows: 3fr; */
  gap: var(--space-medium);

  margin-bottom: var(--space-sections);

  p {
    width: 80%;
  }

  .about-col-01 {
    @media (min-width: 768px) {
      grid-area: about-col-01;
      align-self: start;
      position: sticky;
      top: var(--space-inner);
    }
  }

  .about-col-02 {
    display: flex;
    flex-direction: column;
    gap: var(--space-inner);

    @media (min-width: 768px) {
      grid-area: about-col-02;
    }
  }

  .about-col-03 {
    .featured-half-img {
      object-fit: cover;
      object-position: top;

      @media (min-width: 768px) {
        height: 600px;
      }
    }

    @media (min-width: 768px) {
      grid-area: about-col-03;
    }
  }

  @media (min-width: 768px) {
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-areas: "about-col-01 about-col-03 about-col-02";
    align-items: end;
    /* grid-template-rows: 3fr; */
  }
}

.quote {
  max-width: 95%;
  margin: auto;

  margin-bottom: var(--space-sections);

  p {
    text-align: center;
    font-size: clamp(1.5rem, 3.5vw, 2rem);
    line-height: clamp(2rem, 3vw, 2.25rem);
  }

  @media (min-width: 768px) {
    max-width: 66%;
  }
}

.tech-stack {
  display: block;

  margin-bottom: var(--space-sections);

  h2 {
    text-align: center;
    margin-bottom: var(--space-inner);
  }

  .logos {
    display: flex;
    flex-wrap: wrap;
    flex-wrap: balance; /* ignored by browsers that don't know it */
    gap: var(--space-tiny);
    align-items: center;
    justify-content: center;

    .single-logo {
      border: 1px solid var(--neutral-950);
      width: 3em;
      height: 3em;
      border-radius: 12px;
      padding: var(--space-tiny);
      background: var(--neutral-50);

      position: relative;

      &::after {
        content: "[ " attr(data-label) " ]";
        position: absolute;
        left: 50%;
        translate: -50% -0.5em;
        padding: 0.1em 0.25em;
        border-radius: 5px;
        background: var(--primary-color);
        color: var(--neutral-50);
        white-space: nowrap;

        opacity: 0;
        scale: 0.5;
        transition:
          opacity 0.3s ease,
          translate 0.3s ease,
          scale 0.3s ease;
      }

      &:hover::after,
      &:focus-within::after {
        opacity: 1;
        scale: 1;
        translate: -50% 0;
      }

      img {
        width: 100%;
        height: 100%;
        object-fit: contain;

        transition: filter 0.3s ease-in-out;

        &:hover {
          filter: brightness(0) saturate(100%) invert(13%) sepia(11%)
            saturate(0%) hue-rotate(239deg) brightness(92%) contrast(90%);
        }
      }
    }
  }
}

/* ---------- SINGLE PROJECT PAGE ---------- */
.single-project-hero {
  display: flex;
  flex-direction: column;
  gap: var(--space-inner);

  margin-bottom: var(--space-sections);

  .top {
    display: flex;
    flex-direction: column-reverse;
    gap: var(--space-inner);

    p {
      width: 80%;
    }

    @media (min-width: 768px) {
      flex-direction: row;
      justify-content: space-between;
      align-items: end;

      p {
        width: 33%;
      }
    }
  }
  .single-project-cover {
    height: 400px;

    @media (min-width: 768px) {
      height: 700px;
    }
  }
}

.single-project-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-medium);

  margin-bottom: var(--space-sections);

  h2 {
    text-align: center;
  }

  .single-project-details {
    display: flex;
    flex-direction: column;
    gap: var(--space-medium);

    .single-project-details-item {
      display: flex;
      flex-direction: column;
      gap: var(--space-inner);
      padding: 0;

      .number {
        font-family: "Neue Power", sans-serif;
        color: var(--neutral-950);
        letter-spacing: 2%;
        font-weight: 500;

        font-size: clamp(1.5rem, 3.5vw, 2rem);
        line-height: clamp(1.5rem, 3vw, 1.75rem);
      }
    }
  }

  @media (min-width: 768px) {
    margin: auto;
    max-width: 66%;
    margin-bottom: var(--space-sections);
  }
}

.single-project-gallery {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr 1fr;
  gap: var(--space-medium);
  margin-bottom: var(--space-sections);

  @media (min-width: 768px) {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr;
  }
}

.featured-projects {
  h2 {
    text-align: center;
    margin-bottom: var(--space-medium);
  }
}

/* ---------- CONTACT PAGE ---------- */
.featured-half {
  .links {
    display: flex;
    flex-direction: row;
    gap: var(--space-inner);
  }
}

@keyframes tags-slide {
  from {
    transform: translateX(-30%);
  }
  to {
    transform: translateX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .tag-slider.scroll .tag-slider-inner {
    animation: none;
    transform: translateX(-10%);
  }
  .tag-slider.scroll.reverse .tag-slider-inner {
    transform: translateX(-20%);
  }
}
/* 
@media (min-width: 768px) {
  .website-principles.draggable {
    overflow: clip;
  }

  .website-principles.draggable .tag-slider.scroll {
    overflow: visible;
  }

  .website-principles.draggable .tag {
    cursor: grab;
    user-select: none;
    touch-action: none;
  }
} */

@keyframes breathe {
  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(36, 223, 104, 0.63);
  }
  50% {
    opacity: 0.6;
    box-shadow: 0 0 0 6px rgba(8, 189, 74, 0);
  }
}
