@font-face {
  font-family: "PP Supply Mono";
  src: url("https://assets.codepen.io/7558/PPSupplyMono-Variable.woff2")
    format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

*,
*::after,
*::before {
  box-sizing: border-box;
}

:root {
  --color-foreground: rgb(250, 225, 250);
  --color-background: rgb(5, 5, 5);
  --color-accent: rgb(255, 223, 0);
  --font-primary: "PP Supply Mono", monospace;
}

body {
  margin: 0;
  font-family: var(--font-primary);
  background-color: var(--color-background);
  color: var(--color-foreground);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  font-weight: 400;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  position: relative;
  overflow: hidden;
  z-index: 10;
}

body::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background-image: repeating-linear-gradient(
    transparent,
    transparent 2px,
    #ffffff0d 4px
  );
  background-size: auto 100%;
  pointer-events: none;
  z-index: -1;
}

.portfolio-container::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--color-background);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 250 250' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='4' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.3;
  z-index: 100;
  pointer-events: none;
  mix-blend-mode: overlay;
}

.portfolio-container {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100vw;
  padding: 0 2rem;
  position: relative;
  counter-reset: project-counter 0;
}

.project-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.project-item {
  cursor: pointer;
  width: 100%;
  display: grid;
  grid-template-columns: 40px 1fr 2fr 1fr 1fr 80px;
  grid-column-gap: 2rem;
  padding: 12px 0;
  align-items: center;
  border-bottom: 1px solid rgba(200, 255, 200, 0.1);
  transition: all 0.3s ease;
  opacity: 1;
  position: relative;
}

.project-item.active {
  opacity: 1;
  box-shadow: inset 0 1px 0 rgba(200, 255, 200, 0.2),
    inset 0 -1px 0 rgba(200, 255, 200, 0.2);
}

.portfolio-container.has-active .project-item {
  opacity: 0.3;
}

.portfolio-container.has-active .project-item.active {
  opacity: 1;
}

.project-item::before {
  content: counter(project-counter, decimal-leading-zero);
  counter-increment: project-counter;
  padding: 4px 0;
  line-height: 0.8;
  opacity: 0.6;
  justify-self: start;
  z-index: 10;
  position: relative;
  transition: opacity 0.1s ease;
}

.project-item.counter-hidden::before {
  opacity: 0.05;
}

.project-data {
  font-family: var(--font-primary);
  position: relative;
  white-space: nowrap;
  text-decoration: none;
  color: var(--color-foreground);
  z-index: 1;
  transition: all 0.3s ease;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1;
  padding: 2px;
}

.project-data.artist {
  justify-self: start;
}

.project-data.album {
  justify-self: start;
}

.project-data.category {
  justify-self: start;
}

.project-data.label {
  justify-self: start;
}

.project-data.year {
  justify-self: end;
  text-align: right;
}

.project-data::after {
  content: "";
  position: absolute;
  top: 0;
  left: -8px;
  width: calc(100% + 16px);
  height: calc(100% - 2px);
  background: var(--color-accent);
  transition: transform 0.3s ease;
  transform: scaleX(0);
  transform-origin: left;
  z-index: -1;
}

.project-item:hover .project-data::after {
  transform: scaleX(1);
}

.project-item:hover .project-data {
  color: rgb(10, 10, 10) !important;
}

.background-image {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 800px;
  height: 600px;
  transform: translate(-50%, -50%) scale(1);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 0.6s ease,
    transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: -2;
}

.corner-elements {
  position: fixed;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  padding: 2rem;
  z-index: 200;
}

.corner-item {
  font-family: var(--font-primary);
  color: var(--color-foreground);
  font-size: 12px;
  padding: 8px;
  pointer-events: auto;
}

.corner-item a {
  color: var(--color-foreground);
  text-decoration: none;
}

.corner-item a:hover {
  text-decoration: underline;
}

.top-left {
  grid-column: 1 / 2;
  grid-row: 1 / 2;
  align-self: start;
  justify-self: start;
}

.top-right {
  grid-column: 2 / 3;
  grid-row: 1 / 2;
  align-self: start;
  justify-self: end;
}

.bottom-left {
  grid-column: 1 / 2;
  grid-row: 2 / 3;
  align-self: end;
  justify-self: start;
}

.bottom-right {
  grid-column: 2 / 3;
  grid-row: 2 / 3;
  align-self: end;
  justify-self: end;
}

.corner-square {
  background-color: var(--color-foreground);
  width: 8px;
  height: 8px;
}

.time-blink {
  -webkit-animation: blink 1s steps(1) infinite;
          animation: blink 1s steps(1) infinite;
}

@-webkit-keyframes blink {
  50% {
    opacity: 0;
  }
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@media (max-width: 1200px) {
  .project-item {
    grid-template-columns: 30px 1fr 1.5fr 0.8fr 0.8fr 60px;
    grid-column-gap: 1rem;
  }

  .background-image {
    width: 600px;
    height: 450px;
  }
}

@media (max-width: 768px) {
  .portfolio-container {
    padding: 0 1rem;
  }

  .project-item {
    grid-template-columns: 30px 1fr 1fr;
    grid-column-gap: 1rem;
  }

  .project-data:not(.artist):not(.album) {
    display: none;
  }

  .background-image {
    width: 400px;
    height: 300px;
  }
}