/* gallery */

.gallery-body { background: var(--bg); }
.gallery-main { padding: clamp(34px, 4.5vw, 56px) 0 clamp(60px, 7vw, 90px); }

.gallery-nav { display: flex; align-items: center; gap: 18px; }
.gallery-nav > a:first-child { font-size: 14.5px; color: var(--muted); }
.gallery-nav > a:first-child:hover { color: var(--text); }
.gallery-nav .btn { padding: 9px 16px; font-size: 14px; }

.ghero { max-width: 760px; margin-bottom: 26px; }
.ghero h1 { font-size: clamp(2rem, 4.2vw, 3rem); margin-bottom: 14px; }

.gchips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 26px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.gchip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 7px 13px;
  transition: color 0.16s, border-color 0.16s, background 0.16s;
}
.gchip span { font-family: var(--mono); font-size: 10.5px; color: var(--muted-2); }
.gchip:hover { color: var(--text); border-color: var(--accent-line); }
.gchip.is-active { color: #04110f; background: var(--accent); border-color: var(--accent); font-weight: 600; }
.gchip.is-active span { color: rgba(4, 17, 15, 0.65); }

.ggrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.gcard {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0));
  transition: border-color 0.2s, transform 0.2s;
}
.gcard:hover { border-color: var(--accent-line); transform: translateY(-3px); }
.gcard-img {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  background: #0a1013;
  overflow: hidden;
}
.gcard-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gcard-empty { font-size: 12px; color: var(--muted-2); }
.gcard-body { display: block; padding: 14px 16px 16px; }
.gcard-title {
  display: block;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 8px;
}
.gcard-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.gtag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 2px 7px;
  display: inline-block;
}
a.gtag:hover { color: var(--accent); border-color: var(--accent-line); }

.gempty {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 50px 24px;
  text-align: center;
  color: var(--muted);
  display: grid;
  gap: 16px;
  justify-items: center;
}

/* work page */

.gback {
  display: inline-flex;
  align-items: center;
  font-size: 13.5px;
  color: var(--muted);
  margin-bottom: 26px;
}
.gback:hover { color: var(--accent); }

.gbreadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  font-size: 13px;
  color: var(--muted-2);
}
.gbreadcrumb a { color: var(--muted); }
.gbreadcrumb a:hover { color: var(--accent); }
.gbreadcrumb span[aria-current] { color: var(--text); }

.work { border-top: 1px solid var(--line); padding-top: 26px; }
.work-head h1 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); margin-bottom: 10px; }
.work-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  color: var(--muted-2);
  font-size: 13px;
  margin-bottom: 22px;
}
.work-tags { display: flex; flex-wrap: wrap; gap: 6px; }

.work-gallery { margin-bottom: 30px; }
.work-main {
  margin: 0 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0a1013;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.work-main img {
  width: auto;
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  cursor: zoom-in;
}
.work-noimg { padding: 60px; color: var(--muted-2); }
.work-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.work-thumb {
  width: 74px;
  height: 56px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  overflow: hidden;
  background: #0a1013;
  cursor: pointer;
  transition: border-color 0.16s, opacity 0.16s;
  opacity: 0.65;
}
.work-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.work-thumb:hover { opacity: 1; }
.work-thumb.is-active { border-color: var(--accent); opacity: 1; }

.work-cols { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(24px, 4vw, 48px); align-items: start; }
.work-desc p { color: var(--muted); font-size: 15.5px; line-height: 1.7; margin-bottom: 14px; max-width: 68ch; }
.work-side { display: grid; gap: 14px; position: sticky; top: 92px; }
.work-source {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px;
  display: grid;
  gap: 5px;
  background: rgba(255, 255, 255, 0.015);
}
.work-source-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.work-source a { font-size: 14px; color: var(--accent); overflow-wrap: anywhere; }
.work-source a:hover { text-decoration: underline; }
.work-source-note { font-size: 11.5px; color: var(--muted-2); }
.work-note { font-size: 11.5px; color: var(--muted-2); line-height: 1.5; }

.related { margin-top: clamp(40px, 6vw, 64px); padding-top: 28px; border-top: 1px solid var(--line); }
.related-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.related-head h2 { font-size: 1.3rem; }
.related-head a { font-size: 13px; color: var(--muted); }
.related-head a:hover { color: var(--accent); }
.ggrid-related { grid-template-columns: repeat(3, 1fr); }

/* lightbox */

.glightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(4, 7, 8, 0.94);
  display: grid;
  place-items: center;
  padding: 24px;
  cursor: zoom-out;
}
.glightbox img { max-width: 100%; max-height: 92vh; object-fit: contain; border-radius: 8px; }
.glightbox-close {
  position: absolute;
  top: 18px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: rgba(10, 16, 19, 0.8);
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
}
.glightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: rgba(10, 16, 19, 0.78);
  color: var(--text);
  font-size: 24px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.16s, border-color 0.16s, color 0.16s;
}
.glightbox-nav:hover { border-color: var(--accent); color: var(--accent); background: rgba(10, 26, 25, 0.9); }
.glightbox-prev { left: 18px; }
.glightbox-next { right: 18px; }
.glightbox-counter {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(10, 16, 19, 0.78);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}
.glightbox[data-single="1"] .glightbox-nav,
.glightbox[data-single="1"] .glightbox-counter { display: none; }
body.glightbox-open { overflow: hidden; }

.gallery-footer { border-top: 1px solid var(--line); padding: 26px 0; background: var(--bg-2); }

@media (max-width: 980px) {
  .ggrid, .ggrid-related { grid-template-columns: repeat(2, 1fr); }
  .work-cols { grid-template-columns: 1fr; }
  .work-side { position: static; }
}

@media (max-width: 620px) {
  .ggrid, .ggrid-related { grid-template-columns: 1fr; }
  .gallery-nav > a:first-child { display: none; }
  .work-main img { max-height: 58vh; }
  .work-thumb { width: 62px; height: 48px; }
  .glightbox-nav { width: 40px; height: 40px; font-size: 20px; }
  .glightbox-prev { left: 8px; }
  .glightbox-next { right: 8px; }
}
