/* -------------------------------------------------------
   BASIC RESET & VARIABLES
------------------------------------------------------- */
:root {
  --cover-size: 15rem;
  --color-main: rgb(0, 0, 0);
  --color-switch: lightgrey;
  --font-size-1: 0.9rem;
  --switchHeight: 25px;
  --switchWidth: 60px;
  --dotSize: 21px;
  --switchMargin: 2px;
  --aboutWidth: 25vw;
}

@media (max-width: 1024px) {
  :root {
    --cover-size: 9rem;
    --aboutWidth: 50vw;
  }
}

@media (max-width: 600px) {
  :root {
    --cover-size: 6rem;
    --switchHeight: 20px;
    --switchWidth: 60px;
    --dotSize: 16px;
    --switchMargin: 2px;
    --font-size-1: 0.85rem;
    --aboutWidth: 100%;
  }
}

img,
picture {
  max-width: 100%;
  display: block;
}

html, body {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
}

body {
    background: var(--color-main);
    font-family: "Helvetica Neue";
    display: flex;
    flex-direction: column;
    overscroll-behavior: contain;
    box-sizing: border-box;
}

.header {
    position: fixed;
    left: 50%;
    top: 1.2rem;
    transform: translateX(-50%);
    z-index: 300;
}

.header svg {
    width: 25vw;
    min-width: 250px;
}

@media (max-width: 600px) {
  .header {
    top: 1.2rem;
  }
  .header svg {
    width: 35vw;
    min-width: 0px;
  }
}

/* .header {
    position: sticky;
    top: 0rem;
    padding: 1rem;
    z-index: 300;
    background: #ffffff;
    background: linear-gradient(0deg,rgba(255, 255, 255, 1) 0%, rgba(158, 158, 158, 1) 100%);
} */

/* -------------------------------------------------------
   WRAPPER
------------------------------------------------------- */
.cards-wrapper, .cards-wrapper * {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

.cards-wrapper {
    overflow-x: scroll;
    --size: 6;
    min-height: calc(var(--cover-size) * 2.5);
    /* width: calc(var(--cover-size) * var(--size)); */
    margin: 0 auto;
    padding: calc(var(--cover-size) / 3 * 2) 0;
    position: relative;
    width: 100vw;
    background: var(--color-main);
    /* Always enable scroll snapping */
    scroll-snap-type: x mandatory;
    scrollbar-width: none;      /* Firefox */
}

/* -------------------------------------------------------
   LIST / ITEMS
------------------------------------------------------- */
.cards {
    list-style: none;
    white-space: nowrap;
}

.cards li {
    display: inline-block;
    width: var(--cover-size);
    height: var(--cover-size);
    scroll-snap-align: center;
}

/* .cards li a {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
} */

.cards li a {
    display: block;
    width: var(--cover-size);
    height: var(--cover-size);
    -webkit-box-reflect: below 0.5em
      linear-gradient(rgba(148, 89, 89, 0), rgba(0, 0, 0, 0.2));
    animation: linear rotate-cover both;
    animation-timeline: view(inline);

    transform: translateX(-100%) rotateY(-45deg);
    transform-style: preserve-3d;
    will-change: transform;
    user-select: none;
    position: relative;
}

.cards li picture img {
    width: 100%;
    height: 100%;
    aspect-ratio: 1;
    pointer-events: none; /* so clicking hits the link */
}

/* Center the first and last images */
.cards li:first-of-type {
    margin-left: calc(50% - (var(--cover-size) / 2));
}
.cards li:last-of-type {
    margin-right: calc(50% - (var(--cover-size) / 2));
}

@media (max-width: 600px) {
    .cards-wrapper {
      /* display: none; */
      margin-top: 2rem;
    }
     /* .cards-wrapper {
        height: 50vh;
        padding: 0;
     }
     .cards {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
     } */
}

/* -------------------------------------------------------
   3D & ANIMATION OG  perspective 40 rotate 45
------------------------------------------------------- */

.cards-wrapper { perspective: 45em; }
.cards { transform-style: preserve-3d; }
.cards li { transform-style: preserve-3d; }

@keyframes rotate-cover {
  0% {
    transform: translateX(-100%) rotateY(-50deg);
  }
  35% {
    transform: translateX(0) rotateY(-50deg);
  }
  50% {
    transform: rotateY(0deg) translateZ(1em) scale(1.5);
  }
  65% {
    transform: translateX(0) rotateY(50deg);
  }
  100% {
    transform: translateX(100%) rotateY(50deg);
  }
}

.project-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-top: 1rem;
    padding: 0;
}

