body {
  color: rgba(0, 0, 0, 0.5);
}

header {
  position: relative;
  z-index: 10;
}

main {
  padding: clamp(2px, calc(4vw - 30px), 50px) clamp(20px, 2.2vw, 48px) clamp(20px, 2.2vw, 48px) clamp(40px, 5.5vw, 120px);
  max-width: 80vw;
  position: relative;
  z-index: 10;
}

.project-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75em;
}

.project-link {
  display: inline-flex;
  align-items: baseline;
  text-decoration: none;
  color: rgba(0, 0, 0, 0.5);
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 300;
  font-size: 20px; /* overridden by JS fitText */
  line-height: 1.3;
  letter-spacing: -0.01em;
  max-width: 80vw;
  transition: color 0.3s ease, opacity 0.3s ease;
  cursor: pointer;
}

.project-list:hover .project-link {
  opacity: 0.5;
  transition: color 0.3s ease, opacity 0.3s ease;
}

.project-list .project-link:hover {
  opacity: 1;
  color: #000;
}

.project-link .arrow {
  display: inline-block;
  margin-left: 8px;
  transition: color 0.3s ease;
  font-size: clamp(16px, 1.25vw, 24px);
}

.project-link:hover .arrow {
  animation: nudge 0.8s ease-in-out infinite;
}

@keyframes nudge {
  0%, 100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(5px);
  }
}

.project-link .client {
  font-style: italic;
  color: #000;
  transition: color 0.3s ease;
}

.project-link .description {
  transition: color 0.3s ease;
}

.project-link:hover .client {
  color: #000;
}

.project-link:hover .description {
  color: #0000EE;
}

/* Classified project — no link, cross icon, hover swaps description */
.project-link.classified {
  cursor: default;
}

.project-link.classified:hover {
  color: rgba(0, 0, 0, 0.5);
}

.project-link.classified .arrow {
  animation: none !important;
}

.project-link.classified:hover .description {
  color: rgba(0, 0, 0, 0.5);
}

/* Image highlights */
.image-highlights {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 100;
}

.highlight-group {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.highlight-group.active {
  opacity: 1;
}

.highlight-block {
  position: absolute;
  border-radius: 2px;
  background-size: cover;
  background-position: center;
}

/* Per-project highlight positions are generated inline by build.js */

footer {
  position: relative;
  z-index: 10;
}

/* Mobile */
@media (max-width: 768px) {
  main {
    padding: 32px 20px;
    max-width: none;
  }

  .project-list {
    gap: 0.75em;
  }

  .project-link {
    white-space: normal;
    font-size: 15px;
  }

  /* Hide image highlight overlay entirely on mobile */
  .image-highlights {
    display: none;
  }

  /* Remove hover dimming on mobile */
  .project-list:hover .project-link {
    opacity: 1;
  }

  /* Remove hover color changes on mobile */
  .project-link:hover {
    color: inherit;
  }

  .project-link:hover .description {
    color: inherit;
  }

  /* Stop arrow nudge animation on mobile */
  .project-link:hover .arrow {
    animation: none;
  }

}
