html, body {
  margin: 0;
  padding: 0;
  font-family: Helvetica, sans-serif;
  background: white;
  color: var(--reality-color);
  cursor: none; 
}

.project-container {
  padding: 3rem 2rem;
  max-width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.project-title {
  position: sticky;
  top: 20px;  
  font-size: clamp(2rem, 10vw, 8rem);
  text-transform: uppercase;
  margin: 0;
  z-index: 1000;
  opacity: 0;
  transform: translateY(20px);
  animation: titleFade 0.8s ease-out forwards;
}

@keyframes titleFade {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.project-image {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.project-description {
  font-size: 1rem;
  line-height: 1.6;
  white-space: pre-wrap;
}

/* Griglia immagini */
.additional-images {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.additional-image {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Cornice quadrata invisibile */
.additional-image .image-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1; 
  display: flex;
  justify-content: center;
  align-items: center;
  background: transparent;
  border-radius: 4px;
  overflow: hidden;
}

/* Immagini adattate */
.additional-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  cursor: none; /* forza cursore custom */
}

/* Patina hover */
.additional-image .image-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background-color: var(--reality-color);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.additional-image .image-frame:hover::after {
  opacity: 0.4;
}

/* Didascalia */
.additional-image figcaption {
  margin-top: 8px;
  font-family: monospace;
  font-size: 0.9rem;
  color: var(--reality-color);
}

/* Modal fullscreen */
#imageModal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2000;
}

#imageModal.active {
  visibility: visible;
  opacity: 1;
}

#imageModal img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  border-radius: 8px;
}

/* Bottone chiusura */
#imageModal .close-btn {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 2rem;
  font-weight: bold;
  color: var(--reality-color);
  cursor: none; /* mantiene cursore custom */
  user-select: none;
}

/* Footer */
#layout-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: var(--reality-color, #000);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 15px;
  font-family: monospace;
  font-size: 12px;
  color: white;
  z-index: 1000;
  box-sizing: border-box;
  user-select: none;
}

/* Cursore personalizzato */
#custom-cursor {
  position: fixed;
  left: 0;
  top: 0;
  width: 20px;
  height: 20px;
  font-size: 20px;
  pointer-events: none;
  z-index: 9999;
  user-select: none;
  transform: translate(-50%, -50%);
  transition: color 0.3s;
}

.cv-button {
  display: inline-block;
  padding: 10px 20px;
  background: var(--reality-color);
  color: white;
  text-decoration: none;
  font-size: 1rem;
  border: none;
  cursor: none;
  margin-top: 1.5rem;
  transition: opacity 0.3s ease;
}

.cv-button:hover {
  opacity: 0.8;
}
#back-link {
  position: fixed;
  bottom: 40px;
  left: 5%;
  transform: translateX(-50%);
  font-family: monospace;
  font-size: 14px;
  text-decoration: none;
  color: black;
  z-index: 900
}
