/* ═══ MOSAIC GRID ═══ */
.mosaic {
  width: 100%;
  display: grid;
  gap: 0;
  background: transparent;
  overflow: hidden;
  border-top: 1px solid rgba(255,255,255,0.15);
  border-left: 1px solid rgba(255,255,255,0.15);
}

.z {
  background: transparent;
  position: relative;
  overflow: visible;
  cursor: pointer;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid rgba(255,255,255,0.15);
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

.z::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    180px 180px at var(--mx, -100px) var(--my, -100px),
    rgba(255,255,255,0.55) 0%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.3s;
  mask:
    linear-gradient(#000 0 0) 0 0 / 100% 1px no-repeat,
    linear-gradient(#000 0 0) 0 100% / 100% 1px no-repeat,
    linear-gradient(#000 0 0) 0 0 / 1px 100% no-repeat,
    linear-gradient(#000 0 0) 100% 0 / 1px 100% no-repeat;
  -webkit-mask:
    linear-gradient(#000 0 0) 0 0 / 100% 1px no-repeat,
    linear-gradient(#000 0 0) 0 100% / 100% 1px no-repeat,
    linear-gradient(#000 0 0) 0 0 / 1px 100% no-repeat,
    linear-gradient(#000 0 0) 100% 0 / 1px 100% no-repeat;
}
.z:hover::before { opacity: 0.7; }

/* Project name */
.pn {
  font-family: 'Instrument Serif', serif;
  color: rgba(255,255,255,0.9);
  letter-spacing: -0.02em;
  transition: color 0.6s;
  line-height: 1.1;
  margin-top: 8px;
}
.z:hover .pn { color: rgba(255,255,255,1); }

/* Project index */
.pi {
  font-family: 'Courier Prime', monospace;
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.15em;
  transition: color 0.6s;
}
.z:hover .pi { color: rgba(255,255,255,0.55); }

/* Project description */
.pd {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.03em;
  line-height: 1.5;
  transition: color 0.6s;
}
.z:hover .pd { color: rgba(255,255,255,0.7); }

/* Project status */
.ps {
  font-family: 'Courier Prime', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  transition: color 0.6s;
}
.z:hover .ps { color: rgba(255,255,255,0.6); }

/* Platform tags */
.pt {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.pt span {
  font-family: 'Courier Prime', monospace;
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.08em;
  transition: color 0.6s;
}
.z:hover .pt span { color: rgba(255,255,255,0.55); }

/* Small tile compact layout */
.z-sm {
  padding: 14px 18px;
}
.z-sm .pn {
  margin-top: 4px;
}
.z-sm .z-bot {
  margin-top: 8px;
}

/* ═══ MOBILE ═══ */
@media (max-width: 768px) {
  .z {
    padding: 16px;
  }
  .z-sm {
    padding: 12px;
  }
  .pd { font-size: 10px; }
  .ps { font-size: 10px; }
  .pt span { font-size: 10px; }
  .pi { font-size: 10px; }

  /* Disable border glow on touch */
  .z::before { display: none; }
}

@media (max-width: 420px) {
  .z {
    padding: 14px 12px;
  }
  .z-sm {
    padding: 10px;
  }
}
