/**
 * Photography gallery. Self-contained so the plugin works without the
 * theme stylesheet. Colors are the existing portfolio tokens.
 */

@import url('https://fonts.googleapis.com/css2?family=Archivo:ital,wght@0,700;0,900;1,900&family=Inter:wght@400;500&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  --jph-ink: #0E1116;
  --jph-paper: #EDEFF0;
  --jph-blue: #0792C4;
  --jph-blue-lt: #67CDF1;
  --jph-red: #B82329;
  --jph-muted: #6B7178;
}

.jph-body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--jph-ink);
  color: #fff;
  font-family: Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

.jph-display { font-family: Archivo, system-ui, sans-serif; font-weight: 900; text-transform: uppercase; }
.jph-mono { font-family: "JetBrains Mono", ui-monospace, monospace; }

.jph-app {
  position: fixed;
  inset: 0;
  touch-action: none;
}

.jph-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.jph-sequence {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 60;
  flex-direction: column;
  align-items: center;
  background: var(--jph-ink);
}
#sequenceBg { position: absolute; inset: 0; overflow: hidden; }
#sequenceBg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(6px) brightness(0.4) saturate(0.9);
  transform: scale(1.06);
}
.jph-sequence-loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.jph-sequence-loader img { width: 7rem; height: 7rem; opacity: 0.9; }
@media (min-width: 768px) {
  .jph-sequence-loader img { width: 9rem; height: 9rem; }
}
.jph-sequence-copy {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 15vh 1.5rem 0;
}
.jph-sequence-title { margin: 0; font-size: 2.25rem; line-height: 1; }
.jph-sequence-desc {
  margin: 0;
  max-width: 28rem;
  color: var(--jph-blue-lt);
  font-style: italic;
  font-size: 1rem;
  line-height: 1.35;
}
@media (min-width: 768px) {
  .jph-sequence-title { font-size: 3.75rem; }
  .jph-sequence-desc { font-size: 1.25rem; }
}
#sequenceTitle, #sequenceDesc { will-change: filter, transform, opacity; }
.jph-rule {
  width: 4rem;
  height: 3px;
  margin: 1rem 0;
  background: var(--jph-blue);
  transform-origin: left center;
}
.jph-rule-lt { background: var(--jph-blue-lt); width: 3.5rem; }

.jph-watermark {
  position: fixed;
  top: 1.5rem;
  left: 1.5rem;
  z-index: 20;
  margin: 0;
  font-family: Archivo, system-ui, sans-serif;
  font-style: italic;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: 0.875rem;
  opacity: 0.3;
  pointer-events: none;
}

.jph-top-hint {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  justify-content: center;
  padding-top: 0.5rem;
  opacity: 0;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.3);
  text-align: center;
}
.jph-top-hint span { display: block; }
.jph-hint-label { display: none; }
@media (min-width: 768px) {
  .jph-hint-label { display: block; }
}
.jph-top-zone {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 5rem;
  z-index: 30;
}
.jph-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 4rem;
  padding: 0 1.25rem;
  background: linear-gradient(to bottom, rgba(14, 17, 22, 0.8), transparent);
}

.jph-icon-btn {
  width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  text-decoration: none;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.875rem;
  cursor: pointer;
}
.jph-icon-btn:hover { background: rgba(255, 255, 255, 0.25); }
.jph-icon-btn-sm { width: 2rem; height: 2rem; font-size: 0.75rem; }
.jph-icon-btn:active, .jph-chip:active, .jph-skew:active { transform: scale(0.94); }

.jph-skew {
  display: inline-block;
  transform: skewX(-8deg);
  border: 0;
  cursor: pointer;
  text-decoration: none;
  color: #fff;
  font-family: Archivo, system-ui, sans-serif;
  font-style: italic;
  font-weight: 900;
  text-transform: uppercase;
  font-size: 0.75rem;
  padding: 0.5rem 1rem;
}
.jph-skew > span { display: inline-block; transform: skewX(8deg); }
.jph-skew-blue { background: var(--jph-blue); }
.jph-skew-blue:hover { filter: brightness(1.08); }
.jph-skew-red { background: var(--jph-red); }
.jph-skew-red:hover { filter: brightness(1.12); }
.jph-skew-sm { font-size: 11px; letter-spacing: 0.02em; padding: 0.25rem 0.75rem; width: fit-content; }
.jph-skew-lg { font-size: 0.875rem; padding: 0.75rem 1.5rem; margin-top: 0.5rem; }

.jph-stage { position: absolute; inset: 0; opacity: 0; }
.jph-focus {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}
.jph-slide-track { display: flex; height: 100%; will-change: transform; }
.jph-slide { flex: 0 0 100%; height: 100%; position: relative; }
.jph-slide img { width: 100%; height: 100%; object-fit: cover; }
.jph-nav-zone { position: absolute; top: 0; height: 100%; width: 20%; z-index: 10; border: 0; background: transparent; padding: 0; }
.jph-nav-prev { left: 0; cursor: w-resize; }
.jph-nav-next { right: 0; cursor: e-resize; }

