/* ================================================================
   NOIR GALLERY — creative portfolio.
   Identity on paper, work on a dark stage. Canonical design:
   design-previews/gallery-design.html
   ================================================================ */
.noir-v2.noir-gal-page { max-width: none !important; width: 100% !important; }

.noir-gal-page {
  --stage: #0B0A09; --stage-2: #141210;
  --stage-line: rgba(244,240,232,.11);
  --stage-text: #F4F0E8; --stage-muted: rgba(244,240,232,.55);
}

/* owner bar */
.noir-v2 .gal-owner {
  background: var(--noir-ink); color: var(--noir-paper); padding: 11px 30px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 13.5px;
}
.noir-v2 .gal-owner__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--noir-lime); flex: none; }
.noir-v2 .gal-owner__sp { flex: 1; }
.noir-v2 .gal-owner a {
  color: var(--noir-paper); font-weight: 600; text-decoration: none;
  border-bottom: 1px solid rgba(244,240,232,.4); padding-bottom: 1px;
}

/* identity (paper) */
.noir-v2 .gal-id { background: var(--noir-paper); padding: 26px 0 24px; }
.noir-v2 .gal-id__row { display: flex; gap: 22px; align-items: flex-start; flex-wrap: wrap; }
.noir-v2 .gal-id__av {
  width: 82px; height: 82px; border-radius: 50%; background: var(--noir-plum); color: #fff;
  display: grid; place-items: center; font-family: var(--noir-serif); font-size: 28px;
  font-weight: 700; flex: none; overflow: hidden;
}
.noir-v2 .gal-id__av img { width: 100%; height: 100%; object-fit: cover; }
.noir-v2 .gal-id__main { flex: 1; min-width: 230px; }
.noir-v2 .gal-id__name {
  font-family: var(--noir-serif); font-size: 34px; font-weight: 800; letter-spacing: -1px;
  line-height: 1.05; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0;
}
.noir-v2 .gal-id__role { font-size: 14px; color: var(--noir-muted); margin-top: 6px; }
.noir-v2 .gal-id__meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.noir-v2 .gal-id__cta { display: flex; gap: 9px; flex-wrap: wrap; align-items: flex-start; }

/* showreel */
.noir-v2 .gal-reel { position: relative; background: var(--stage); aspect-ratio: 21/9; overflow: hidden; }
.noir-v2 .gal-reel__poster { width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.noir-v2 .gal-reel__grad {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,10,9,.15) 0%, rgba(11,10,9,.55) 60%, rgba(11,10,9,.92) 100%);
}
.noir-v2 .gal-reel__body { position: absolute; left: 0; right: 0; bottom: 0; padding-bottom: 26px; }
.noir-v2 .gal-reel__kicker {
  font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--noir-lime);
}
.noir-v2 .gal-reel__title {
  font-family: var(--noir-serif); font-size: clamp(22px, 3.2vw, 38px); font-weight: 800;
  color: var(--stage-text); letter-spacing: -1px; margin-top: 8px; line-height: 1.1;
}
.noir-v2 .gal-reel__meta { color: var(--stage-muted); font-size: 13.5px; margin-top: 7px; }
.noir-v2 .gal-reel__play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 72px; height: 72px; border-radius: 50%; background: rgba(244,240,232,.94);
  display: grid; place-items: center; cursor: pointer; border: 0; z-index: 2;
  box-shadow: 0 8px 34px rgba(0,0,0,.45); transition: transform .2s, background .2s;
}
.noir-v2 .gal-reel__play:hover { transform: translate(-50%,-50%) scale(1.07); background: #fff; }
.noir-v2 .gal-reel__play svg { margin-left: 4px; color: var(--noir-ink); }
.noir-v2 .gal-reel__dur {
  position: absolute; top: 18px; right: 22px; background: rgba(11,10,9,.72); backdrop-filter: blur(8px);
  color: var(--stage-text); font-size: 11.5px; font-weight: 600; padding: 5px 11px; border-radius: 99px; z-index: 2;
}
.noir-v2 .gal-reel iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; z-index: 3; }

