/* All In Indonesia — project cards and multi-image project details. */

/* 01. Collection layout. */
.portfolio-collection {
  padding-block: clamp(48px, 6vw, 90px) clamp(64px, 7vw, 110px);
  border-top: 1px solid var(--line);
}

.portfolio-collection__heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 46px;
}

.portfolio-collection__heading .section-title {
  margin: 0;
}

.portfolio-collection__intro {
  max-width: 310px;
  padding-bottom: 7px;
  color: var(--muted);
}

.portfolio-collection__intro p {
  margin-bottom: 22px;
}

.portfolio-collection__intro > span,
.portfolio-project__number {
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.16em;
}

.portfolio-projects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 50px 32px;
}

.portfolio-project,
.project-detail-media,
.project-detail-copy {
  min-width: 0;
}

.portfolio-project__info {
  padding-top: 20px;
  border-bottom: 1px solid var(--line);
}

.portfolio-project__number {
  margin-bottom: 9px;
}

.portfolio-project__info h3 {
  margin: 0;
  font-size: clamp(23px, 2.1vw, 32px);
  line-height: 1.18;
  letter-spacing: -0.035em;
}

.project-title-button,
.project-detail-button {
  display: inline-flex;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
}

.project-title-button {
  min-height: 44px;
  align-items: center;
  font: inherit;
  overflow-wrap: anywhere;
}

.project-title-button:hover {
  color: var(--gold-light);
}

.project-detail-button {
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 13px;
}

.project-detail-button span {
  color: var(--gold);
  font-size: 24px;
  transition: transform 180ms ease;
}

.project-detail-button:hover {
  color: var(--white);
}

.project-detail-button:hover span {
  transform: translate(2px, -2px);
}

/* 02. Shared gallery: cards and detail dialog. No automatic playback. */
.project-gallery {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #141410;
  border: 1px solid var(--line);
  isolation: isolate;
}

.project-gallery .carousel-inner,
.project-gallery .carousel-item,
.project-photo-open {
  width: 100%;
  height: 100%;
}

.project-gallery .carousel-inner {
  position: absolute;
  inset: 0;
}

.project-gallery .carousel-item {
  transition: transform 400ms ease;
}

.project-photo-open {
  display: block;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  cursor: zoom-in;
}

.project-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-user-drag: none;
  user-select: none;
}

.project-photo-open:focus-visible {
  outline-offset: -5px;
}

.project-photo-open img {
  pointer-events: none;
}

.gallery-illustration {
  position: absolute;
  z-index: 2;
  top: 14px;
  left: 14px;
  max-width: calc(100% - 28px);
  padding: 5px 9px;
  background: rgba(8, 8, 7, 0.85);
  color: var(--white);
  font-size: 10px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  pointer-events: none;
}

.gallery-navigation {
  position: absolute;
  z-index: 2;
  right: 14px;
  bottom: 14px;
  display: flex;
  align-items: center;
  background: rgba(8, 8, 7, 0.94);
  border: 1px solid var(--line);
}

.gallery-arrow {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  padding: 0;
  border: 0;
  background: none;
  color: var(--gold-light);
  transition:
    color 180ms ease,
    background-color 180ms ease;
}

.gallery-arrow:hover {
  background: var(--gold);
  color: var(--black);
}

.gallery-arrow:focus-visible {
  outline-offset: -4px;
}

.gallery-count {
  min-width: 64px;
  padding-inline: 7px;
  color: var(--white);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.07em;
  text-align: center;
}

.gallery-empty,
.gallery-image-unavailable {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  padding: 24px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.portfolio-noscript {
  color: var(--muted);
}

/* 03. Project detail dialog and thumbnail navigation. */
.portfolio-modal .modal-dialog {
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: 24px;
}

.portfolio-modal .modal-header {
  align-items: flex-start;
  gap: 24px;
  padding: 28px 32px;
}

.portfolio-modal .modal-header .eyebrow {
  color: var(--gold);
  font-size: 10px;
  margin-bottom: 12px;
}

.portfolio-modal .modal-header h2 {
  font-size: clamp(25px, 3vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
}

.project-modal-close {
  display: grid;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--gold);
}

.project-modal-close:hover {
  background: var(--gold);
  color: var(--black);
}

.portfolio-modal .modal-body {
  padding: 32px;
}

.project-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr);
  gap: 32px;
}

.project-gallery--detail {
  aspect-ratio: 4 / 3;
  background: var(--black);
}

.project-gallery--detail img {
  object-fit: contain;
}

.project-image-caption {
  margin: 13px 0;
  color: var(--muted);
  font-size: 12px;
}

.project-thumbnails {
  position: relative;
  display: flex;
  gap: 10px;
  max-width: 100%;
  padding: 4px 4px 10px;
  overflow-x: auto;
  scrollbar-color: var(--gold) #202019;
  scrollbar-width: thin;
}

.project-thumbnail {
  flex: 0 0 78px;
  height: 58px;
  padding: 3px;
  border: 1px solid var(--line);
  background: var(--black);
  color: var(--gold);
  opacity: 0.6;
  transition:
    opacity 180ms ease,
    border-color 180ms ease;
}

.project-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-thumbnail[aria-pressed='true'],
.project-thumbnail:hover,
.project-thumbnail:focus-visible {
  border-color: var(--gold-light);
  opacity: 1;
}

.project-detail-facts {
  margin: 0 0 26px;
}

.project-detail-facts > div {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.project-detail-facts > div:first-child {
  padding-top: 0;
}

.project-detail-facts dt {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.project-detail-facts dd {
  margin: 0;
  font-size: 20px;
  line-height: 1.4;
}

.project-detail-copy > p {
  color: var(--muted);
  font-size: 14px;
}

.project-detail-copy .project-illustration-note {
  padding-left: 13px;
  border-left: 1px solid var(--gold);
  font-size: 12px;
}

.project-detail-copy .button-gold {
  margin-top: 15px;
  gap: 18px;
}

/* 04. Responsive layout and motion preferences. */
@media (max-width: 991.98px) {
  .portfolio-projects {
    gap: 40px 24px;
  }

  .project-detail-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
  }

  .project-detail-facts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .project-detail-facts > div {
    padding-top: 0;
  }
}

@media (max-width: 767.98px) {
  .portfolio-collection__heading {
    display: block;
    margin-bottom: 30px;
  }

  .portfolio-collection__intro {
    max-width: 380px;
    margin-top: 22px;
  }

  .portfolio-collection__intro p {
    margin-bottom: 14px;
  }

  .portfolio-projects {
    grid-template-columns: minmax(0, 1fr);
    gap: 34px;
  }

  .portfolio-project__info {
    padding-top: 16px;
  }
}

@media (max-width: 575.98px) {
  .portfolio-modal .modal-dialog {
    padding: 0;
    margin: 0;
  }

  .portfolio-modal .modal-header,
  .portfolio-modal .modal-body {
    padding: 22px;
  }

  .portfolio-modal .modal-body {
    padding-bottom: max(24px, env(safe-area-inset-bottom));
  }

  .portfolio-modal .modal-header {
    gap: 15px;
  }

  .project-detail-facts {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .gallery-navigation {
    right: 10px;
    bottom: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-gallery .carousel-item,
  .gallery-arrow,
  .project-thumbnail,
  .project-detail-button span {
    transition: none;
  }
}