.jph-grid-scroll {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}
.jph-grid-scroll::-webkit-scrollbar { display: none; }
.jph-grid {
  columns: 3;
  column-gap: 3px;
  padding: 3px;
}
.jph-grid-cell {
  display: block;
  width: 100%;
  margin: 0 0 3px;
  padding: 0;
  border: 0;
  background: transparent;
  break-inside: avoid;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  opacity: 0;
}
.jph-grid-cell img { width: 100%; height: auto; display: block; transition: transform 0.35s ease; }
.jph-grid-cell:hover img { transform: scale(1.04); }
.jph-empty {
  margin: 6rem 1.5rem 0;
  text-align: center;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.jph-cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 65;
  width: 0;
  height: 0;
  pointer-events: none;
  opacity: 0;
}
.jph-cursor .tag-ring {
  position: absolute;
  top: -15px;
  left: -15px;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  background: rgba(14, 17, 22, 0.15);
}
.jph-cursor .tag-top,
.jph-cursor .tag-bottom {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(14, 17, 22, 0.7);
  padding: 3px 8px;
  border-radius: 3px;
}
.jph-cursor .tag-top { bottom: 24px; }
.jph-cursor .tag-bottom { top: 24px; }

.jph-zoom-counter {
  position: fixed;
  top: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  opacity: 0;
  pointer-events: none;
}
.jph-zoom-counter p {
  margin: 0;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.875rem;
  letter-spacing: 0.2em;
  background: rgba(14, 17, 22, 0.7);
  padding: 0.5rem 1rem;
  border-radius: 999px;
}
.jph-zoom-bg {
  position: fixed;
  right: 0;
  top: 0;
  height: 100%;
  width: 7rem;
  z-index: 30;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(to left, rgba(14, 17, 22, 0.7), rgba(14, 17, 22, 0.25), transparent);
}
@media (min-width: 768px) {
  .jph-zoom-bg { width: 9rem; }
}
.jph-zoom {
  position: fixed;
  right: 1rem;
  top: 50%;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  transform: translateY(-50%);
  transform-origin: right center;
  opacity: 0;
}
@media (min-width: 768px) {
  .jph-zoom { right: 1.5rem; }
}
.jph-zoom-line { width: 1px; height: 3.5rem; background: rgba(255, 255, 255, 0.25); }
.jph-zoom-hint {
  margin: 0.25rem 0 0;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 9px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.5);
  writing-mode: vertical-rl;
  text-align: center;
}

