@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;
}

:root {
  --gallery-foreground: rgb(245, 240, 255);
  --gallery-background: rgb(6, 6, 10);
  --gallery-accent: rgb(255, 183, 77);
  --gallery-muted: rgba(255, 255, 255, 0.45);
}

*,
*::after,
*::before {
  box-sizing: border-box;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.gallery-table {
  margin: 0;
  font-family: "PP Supply Mono", monospace;
  background-color: var(--gallery-background);
  color: var(--gallery-foreground);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  font-weight: 400;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  z-index: 10;
}

body.gallery-table::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background-image: repeating-linear-gradient(
    transparent,
    transparent 2px,
    #ffffff0d 4px
  );
  pointer-events: none;
  z-index: -1;
}

.logo-wrapper-right {
  position: absolute;
  top: 24px;
  right: 32px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.logo-wrapper-right img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
  transition: transform 0.3s ease;
}

.logo-wrapper-right a {
  position: relative;
  display: flex;
  align-items: center;
}

.logo-link-overlay .logo-home-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  visibility: hidden;
  font-size: 0.95rem;
  color: var(--gallery-accent);
  font-weight: 600;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  letter-spacing: 0.06em;
}

.logo-link-overlay:hover .logo-home-text,
.logo-link-overlay:focus .logo-home-text {
  opacity: 1;
  visibility: visible;
}

.portfolio-container::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gallery-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.28;
  z-index: 10;
  pointer-events: none;
  mix-blend-mode: overlay;
}

.portfolio-container {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 120px 3rem 4rem;
  position: relative;
  counter-reset: project-counter 0;
}

.gallery-header {
  margin-bottom: 2rem;
  text-transform: none;
  letter-spacing: normal;
}

.gallery-kicker {
  color: var(--gallery-accent);
  font-size: 0.85rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  margin: 0 0 0.5rem;
}

.gallery-title {
  font-family: "PP Supply Mono", monospace;
  font-size: 2rem;
  letter-spacing: 0.08em;
  margin: 0 0 0.5rem;
  text-transform: uppercase;
}

.gallery-description {
  margin: 0;
  color: var(--gallery-muted);
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: none;
  max-width: 640px;
}

.project-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.project-item {
  cursor: pointer;
  width: 100%;
  display: grid;
  grid-template-columns: 40px 1.4fr 1.4fr 1fr 1fr 80px;
  grid-column-gap: 1.5rem;
  padding: 12px 0;
  align-items: center;
  border-bottom: 1px solid rgba(200, 255, 200, 0.12);
  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.25),
    inset 0 -1px 0 rgba(200, 255, 200, 0.25);
}

.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: "PP Supply Mono", monospace;
  position: relative;
  white-space: nowrap;
  text-decoration: none;
  color: var(--gallery-foreground);
  z-index: 1;
  transition: all 0.3s ease;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1;
  padding: 2px;
}

.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(--gallery-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(12, 12, 12);
}

.background-image {
  position: fixed;
  top: 50%;
  left: 50%;
  width: min(780px, 80vw);
  height: min(520px, 70vh);
  transform: translate(-50%, -50%) scale(1);
  background-size: contain;
  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;
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.65);
  background-color: rgba(0, 0, 0, 0.8);
}

.corner-elements {
  position: fixed;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  width: 100%;
  height: 100%;
  pointer-events: none;
  padding: 2rem;
  z-index: 30;
}

.corner-item {
  font-family: "PP Supply Mono", monospace;
  color: var(--gallery-foreground);
  font-size: 12px;
  padding: 8px;
  pointer-events: auto;
}

.corner-item a {
  color: var(--gallery-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(--gallery-foreground);
  width: 8px;
  height: 8px;
}

.time-blink {
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.gallery-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  text-align: center;
  color: var(--gallery-foreground);
  font-size: 0.85rem;
  padding: 0.65rem 0;
  letter-spacing: 0.15em;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  z-index: 40;
}

.gallery-footer a {
  color: var(--gallery-foreground);
  margin: 0 0.5em;
  text-decoration: none;
}

.gallery-footer a:hover {
  color: var(--gallery-accent);
}

@media (max-width: 1200px) {
  .project-item {
    grid-template-columns: 30px 1fr 1.2fr 1fr 0.9fr 60px;
    grid-column-gap: 1rem;
  }

  .background-image {
    width: min(620px, 80vw);
    height: min(420px, 65vh);
  }
}

@media (max-width: 768px) {
  body.gallery-table {
    font-size: 11px;
  }

  .portfolio-container {
    padding: 100px 1.25rem 5rem;
  }

  .project-item {
    grid-template-columns: 26px 1fr 1fr;
    grid-column-gap: 1rem;
  }

  .project-data:not(.artist):not(.album) {
    display: none;
  }

  .background-image {
    width: min(420px, 90vw);
    height: min(300px, 60vh);
  }
}


