/* ---------- portfolio ---------- */
.port-hero { background: var(--cream); padding-top: clamp(140px,16vw,220px); }
.port-hero h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(44px,7vw,96px); letter-spacing: -0.02em; margin-top: 22px; }
.port-hero p { margin-top: 20px; max-width: 56ch; color: var(--ink-soft); font-size: 16px; line-height: 1.65; }
.port-grid { background: var(--cream); }
.port-grid .grid { display: grid; grid-template-columns: repeat(2,1fr); gap: clamp(28px,3vw,44px); }
.port-card { cursor: pointer; padding: 16px; border-radius: 22px; border: 1px solid var(--line-2); background: var(--cream-2); transition: border-color 0.3s, box-shadow 0.3s; }
.port-card:hover { border-color: var(--line); box-shadow: 0 20px 50px rgba(52,36,42,0.08); }
.port-shot { position: relative; border-radius: 18px; overflow: hidden; aspect-ratio: 1900/1080; background: var(--cream-2); }
.port-img { display: block; width: 100%; height: 100%; }
.port-tag { position: absolute; top: 16px; left: 16px; z-index: 2; font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; padding: 6px 12px; border-radius: 100px; background: rgba(52,36,42,0.72); color: #fff; backdrop-filter: blur(6px); transition: background 0.35s; }
.port-card:hover .port-tag { background: var(--au-pink); }
.port-meta { margin-top: 20px; padding: 0 4px 4px; }
.port-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.port-top h3 { font-family: var(--serif); font-weight: 500; font-size: clamp(20px,1.8vw,26px); transition: 0.35s; }
.port-card:hover .port-top h3 { color: var(--au-pink); }
.port-yr { font-family: var(--mono); font-size: 12px; color: var(--ink-faint); flex: none; }
.port-rows { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.port-rows div { display: flex; gap: 8px; font-size: 13.5px; line-height: 1.5; }
.port-rows .lbl { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); flex: none; width: 88px; }
.port-rows span:not(.lbl) { color: var(--ink-soft); }

.lightbox { position: fixed; inset: 0; z-index: 2000; background: rgba(24,8,12,0.86); backdrop-filter: blur(10px); display: flex; align-items: center; justify-content: center; padding: clamp(20px,4vw,60px); animation: lbIn 0.25s var(--ease); }
@keyframes lbIn { from { opacity: 0; } to { opacity: 1; } }
.lightbox-close { position: absolute; top: 26px; right: var(--gut); width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.4); background: transparent; color: #fff; font-size: 16px; cursor: pointer; }
.lightbox-close:hover { background: #fff; color: var(--ink); }
.lightbox-inner { max-width: min(94vw, 1600px); max-height: 92vh; display: flex; flex-direction: column; gap: 18px; align-items: center; }
.lightbox-inner img { max-width: 100%; max-height: 84vh; border-radius: 14px; object-fit: contain; box-shadow: 0 40px 100px rgba(0,0,0,0.5); }
.lightbox-empty { color: rgba(255,255,255,0.7); font-size: 14px; padding: 80px 40px; border: 1px dashed rgba(255,255,255,0.3); border-radius: 14px; }
.lightbox-cap { text-align: center; color: #fff; }
.lightbox-cap h3 { font-family: var(--serif); font-weight: 500; font-size: 22px; }
.lightbox-cap p { margin-top: 6px; color: rgba(255,255,255,0.72); font-size: 13.5px; }

@media (max-width: 760px) { .port-grid .grid { grid-template-columns: 1fr; } }

/* ---------- search + filter toolbar ---------- */
.port-tools { background: var(--cream); padding-top: clamp(28px,3.4vw,44px); }
.port-tools-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

.port-search { position: relative; flex: 1 1 380px; max-width: 520px; display: flex; align-items: center; }
.port-search-ic { position: absolute; left: 18px; width: 17px; height: 17px; color: var(--ink-faint); pointer-events: none; }
.port-search input {
  width: 100%; font-family: var(--sans); font-size: 15px; color: var(--ink);
  background: #fff; border: 1px solid var(--line-2); border-radius: 100px;
  padding: 14px 46px 14px 46px;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.port-search input::placeholder { color: var(--ink-faint); }
.port-search input:focus { outline: none; border-color: var(--au-pink); box-shadow: 0 0 0 3px rgba(196,17,107,0.12); }
/* Safari draws its own clear affordance on type=search; ours is styled and
   positioned to match the rest of the design, so hide the native one. */
.port-search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.port-search-clear {
  position: absolute; right: 14px; width: 26px; height: 26px; border-radius: 50%;
  border: none; background: var(--cream-2); color: var(--ink-soft);
  font-size: 17px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.port-search-clear:hover { background: var(--au-pink); color: #fff; }

.port-count { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); }


.port-empty { text-align: center; padding: clamp(56px,8vw,96px) 20px; }
.port-empty h3 { font-family: var(--serif); font-weight: 500; font-size: clamp(24px,2.6vw,32px); }
.port-empty p { margin-top: 12px; color: var(--ink-soft); font-size: 15px; }
.port-empty .btn { margin-top: 26px; }

/* The grid is display:grid and the empty state display:block, so both need the
   hidden attribute restated to win over those. */
.port-empty[hidden], .port-search-clear[hidden] { display: none !important; }

@media (max-width: 620px) {
  .port-tools-row { flex-direction: column; align-items: stretch; gap: 12px; }
  /* The 380px flex-basis is a width on desktop; in a column it becomes a
     height and opens a huge gap, so it is dropped here. */
  .port-search { max-width: none; flex: none; }
}

/* ---------- facet dropdowns ---------- */
.port-facets { margin-top: 22px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.port-facet { position: relative; display: inline-flex; flex-direction: column; gap: 5px; }
.port-facet-lbl {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-faint); padding-left: 2px;
}
.port-facet.on .port-facet-lbl { color: var(--au-pink); }
.port-select { position: relative; display: block; }
.port-select select {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  font-family: var(--sans); font-size: 13.5px; color: var(--ink);
  background: #fff; border: 1px solid var(--line-2); border-radius: 100px;
  padding: 10px 36px 10px 16px;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.port-select select:focus { outline: none; border-color: var(--au-pink); box-shadow: 0 0 0 3px rgba(196,17,107,0.12); }
.port-facet.on .port-select select { border-color: var(--au-pink); }
.port-select-caret {
  position: absolute; right: 15px; top: 50%; transform: translateY(-50%);
  pointer-events: none; color: var(--ink-faint); font-size: 11px;
}

.port-clear-all {
  align-self: flex-end; margin-bottom: 1px; cursor: pointer;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 11px 16px; border-radius: 100px;
  border: 1px dashed var(--line); background: transparent; color: var(--ink-soft);
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.port-clear-all:hover { color: var(--au-pink); border-color: var(--au-pink); }
.port-clear-all[hidden] { display: none !important; }

@media (max-width: 620px) {
  .port-facets { display: grid; grid-template-columns: 1fr 1fr; }
  .port-select select { width: 100%; }
  .port-clear-all { grid-column: 1 / -1; align-self: stretch; }
}

/* ---------- lightbox paging ---------- */
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 52px; height: 52px; border-radius: 50%; cursor: pointer;
  border: 1px solid rgba(255,255,255,0.35); background: rgba(24,8,12,0.55);
  color: #fff; font-size: 26px; line-height: 1; padding: 0 0 3px;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.lightbox-nav:hover { background: var(--au-pink); border-color: var(--au-pink); }
.lightbox-nav.prev { left: clamp(12px, 2.5vw, 32px); }
.lightbox-nav.next { right: clamp(12px, 2.5vw, 32px); }
.lightbox-nav.prev:hover { transform: translateY(-50%) translateX(-2px); }
.lightbox-nav.next:hover { transform: translateY(-50%) translateX(2px); }
.lightbox-nav[hidden] { display: none !important; }

.lightbox-pos {
  margin-top: 10px; font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.12em; color: rgba(255,255,255,0.5);
}
.lightbox-pos[hidden] { display: none !important; }

/* The arrows sit over the image on a phone rather than beside it, so the
   picture keeps the width, and they drop to the lower corners where a thumb
   can reach them. */
@media (max-width: 640px) {
  .lightbox-nav { width: 44px; height: 44px; font-size: 22px; top: auto; bottom: 16px; transform: none; }
  .lightbox-nav.prev:hover, .lightbox-nav.next:hover { transform: none; }
  .lightbox-inner { padding-bottom: 52px; }
}