/* work stage */
.noir-v2 .gal-stage { background: var(--stage); padding: 26px 0 60px; }
.noir-v2 .gal-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding-bottom: 18px; border-bottom: 1px solid var(--stage-line); margin-bottom: 22px;
}
.noir-v2 .gal-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.noir-v2 .gal-chip {
  border: 1px solid var(--stage-line); border-radius: 99px; padding: 8px 15px; font-size: 13px;
  font-weight: 600; color: var(--stage-muted); text-decoration: none; transition: all .15s;
}
.noir-v2 .gal-chip:hover { border-color: rgba(244,240,232,.3); color: var(--stage-text); }
.noir-v2 .gal-chip.is-on { background: var(--stage-text); color: var(--stage); border-color: var(--stage-text); }
.noir-v2 .gal-count { font-size: 13px; color: var(--stage-muted); }
.noir-v2 .gal-count b { color: var(--stage-text); }

/* Fluid grid: each piece declares its own span + aspect, so nothing is cropped
   into a shape it wasn't shot for — but every tile still reserves its box, so
   there's no layout shift as images load. Masonry reflows; this doesn't. */
.noir-v2 .gal-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px; }
.noir-v2 .gal-w {
  position: relative; border-radius: 14px; overflow: hidden; background: var(--stage-2);
  display: block; text-decoration: none; grid-column: span 4;
}
.noir-v2 .gal-w img { width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .55s cubic-bezier(.2,.7,.3,1); }
.noir-v2 .gal-w:hover img { transform: scale(1.045); }
.noir-v2 .gal-w__noimg {
  width: 100%; aspect-ratio: 1/1; display: grid; place-items: center;
  font-family: var(--noir-serif); font-size: 44px; color: var(--stage-muted);
}
.noir-v2 .gal-w__veil {
  position: absolute; inset: 0; opacity: 0; transition: opacity .25s;
  background: linear-gradient(180deg, rgba(11,10,9,0) 45%, rgba(11,10,9,.82) 100%);
}
.noir-v2 .gal-w:hover .gal-w__veil { opacity: 1; }
.noir-v2 .gal-w__cap {
  position: absolute; left: 14px; right: 14px; bottom: 12px;
  transform: translateY(6px); opacity: 0; transition: .25s;
}
.noir-v2 .gal-w:hover .gal-w__cap { transform: none; opacity: 1; }
.noir-v2 .gal-w__t { color: var(--stage-text); font-size: 14px; font-weight: 600; line-height: 1.3; }
.noir-v2 .gal-w__s { color: var(--stage-muted); font-size: 12px; margin-top: 3px; }
.noir-v2 .gal-w__play {
  position: absolute; top: 12px; left: 12px; display: inline-flex; align-items: center; gap: 6px;
  background: rgba(11,10,9,.68); backdrop-filter: blur(8px); color: var(--stage-text);
  font-size: 11.5px; font-weight: 600; padding: 5px 10px; border-radius: 99px;
}
.noir-v2 .gal-w__badge {
  position: absolute; top: 12px; right: 12px; background: var(--noir-orange); color: #fff;
  font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 99px;
}
.noir-v2 .gal-w__badge--off { background: rgba(11,10,9,.8); top: 38px; }
.noir-v2 .gal-w.is-hidden img { opacity: .35; filter: grayscale(1); }
/* No hover on touch, so the caption would never appear — show it always. */
@media (hover: none) {
  .noir-v2 .gal-w__veil, .noir-v2 .gal-w__cap { opacity: 1; transform: none; }
}

/* empty */
.noir-v2 .gal-empty { text-align: center; padding: 68px 24px; color: var(--stage-muted); }
.noir-v2 .gal-empty__i { font-size: 42px; }
.noir-v2 .gal-empty__t {
  font-family: var(--noir-serif); font-size: 22px; font-weight: 700; color: var(--stage-text); margin-top: 14px;
}
.noir-v2 .gal-empty p { font-size: 14.5px; max-width: 420px; margin: 10px auto 0; line-height: 1.65; }
.noir-v2 .gal-slots {
  display: grid; grid-template-columns: repeat(4,1fr); gap: 14px;
  max-width: 700px; margin: 28px auto 0;
}
.noir-v2 .gal-slot {
  aspect-ratio: 1/1; border: 1.5px dashed var(--stage-line); border-radius: 14px;
  display: grid; place-items: center; color: var(--stage-muted); font-size: 26px;
}
.noir-v2 .noir-btn--ghost-dark {
  background: rgba(244,240,232,.09); color: var(--stage-text); border-color: var(--stage-line);
}
.noir-v2 .noir-btn--ghost-dark:hover { background: rgba(244,240,232,.16); }