.jph-drawer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  background: rgba(14, 17, 22, 0.45);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.jph-mega {
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  opacity: 0;
  pointer-events: none;
  padding: 2rem 1.25rem;
  background: rgba(14, 17, 22, 0.9);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.jph-mega-deep {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  opacity: 0;
  pointer-events: none;
  padding: 1.5rem 1.25rem;
  background: rgba(14, 17, 22, 0.94);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.jph-mega-label {
  margin: 0 0 1.25rem;
  text-align: center;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.3em;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
}
.jph-mega-items, .jph-chip-row, .jph-chips {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.jph-mega-items { flex-wrap: wrap; gap: 0.75rem; }
.jph-chip-row {
  padding: 1rem 1.25rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.jph-chips { flex: 0 0 auto; }
.jph-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 0;
  border-radius: 999px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-family: Archivo, system-ui, sans-serif;
  font-style: italic;
  font-weight: 900;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.1);
}
.jph-chip-lg { font-size: 0.95rem; padding: 0.75rem 1.5rem; }
.jph-chip:hover { background: rgba(255, 255, 255, 0.2); color: #fff; }
.jph-chip.is-active { background: var(--jph-blue); color: #fff; }
.jph-chip-count {
  font-style: normal;
  font-weight: 500;
  font-size: 0.8em;
  letter-spacing: 0;
  opacity: 0.45;
}
.jph-chip:hover .jph-chip-count,
.jph-chip.is-active .jph-chip-count { opacity: 0.75; }
.jph-caret { font-size: 9px; opacity: 0.7; }
.jph-info-btn {
  flex: 0 0 auto;
  margin-left: 0.5rem;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  cursor: pointer;
}
.jph-info-btn:hover { color: #fff; border-color: #fff; }

.jph-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(14, 17, 22, 0.8);
  backdrop-filter: blur(6px);
}
.jph-modal.flex { display: flex; }
.jph-modal.hidden { display: none; }
#photoInfoCard { z-index: 75; }
.info-card {
  position: relative;
  display: grid;
  grid-template-columns: 42% 58%;
  width: min(85vw, 56rem);
  overflow: hidden;
}
.info-card-profile { grid-template-columns: 40% 60%; }
@media (max-width: 767px) {
  .info-card, .info-card-profile { grid-template-columns: 1fr; }
}
.jph-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  border: 0;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
}
.jph-close:hover { background: rgba(0, 0, 0, 0.7); }
.jph-plaque-dark, .jph-plaque-light {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.25rem;
  padding: 2.5rem;
}
@media (min-width: 768px) {
  .jph-plaque-dark, .jph-plaque-light { padding: 3.5rem; }
}
.jph-plaque-dark { background: var(--jph-ink); color: #fff; }
.jph-plaque-light { background: rgba(255, 255, 255, 0.92); color: var(--jph-ink); }
.jph-plaque-title { margin: 0; font-size: 2.25rem; line-height: 0.95; }
@media (min-width: 768px) {
  .jph-plaque-title { font-size: 3rem; }
}
.jph-plaque-body {
  margin: 0;
  font-style: italic;
  font-size: 1.125rem;
  line-height: 1.35;
  color: rgba(14, 17, 22, 0.8);
}
.jph-plaque-dark .jph-plaque-body { color: #fff; }
@media (min-width: 768px) {
  .jph-plaque-body { font-size: 1.25rem; }
}
.jph-dim { margin: 0; color: rgba(255, 255, 255, 0.6); font-size: 0.875rem; }
.jph-tabs { display: flex; gap: 0.5rem; margin-top: 0.5rem; }
.tab-btn {
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-family: Archivo, system-ui, sans-serif;
  font-style: italic;
  font-weight: 900;
  text-transform: uppercase;
  font-size: 0.75rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
}
.tab-btn.is-active { background: var(--jph-ink); color: #fff; border-color: #fff; }
.jph-text-link {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  color: var(--jph-blue);
  text-decoration: none;
}
.jph-text-link:hover { color: var(--jph-ink); }
.jph-kicker {
  margin: 0;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  color: var(--jph-red);
}
.jph-contact-lines {
  margin-top: 0.5rem;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.75rem;
}
.jph-contact-lines p { margin: 0.2rem 0; }
.jph-contact-lines a { color: inherit; }
.hidden { display: none; }

.jph-detail {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: var(--jph-ink);
  overflow: hidden;
}
.jph-detail.hidden { display: none; }
.jph-detail-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
#detailImg { max-width: none; user-select: none; max-height: 100%; max-width: 100%; }
.jph-detail-cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 72;
  width: 0;
  height: 0;
  pointer-events: none;
  opacity: 0;
}
#detailCursorLabel {
  position: absolute;
  bottom: -1.25rem;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  color: #fff;
  background: rgba(14, 17, 22, 0.7);
  padding: 0.25rem 0.5rem;
}
.jph-detail-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  border: 0;
  background: rgba(14, 17, 22, 0.6);
  color: #fff;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.875rem;
  letter-spacing: 0.14em;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
}
.jph-detail-info {
  position: absolute;
  right: 4rem;
  top: 50%;
  transform: translateY(-50%);
  height: 2.75rem;
  padding: 0 1rem;
  border: 0;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-family: Archivo, system-ui, sans-serif;
  font-style: italic;
  font-weight: 900;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  cursor: pointer;
}
.jph-detail-info:hover { background: rgba(255, 255, 255, 0.3); }
@media (min-width: 768px) {
  .jph-detail-info { right: 6rem; }
}
.jph-detail-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 999px;
  background: rgba(14, 17, 22, 0.5);
  color: #fff;
  font-size: 1.125rem;
  cursor: pointer;
}
.jph-detail-arrow:hover { background: rgba(14, 17, 22, 0.75); }
.jph-detail-prev { left: 1rem; }
.jph-detail-next { right: 1rem; }
@media (min-width: 768px) {
  .jph-detail-prev { left: 1.5rem; }
  .jph-detail-next { right: 1.5rem; }
}

.jph-photo-side {
  position: relative;
  min-height: 220px;
  background: var(--jph-ink);
  overflow: hidden;
}
@media (min-width: 768px) {
  .jph-photo-side { min-height: 420px; }
}
#photoInfoThumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.jph-photo-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(14, 17, 22, 0.8), rgba(14, 17, 22, 0.1), transparent);
}
.jph-photo-tag { position: absolute; top: 1.25rem; left: 1.25rem; }
.jph-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(14, 17, 22, 0.1);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.875rem;
}
.jph-meta-k { color: rgba(14, 17, 22, 0.4); letter-spacing: 0.14em; margin-right: 0.35rem; }
.jph-meta-div { width: 1px; height: 0.75rem; background: rgba(14, 17, 22, 0.2); }
.jph-model-link {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--jph-blue);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.jph-model-link:hover { color: var(--jph-ink); }

.jph-grain {
  position: fixed;
  inset: 0;
  z-index: 45;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@media (max-width: 720px) {
  .jph-grid { columns: 2; }
}
