/* ===================================================================
   ART PAGE — 3×5 image grid with lightbox expand
   Uses the same 12-column shell as Works / Experiments
   =================================================================== */

/* ===== SHELL ===== */

.art-layout {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  min-height: 100vh;
  padding: 2vw;
  align-items: start;
}

/* ===== BACK LINK ===== */
.back-link {
  grid-column: 2 / 3; grid-row: 1;
  font-size: 1.5vw; font-weight: 700; line-height: 1;
  color: #111; text-decoration: none; display: inline-block;
}
.back-link:hover { opacity: 0.55; }

/* ===== PAGE TITLE (left) ===== */
.page-title {
  grid-column: 2 / 4; grid-row: 1;
  margin-top: 6vh; font-size: 1vw; font-weight: 700;
  line-height: 1; letter-spacing: -0.02em;
}

/* ===== INTRO (right) ===== */
.art-intro {
  grid-column: 8 / 11; grid-row: 1;
  margin-top: 6vh; max-width: 24vw;
}
.art-intro h1 {
  margin: 0 0 1.2vh 0; font-size: 0.8vw; font-weight: 700;
  line-height: 1.05; letter-spacing: -0.02em;
}
.art-intro p {
  margin: 0; font-size: 0.72vw; line-height: 1.25; letter-spacing: -0.02em;
}

/* ===== RIGHT NAV (artwork list) ===== */
.art-nav {
  grid-column: 8 / 11; grid-row: 1;
  margin-top: 21vh;
  display: flex; flex-direction: column; align-items: flex-start;
}

.art-nav-item {
  display: block;
  font-size: 0.7vw; font-weight: 400;
  line-height: 1.2; letter-spacing: -0.02em;
  color: #111;
  margin-bottom: 0.4vh;
  cursor: pointer;
  transition: opacity 0.18s ease;
}

.art-nav-item:hover {
  opacity: 0.55;
}

.art-nav-item.active {
  font-weight: 700;
  opacity: 1;
}

/* ===== GRID AREA ===== */
.art-grid-scroll {
  grid-column: 2 / 8; grid-row: 1;
  margin-top: 20vh;
  overflow-x: auto; overflow-y: visible;
  padding-bottom: 10px;
}

.art-grid-scroll::-webkit-scrollbar { height: 8px; }
.art-grid-scroll::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.22); }
.art-grid-scroll::-webkit-scrollbar-track { background: transparent; }

.art-grid {
  --cell: 220px;
  --gap: 14px;

  display: grid;
  grid-template-columns: repeat(3, var(--cell));
  grid-template-rows: repeat(5, var(--cell));
  gap: var(--gap);
  width: calc(var(--cell) * 3 + var(--gap) * 2);
}


/* ===== INDIVIDUAL CELL ===== */

.art-cell {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: #e8e8e6;
}

.art-cell img {
  width: 100%; height: 100%;
  display: block; object-fit: cover;
}

/* hidden data container inside cells — holds content for JS */
.art-overlay {
  display: none;
}


/* ===== LIGHTBOX ===== */

.art-lightbox {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(243, 243, 241, 0.97);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.32s ease;
}

.art-lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

