/* Compact acknowledgements page (reuses home.css). */

.acks{
  min-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* "$ acknowledgements" = 18 chars */
.typewriter{
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  width: 0ch;
  animation: typing 1.1s steps(18, end) forwards;
}
@keyframes typing{
  from { width: 0ch; }
  to { width: 18ch; }
}

/* Grid supports ANY mix of portrait/landscape */
.grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

/* Card */
.item{
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
  border-radius: 14px;
  overflow: hidden;
  display: grid;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.item:hover{
  border-color: rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.04);
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(0,0,0,0.28);
}
.item:active{
  transform: translateY(0);
  box-shadow: none;
}

/* Preview frame: shows portrait + landscape properly (no crop) */
.thumb{
  width: 100%;
  border: 0;
  padding: 10px;
  margin: 0;
  cursor: pointer;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: grid;
  place-items: center;
}

/* This fixed frame ensures consistent layout height */
.thumb img{
  width: 100%;
  height: 190px;          /* compact but enough to show portrait/landscape */
  object-fit: contain;    /* key: no cropping */
  display: block;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.02);
}

/* Text row */
.row{
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 10px 12px;
}

.text{
  min-width: 0;
  display: grid;
  gap: 3px;
}

.title{
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: 0.95rem;
  color: rgba(233, 238, 246, 0.95);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sub{
  font-size: 0.88rem;
  color: rgba(233, 238, 246, 0.68);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Compact View button */
.btn{
  height: 30px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.05);
  color: rgba(233, 238, 246, 0.92);
  font: inherit;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, transform 120ms ease, box-shadow 140ms ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  user-select: none;
  font-size: 0.9rem;
}

.btn:hover{
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.18);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0,0,0,0.22);
}
.btn:active{
  transform: translateY(0) scale(0.98);
  box-shadow: none;
}

.btn--view svg{
  width: 16px;
  height: 16px;
  fill: currentColor;
  opacity: 0.9;
}

/* ===== Modal ===== */
.modal{
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}
.modal.is-open{ display: block; }

.modal__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
}

.modal__panel{
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);

  /* Fixed bounds so image never pushes modal width */
  width: min(1100px, 92vw);
  height: min(88vh, 860px);

  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;

  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(10, 14, 22, 0.92);
  box-shadow: 0 28px 70px rgba(0,0,0,0.55);
  overflow: hidden;

  min-width: 0; /* prevents layout expansion from content */
}

.modal__head{
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 14px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  min-width: 0;
}

.modal__titles{
  flex: 1;
  min-width: 0;
}

.modal__title{
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal__subtitle{
  margin: 6px 0 0;
  font-size: 0.92rem;
  color: rgba(233, 238, 246, 0.70);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal__close{
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  color: rgba(233, 238, 246, 0.9);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, transform 120ms ease;
  flex: 0 0 auto;
}
.modal__close:hover{
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.16);
  transform: translateY(-1px);
}
.modal__close:active{
  transform: translateY(0) scale(0.98);
}
.modal__close svg{
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.modal__body{
  /* IMPORTANT: no scroll, image fits inside available space */
  overflow: hidden;
  padding: 12px;

  display: grid;
  place-items: center;

  min-width: 0;
  min-height: 0;
  background: rgba(255,255,255,0.01);
}

.modal__img{
  /* Fit entire image in center without cropping */
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;

  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.02);

  min-width: 0;
  min-height: 0;
}

/* Optional no-image state */
.modal__empty{
  width: 100%;
  height: 100%;
  border-radius: 12px;
  border: 1px dashed rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.02);
  color: rgba(233, 238, 246, 0.70);
  display: none;
  place-items: center;
  text-align: center;
  padding: 20px;
}

.modal__foot{
  padding: 12px 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.modal__hint{
  color: rgba(233, 238, 246, 0.62);
  font-size: 0.88rem;
}

.kbd{
  padding: 2px 6px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
  color: rgba(233, 238, 246, 0.86);
}

.modal__open{
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  color: rgba(233, 238, 246, 0.92);
  transition: background 140ms ease, border-color 140ms ease, transform 120ms ease;
  flex: 0 0 auto;
}
.modal__open:hover{
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.16);
  transform: translateY(-1px);
}
.modal__open:active{
  transform: translateY(0) scale(0.98);
}
.modal__open svg{
  width: 16px;
  height: 16px;
  fill: currentColor;
  opacity: 0.9;
}

/* Responsive */
@media (max-width: 920px){
  .grid{ grid-template-columns: 1fr; }
  .thumb img{ height: 210px; }

  .modal__panel{
    width: 94vw;
    height: min(90vh, 860px);
  }

  .modal__title{
    font-size: 1rem;
  }

  .modal__subtitle{
    font-size: 0.88rem;
  }

  .modal__foot{
    flex-wrap: wrap;
  }

  .modal__open{
    margin-left: 0;
  }
}