@font-face {
  font-family: 'Syne';
  src: url('./assets/fonts/SyneMono-Regular.woff2');
}

:root{
    font-size: 16pt;
}

html,
body {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: black;
  font-family: 'Syne';
}

#stage {
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

#grid {
  flex: 1;
  min-width: 0;
  height: 100vh;
  display: grid;
  grid-template-columns: repeat(16, 1fr);
  grid-template-rows: repeat(16, 1fr);
  gap: 8px;
}

.rect {
  position: relative;
  border: 2px solid black;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .2s ease, border-radius 5s linear;
}

.rect:hover {
  transform: scale(1.1, 1.0);
  z-index: 10;
}

.rect-label {
  font-size: clamp(.8rem, 1vw, 0.85rem);
  color: black;
  text-align: center;
  pointer-events: none;
  z-index: 2;
  padding: 2px 4px;
}

.rect:hover .rect-label {
  color: white;
}

.rect--main .rect-label {
  font-size: clamp(1.5rem, 1.5vw, 1.4rem);
  font-weight: bold;
  color: black;
  letter-spacing: 0.05em;
}
.rect--project{
  background: linear-gradient(-90deg, #93e4c1,#fdffcd) !important;
}
.rect[style*="--cover"]::after {
  content: '';
  position: absolute;
  inset: 10%;
  width: 80%;
  height: 80%;
  background-image: var(--cover);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0;
  z-index: 1;
}


.rect[style*="--cover"]:hover::after {
  opacity: 1;
  transform: scaleX(calc(1 / 1.1));
}

#popup {
  width: 0;
  height: 100vh;
  background-color: aliceblue;
  overflow: hidden;
  box-sizing: border-box;
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

#stage.popup-open #popup {
  width: 50vw;
  border-left: 2px solid black;
}

#popup-close {
  align-self: flex-end;
  border: 1px solid black;
  cursor: pointer;
  background-color: inherit;
  font-size: 1rem;
  padding: 4px 10px;
  margin: 1rem 1rem 0;
  font-family: inherit;
  flex-shrink: 0;
}

#popup-inner {
  padding: 1rem 1.5rem 2rem;
  overflow-y: auto;
  flex: 1;
}