.list_item {
    border-bottom: 1px solid black;
    display: grid;
    grid-template-rows: max-content 0fr;
    transition: grid-template-rows 0.1s ease;
    font-size: var(--font-size-1);
    /* -webkit-box-shadow: 0px -4px 14px -7px #000000; 
    box-shadow: 0px -4px 14px -7px #000000; */
}
.list_item:first-of-type {
  border-top: 1px solid transparent;
}
.list_item:nth-child(odd) {
  background-color: white;
  transition: all 0.3s;
}
.list_item:nth-child(even) {
  background-color: rgb(235, 235, 235);
  transition: all 0.3s;
}
.list_item:hover {
  background-color: rgb(193, 193, 193); 
}
.list_item.opened {
    grid-template-rows: max-content 1fr;
    color: white;
    transition: all 0.3s;
    background-color: #000000;
}
.list_item.opened:first-of-type {
  border-top: 1px solid white;
}
.list_item.opened img {
  content-visibility: visible;
}
.list_item:not(.opened) img {
  content-visibility: hidden;
}

.list_item_top {
    margin: 0.5rem;
    display: grid;
    grid-template-columns: 1.5fr 1fr 0.5fr 8ch;
}
/* .list_item:first-of-type {
    font-weight: 800;
    -webkit-box-shadow: -1px 6px 15px -11px rgba(0,0,0,0.98); 
    box-shadow: -1px 6px 15px -11px rgba(0,0,0,0.98); 
    z-index: 10;
} */
.list_item_top:hover {
    cursor: s-resize;
}
.list_item.opened .list_item_top:hover {
    cursor: n-resize;
}

.list_item_top span:not(:first-child) {
    margin-left: 1rem;
}

.list_item_top span:not(:last-child) {
    border-right: 1px solid darkgray;
}
.list_item:nth-child(even) .list_item_top span:not(:last-child) {
    border-right: 1px solid white;
}

@media (max-width: 600px) {
    .project-list {
      margin-block: 0rem;
      /* margin-top: 3.6rem; */
    }
    .list_item_top {
      grid-template-columns: 1fr;
    }
    .mobileGone {
      display:  none;
    }
    .list_item_top span:not(:last-child) {
      border-right: none;
    }
    .list_item:nth-child(even) .list_item_top span:not(:last-child) {
      border-right: none;
    }
}

.top_year {
  justify-self: end;
}

.list_item_bottom {
    overflow: hidden;
}

.list_item_bottom_content {
    display: flex;
    gap: 0.5rem;
    overflow-x: scroll;
    white-space: nowrap;
    padding: 0 0.5rem 0.5rem 0.5rem;
    overflow-y: hidden;
    gap: 0.5rem;
}

.list_item_bottom_content picture {
    flex: 0 0 auto;
}

.list_item_bottom_content picture img {
    height: 50vh;
    /* aspect-ratio: 1; */
    object-fit: cover;
}

@media (max-width: 600px) {
  .list_item_bottom_content picture img {
    width: 70vw;
    height: auto;
  }
}

.cards-wrapper::-webkit-scrollbar {
  display: none;
}

/* Slider */

.custom-slider {
  width: calc(100% - 2rem);
  position: relative;
  margin: 0 1rem 3rem;
}

.slider-track { 
  width: 100%; 
  height: 40px; 
  position: relative; 
  border-radius: 50px; 
  background: #e8e8e8;
  background: linear-gradient(180deg,rgba(232, 232, 232, 1) 0%, rgba(153, 153, 153, 0.96) 51%, rgba(232, 232, 232, 1) 100%);
}

.slider-thumb {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  /* remove translateX so left=0 is left edge */
  transform: translateY(-50%);
  cursor: grab;
  touch-action: none;
  background:
    conic-gradient(
      from 90deg,
      #ffffff 0deg,
      #cfcfcf 20deg,
      #7f7f7f 60deg,
      #bbbbbb 100deg,
      #ffffff 140deg,
      #d0d0d0 180deg,
      #6a6a6a 220deg,
      #b5b5b5 260deg,
      #ffffff 300deg,
      #cfcfcf 340deg,
      #ffffff 360deg
    );
}

@media (max-width: 1200px) {
    .custom-slider {
      margin: 0 1rem 1rem;
      /* display: none; */
    }
    .slider-track {height: 25px; }
    .slider-thumb {width: 25px;height: 25px;}
}

/* About Section */

.about {
  width: var(--aboutWidth);
  height: 100dvh;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 400;
  transform: translateX(-100%);
  background-color: #c2c2c2;
  border: 1px solid #a7a7a7;
  transition: transform 0.3s ease-in-out;
  display: grid;
  grid-auto-rows: 1fr auto;
  font-size: var(--font-size-1);
}

.about.active {
  transform: translateX(0);
}

.about > div:first-child {
  overflow: scroll;
}

.about_item {
    display: grid;
    grid-template-rows: max-content 0fr;
    border-bottom: 1px solid black;
    transition: grid-template-rows 0.2s ease;
}
.about_item.opened {
  grid-template-rows: max-content 1fr;
}
.about_item_top {
  padding: 0.5rem;
  display: flex;
  justify-content: space-between;
}
.socials_link {
  display: block;
  padding: 0.5rem 0 0 0.5rem;
  color: inherit;
  text-decoration: none;
}
@media (max-width: 600px) {
  .about_item_top {
    padding: 1.2rem 0.5rem;
  }
  .socials_link {
    padding: 1.2rem 0.5rem 0 0.5rem;
  }
}