/* ── lightbox ── */
.gal-lb {
  position: fixed; inset: 0; z-index: 10000; background: rgba(6,5,5,.97);
  display: flex; flex-direction: column; animation: galFade .2s ease both;
}
.gal-lb[hidden] { display: none; }
@keyframes galFade { from { opacity: 0 } to { opacity: 1 } }
body.gal-lock { overflow: hidden; }
.gal-lb__top { display: flex; align-items: center; gap: 13px; padding: 16px 20px; color: rgba(244,240,232,.55); font-size: 13px; }
.gal-lb__top b { color: #F4F0E8; }
.gal-lb__cat:not(:empty)::before { content: "· "; }
.gal-lb__sp { flex: 1; }
.gal-lb__ico {
  width: 34px; height: 34px; border-radius: 50%; background: rgba(244,240,232,.1); color: #F4F0E8;
  display: grid; place-items: center; cursor: pointer; border: 0; font-size: 16px; text-decoration: none;
}
.gal-lb__ico:hover { background: rgba(244,240,232,.2); }
.gal-lb__stage { flex: 1; display: grid; place-items: center; padding: 0 20px; position: relative; min-height: 0; }
.gal-lb__media { max-width: 100%; max-height: 100%; display: grid; place-items: center; }
.gal-lb__media img { max-width: 100%; max-height: 68vh; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.gal-lb__media iframe { width: min(92vw, 1100px); aspect-ratio: 16/9; border: 0; border-radius: 10px; }
.gal-lb__arrow {
  position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%;
  background: rgba(244,240,232,.1); color: #F4F0E8; display: grid; place-items: center; border: 0;
  cursor: pointer; font-size: 22px; line-height: 1;
}
.gal-lb__arrow:hover { background: rgba(244,240,232,.2); }
.gal-lb__arrow--l { left: 16px; } .gal-lb__arrow--r { right: 16px; }
.gal-lb__foot { padding: 16px 22px 22px; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: flex-end; }
.gal-lb__cap h3 { color: #F4F0E8; font-family: var(--noir-serif); font-size: 18px; font-weight: 700; margin: 0; }
.gal-lb__cap p { color: rgba(244,240,232,.55); font-size: 13px; margin: 5px 0 0; max-width: 520px; line-height: 1.6; }
.gal-lb__keys { display: flex; gap: 7px; align-items: center; color: rgba(244,240,232,.55); font-size: 11.5px; }
.gal-lb__keys kbd { background: rgba(244,240,232,.12); border-radius: 5px; padding: 2px 7px; font-size: 11px; font-family: inherit; color: #F4F0E8; }

/* ── case study ── */
.noir-v2 .gal-cs { background: var(--stage); padding-bottom: 60px; min-height: 70vh; }
.noir-v2 .gal-cs__back { padding: 16px 0; }
.noir-v2 .gal-cs__back .noir-wrap { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.noir-v2 .gal-cs__backlink, .noir-v2 .gal-cs__edit {
  display: inline-flex; align-items: center; gap: 7px; color: var(--stage-muted);
  font-size: 13px; text-decoration: none;
}
.noir-v2 .gal-cs__backlink:hover, .noir-v2 .gal-cs__edit:hover { color: var(--stage-text); }
.noir-v2 .gal-cs__hero { max-height: 68vh; overflow: hidden; background: var(--stage-2); display: grid; place-items: center; }
.noir-v2 .gal-cs__hero img, .noir-v2 .gal-cs__hero video { width: 100%; max-height: 68vh; object-fit: contain; display: block; }
.noir-v2 .gal-cs__frame { width: 100%; max-width: 1180px; margin: 0 auto; aspect-ratio: 16/9; }
.noir-v2 .gal-cs__frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.noir-v2 .gal-cs__head { max-width: 820px; margin: 0 auto; padding: 34px 30px 22px; text-align: center; }
.noir-v2 .gal-cs__kick {
  font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--noir-orange);
}
.noir-v2 .gal-cs__title {
  font-family: var(--noir-serif); font-size: clamp(25px, 3.4vw, 40px); font-weight: 800;
  color: var(--stage-text); letter-spacing: -1.2px; margin: 10px 0 0; line-height: 1.1;
}
.noir-v2 .gal-cs__by { color: var(--stage-muted); font-size: 13.5px; margin-top: 12px; }
.noir-v2 .gal-cs__by a { color: var(--stage-text); text-decoration: none; }
.noir-v2 .gal-cs__body {
  max-width: 720px; margin: 0 auto; padding: 0 30px;
  color: rgba(244,240,232,.8); font-size: 15.5px; line-height: 1.8;
}
.noir-v2 .gal-cs__facts {
  display: flex; gap: 26px; flex-wrap: wrap; justify-content: center;
  margin: 24px 0 0; padding-top: 22px; border-top: 1px solid var(--stage-line);
}
.noir-v2 .gal-cs__fact { text-align: center; }
.noir-v2 .gal-cs__fact dt {
  font-size: 10.5px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: var(--stage-muted);
}
.noir-v2 .gal-cs__fact dd { color: var(--stage-text); font-size: 14px; font-weight: 600; margin: 4px 0 0; }
.noir-v2 .gal-cs__next { margin-top: 44px; padding-top: 26px; border-top: 1px solid var(--stage-line); }
.noir-v2 .gal-cs__nav { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; }
.noir-v2 .gal-cs__navlink {
  color: var(--stage-text); text-decoration: none; font-family: var(--noir-serif);
  font-size: 18px; font-weight: 700; max-width: 260px;
}
.noir-v2 .gal-cs__navlink span {
  color: var(--stage-muted); font-size: 12px; display: block;
  font-family: var(--noir-sans); font-weight: 400; margin-bottom: 3px;
}
.noir-v2 .gal-cs__navlink--r { text-align: right; }

@media (max-width: 900px) {
  .noir-v2 .gal-grid { grid-template-columns: repeat(6, 1fr); }
  .noir-v2 .gal-w { grid-column: span 3 !important; }
  .noir-v2 .gal-slots { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 620px) {
  .noir-v2 .gal-reel { aspect-ratio: 4/3; }
  .noir-v2 .gal-id__name { font-size: 26px; }
  .noir-v2 .gal-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .noir-v2 .gal-w { grid-column: span 1 !important; }
  .noir-v2 .gal-chips { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
  .noir-v2 .gal-chip { flex: none; }
  .noir-v2 .gal-cs__navlink { font-size: 15px; max-width: 130px; }
  .gal-lb__media img { max-height: 54vh; }
}

/* ── profile action row: count badge + icon buttons ── */
.noir-v2 .noir-btn-count {
  background: rgba(255,255,255,.24); border-radius: 99px;
  font-size: 11px; font-weight: 700; padding: 2px 7px; margin-left: 2px;
}
.noir-v2 .noir-btn--icon {
  width: 42px; height: 42px; padding: 0 !important; border-radius: 99px;
  background: transparent; border: 1px solid rgba(15,15,15,.22); color: var(--noir-ink-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
}
.noir-v2 .noir-btn--icon:hover { background: rgba(15,15,15,.05); }
.noir-v2 .noir-btn--icon.noir-like-btn--active { color: var(--noir-orange); border-color: rgba(203,54,15,.4); }
.noir-v2 .noir-btn--icon .noir-like-count { font-size: 11px; font-weight: 700; }
.noir-v2 .noir-btn--icon:has(.noir-like-count) { width: auto; padding: 0 13px !important; }
.noir-v2 .noir-tp-actions__sep {
  width: 1px; height: 26px; background: var(--noir-hair); margin: 0 3px; display: inline-block;
}