/* image: centered in the viewport */
.art-lightbox-image {
  position: absolute;
  top: 50%; left: 42%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.art-lightbox-image img {
  max-width: 48vw;
  max-height: 82vh;
  object-fit: contain;
  display: block;
}

/* info: top-right corner */
.art-lightbox-info {
  position: absolute;
  top: 6vh; right: 5vw;
  max-width: 22vw;
}

.art-lightbox-number {
  font-size: 0.62vw;
  font-weight: 400;
  letter-spacing: -0.02em;
  opacity: 0.35;
  margin-bottom: 1.6vh;
}

.art-lightbox-title {
  font-size: 1vw;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin-bottom: 0.4vh;
}

.art-lightbox-year {
  font-size: 0.72vw;
  font-weight: 400;
  letter-spacing: -0.02em;
  opacity: 0.45;
  margin-bottom: 1.8vh;
}

.art-lightbox-desc {
  font-size: 0.72vw;
  font-weight: 400;
  line-height: 1.38;
  letter-spacing: -0.02em;
  opacity: 0.8;
  max-width: 22vw;
}

/* close button */
.art-lightbox-close {
  position: absolute;
  top: 3vh; left: 3vw;
  font-size: 1.4vw;
  font-weight: 700;
  color: #111;
  cursor: pointer;
  background: none;
  border: none;
  font-family: Helvetica, Arial, sans-serif;
  line-height: 1;
  padding: 0;
  transition: opacity 0.18s ease;
}

.art-lightbox-close:hover {
  opacity: 0.4;
}

/* nav arrows inside lightbox */
.art-lightbox-nav {
  position: absolute;
  bottom: 3vh; right: 3vw;
  display: flex;
  gap: 1.2vw;
}

.art-lightbox-arrow {
  font-size: 1vw;
  font-weight: 700;
  color: #111;
  cursor: pointer;
  background: none;
  border: none;
  font-family: Helvetica, Arial, sans-serif;
  line-height: 1;
  padding: 0;
  transition: opacity 0.18s ease;
}

.art-lightbox-arrow:hover {
  opacity: 0.4;
}


/* ===== MEDIUM SCREENS ===== */

@media (max-width: 1400px) {
  .page-title { margin-top: 5.5vh; }
  .art-intro { margin-top: 2.8vh; max-width: 290px; }
  .art-nav { margin-top: 20vh; }
  .art-grid-scroll { margin-top: 19vh; }

  .art-grid {
    --cell: 170px;
    --gap: 12px;
  }

  .art-lightbox-title { font-size: 14px; }
  .art-lightbox-year { font-size: 10px; }
  .art-lightbox-desc { font-size: 10px; }
  .art-lightbox-number { font-size: 8px; }
}


/* ===== SMALLER LAPTOP ===== */

@media (max-width: 1200px) {
  .back-link { font-size: 20px; }
  .page-title { margin-top: 42px; font-size: 10px; }
  .art-intro { margin-top: 24px; max-width: 280px; }
  .art-intro h1 { font-size: 10px; }
  .art-intro p { font-size: 9px; }
  .art-nav { margin-top: 190px; }
  .art-nav-item { font-size: 10px; }
  .art-grid-scroll { margin-top: 180px; }

  .art-grid {
    --cell: 145px;
    --gap: 10px;
  }

  .art-lightbox-title { font-size: 13px; }
  .art-lightbox-year { font-size: 9px; }
  .art-lightbox-desc { font-size: 9px; }
  .art-lightbox-info { max-width: 240px; }
  .art-lightbox-number { font-size: 7px; }
  .art-lightbox-close { font-size: 18px; }
  .art-lightbox-arrow { font-size: 13px; }
}


/* ===== MOBILE ===== */

@media (max-width: 820px) {
  .art-layout { display: block; padding: 24px 18px 36px 18px; }
  .back-link { display: inline-block; font-size: 26px; margin-bottom: 16px; }
  .page-title { margin: 0 0 20px 0; font-size: 16px; }

  .art-intro { margin: 0 0 20px 0; max-width: none; }
  .art-intro h1 { font-size: 11px; }
  .art-intro p { font-size: 10px; }

  .art-nav { display: none; }

  .art-grid-scroll { margin: 0; overflow-x: visible; overflow-y: visible; padding-bottom: 0; }

  .art-grid {
    --cell: 1fr;
    --gap: 10px;

    width: 100%;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto;
  }

  .art-cell {
    aspect-ratio: 1 / 1.25;
  }

  /* mobile lightbox: image top, info below */
  .art-lightbox-image {
    position: static;
    transform: none;
    width: 100%;
    padding: 60px 20px 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .art-lightbox-image img {
    max-width: 100%;
    max-height: 50vh;
    object-fit: contain;
  }

  .art-lightbox-info {
    position: static;
    max-width: none;
    padding: 20px 20px 80px 20px;
  }

  .art-lightbox-number { font-size: 9px; margin-bottom: 10px; }
  .art-lightbox-title { font-size: 14px; margin-bottom: 4px; }
  .art-lightbox-year { font-size: 10px; margin-bottom: 14px; }
  .art-lightbox-desc { font-size: 10px; line-height: 1.4; max-width: none; }

  .art-lightbox-close { top: 20px; left: 20px; font-size: 22px; }

  .art-lightbox-nav { bottom: 24px; right: 20px; gap: 20px; }
  .art-lightbox-arrow { font-size: 16px; }

  .art-lightbox {
    overflow-y: auto;
    background: rgb(243, 243, 241);
  }
}