.about_item_top:hover {
  background-color: rgb(188, 188, 188);
}
.about_item_top span {
  background-color: rgb(108, 108, 255);
  color: white;
  border-radius: 2rem;
  padding: 0.1rem 0.6rem;
  font-size: 0.8rem;
}
.about_item_bottom_wrapper {
  overflow: hidden;
}
.about_item_bottom {
  padding: 0.5rem;
}

.about > div:last-child {
  padding: 0.5rem;
}

.about > div:last-child img {
  aspect-ratio: 1;
  width: 100%;
  object-fit: cover;
}

/* SWITCH */

.switch_wrapper {
  position: fixed;
  top: 1rem;
  right: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 600;
}

.switch_wrapper span {
  color: lightgray;
  margin-top: 0.05rem;
  font-size: var(--font-size-1);
}

.switch_wrapper span img {
  height: calc(var(--dotSize) / 2);
}

@media (max-width: 600px) {
  .switch_wrapper {
    right: 0.5rem;
  }
  .switch_wrapper span {
    display: none;
  }
}

.switch {
  position: relative;
  height: var(--switchHeight);
  width: var(--switchWidth);
  border: 1px solid lightgray;
  border-radius: 50rem;
  background: rgba(0, 0, 0, 0.29);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(3.8px);
  -webkit-backdrop-filter: blur(3.8px);
}

.dot {
  position: absolute;
  left: var(--switchMargin);
  height: var(--dotSize);
  width: var(--dotSize);
  top: var(--switchMargin);
  background-color: var(--color-switch);
  border-radius: 50rem;
  transition: all 0.1s ease;
}

.dot.active {
  left: calc(var(--switchWidth) - var(--switchMargin));
  transform: translateX(-100%);
}

.close_button {
  display: inline-block;
  padding: 1rem;
}

.message,
.message_mobile {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  z-index: 10000000;
  color: whitesmoke;
  background-color: rgba(22, 22, 22, 0.9);
  padding: 0.3rem;
  display: none;
  border-radius: 0.4rem;
  text-align: center;
}
@media (max-width: 600px) {
  .message_mobile {
    display: flex;
    flex-direction: column;
    width: 90%;
  }
  .message_mobile.invisible {
    transform: translateX(-50%) translateY(calc(100% + 1rem));
    transition: transform 0.2s;
  }
}

.message.visible {
    display: flex;
    flex-direction: column;
    width: max-content;
}
.message.invisible {
  transform: translateX(-50%) translateY(calc(100% + 1rem));
  transition: transform 0.2s;
}
.message span,
.message_mobile span {
  background-color: white;
  color: black;
  padding: 0.3rem;
  border-radius: 0.2rem;
}
.message span:hover,
.message_mobile span:hover {
  cursor: pointer;
  background-color: lightgrey;
}
.message p {
  margin-inline: 0.4rem;
}
@media (max-width: 600px) {
  .message.visible {
    display: none;
  }
}

.cls-1,
.cls-2,
.cls-3,
.cls-4,
.cls-5,
.cls-6,
.cls-7 {
    fill:  var(--color-switch);;
}

.project-filter {
  z-index: 100;
  display: block;
}

.filter_desktop {
  position: fixed;
  top: 1rem;
  left: 1rem;
  border: 1px solid var(--color-switch);
  border-radius: 10rem;
  padding: 0.5rem;
  background: rgba(0, 0, 0, 0.29);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(3.8px);
  -webkit-backdrop-filter: blur(3.8px);
  /* display: flex;
  flex-direction: column; */
}

input[type='radio'] {
    accent-color: #232323;
    color: var(--color-switch);
}

.filter_mobile {
    display: none;
}

@media (max-width: 1200px) {
  .filter_desktop {
    display: none;
  }
  .filter_mobile {
    display: flex;
    position: relative;
    justify-content: center;
    padding-block: 0.5rem 1rem;
  }
}

.project-filter label {
  color: var(--color-switch);
  margin-right: 0.5rem;
  font-size: var(--font-size-1);
}
.project-filter label:hover {
  cursor: pointer;
}

.list_item.inactive {
  /* text-decoration: line-through;
  text-decoration-thickness: 10px; */
  opacity: 0.5;
  pointer-events: none;
}

.cards li a {
  position: relative; /* required */
}

.cards li.inactive {
  pointer-events: none;
}

/* hide the real image */
.cards li.inactive picture {
  opacity: 0;
}

.cards li.inactive a {
  position: relative;
  display: block; /* oder inline-block */
}

.cards li.inactive a::after {
  content: "";
  position: absolute;
  inset: 0;
  display: block;
  background-image: url("https://eriksovt.com/assets/img/nope.jpeg");
  background-size: cover;
  background-position: center;
  pointer-events: none;
}

input[value="all"] {
    accent-color: rgb(255, 200, 0);
    text-decoration: underline;
}

