/* ================================================================
   Andres Mazzei — Portfolio
   The site is built as a fixed-aspect 1440x1024 "canvas" that
   scales to fit any viewport with letterboxing. All interior
   sizes use container query units (cqw/cqh) so everything scales
   proportionally.
   ================================================================ */

:root {
  --canvas-w: 1440;
  --canvas-h: 1024;
  --ratio: calc(var(--canvas-w) / var(--canvas-h)); /* 1.40625 */

  --bg: #ffffff;
  --letterbox: #ffffff;
  --ink: #111111;
  --ink-soft: #2a2a2a;
  --placeholder: #dcdcdc;
  --placeholder-hover: #d0d0d0;
  --input-bg: #e0e0e0;
  --btn-bg: #d8d8d8;
  --btn-bg-hover: #c8c8c8;
  --hairline: #e8e8e8;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  overflow: hidden;
  background: var(--letterbox);
  color: var(--ink);
  font-family: Georgia, 'Times New Roman', Times, serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: 0.005em;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* The app frame: a 1440:1024 box that fits inside the viewport */
.app {
  position: relative;
  width: min(100vw, calc(100vh * 1.40625));
  height: min(100vh, calc(100vw / 1.40625));
  background: var(--bg);
  container-type: size;
  container-name: app;
  overflow: hidden;
}

/* ------------ Navbar ------------ */
.navbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 11cqh;
  display: flex;
  align-items: center;
  /* Padding 0 on both sides so the logo and the CV/Contact group
     hug the same left and right edges as the hero box. */
  padding: 0;
  z-index: 10;
  background: var(--bg);
  pointer-events: auto;
}

.logo-link {
  display: inline-flex;
  align-items: center;
  height: 3.6cqh;
  margin-right: 4.5cqw;
  transition: opacity 0.25s var(--ease);
}
.logo-link:hover { opacity: 0.65; }

.logo {
  height: 100%;
  width: auto;
  display: block;
  /* The PNG has white background; treat as black mark only */
  object-fit: contain;
}

.nav-left {
  display: flex;
  gap: 3.5cqw;
}
.nav-right {
  display: flex;
  gap: 3.5cqw;
  margin-left: auto;
}

.nav-link {
  color: var(--ink);
  text-decoration: none;
  font-size: 1.7cqh;
  font-weight: 400;
  letter-spacing: 0.015em;
  position: relative;
  padding: 0.4cqh 0;
  transition: opacity 0.25s var(--ease);
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.2cqh;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.35s var(--ease);
}
.nav-link:hover::after,
.nav-link.is-active::after {
  transform: scaleX(1);
}
.nav-link:hover { opacity: 0.85; }

/* ------------ Footer ------------ */
.footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 10cqh;
  display: flex;
  align-items: center;
  /* Padding 0 on both sides so the socials and email hug the same
     left and right edges as the hero box. */
  padding: 0;
  z-index: 10;
  background: var(--bg);
}

.socials {
  display: flex;
  align-items: center;
  gap: 1.3cqw;
}
.socials a {
  display: inline-flex;
  align-items: center;
  height: 2.2cqh;
  transition: opacity 0.25s var(--ease);
}
.socials a:hover { opacity: 0.55; }
.socials img {
  height: 100%;
  width: auto;
  display: block;
}

.email {
  margin-left: auto;
  color: var(--ink);
  text-decoration: none;
  font-size: 1.55cqh;
  font-style: italic;
  letter-spacing: 0.02em;
  transition: opacity 0.25s var(--ease);
}
.email:hover { opacity: 0.65; }

/* ------------ Stage (the swappable page area) ------------ */
.stage {
  position: absolute;
  top: 11cqh;
  bottom: 10cqh;
  left: 0;
  right: 0;
  overflow: hidden;
}

.page {
  position: absolute;
  inset: 0;
  display: flex;
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: translateY(1.2cqh);
  animation: page-in 0.55s var(--ease) forwards;
}
.page.is-leaving {
  animation: page-out 0.3s var(--ease) forwards;
}

@keyframes page-in {
  0%   { opacity: 0; transform: translateY(1.2cqh); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes page-out {
  0%   { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-1.2cqh); }
}

/* ------------ Placeholders ------------ */
.placeholder {
  background: var(--placeholder);
  transition: background 0.3s var(--ease), transform 0.4s var(--ease);
}
a.placeholder:hover,
button.placeholder:hover,
.tile:hover .placeholder {
  background: var(--placeholder-hover);
}

/* ============ Home ============ */
.page-home {
  padding: 0;
}
.hero-placeholder {
  width: 100%;
  height: 100%;
}

/* Home slideshow: stacked clickable slides that cross-fade. */
.hero-slideshow {
  position: relative;
  overflow: hidden;
  animation: none;
  background-image: none;
  background: transparent;
}
.hero-slide {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  opacity: 0;
  /* Inactive slides sit underneath and must not eat clicks for the
     visible one — without this, the last-stacked slide always wins. */
  pointer-events: none;
  transition: opacity 0.7s var(--ease);
}
.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}
.hero-slide:hover img {
  transition: transform 0.6s var(--ease);
  transform: scale(1.015);
}
@media (prefers-reduced-motion: reduce) {
  .hero-slide,
  .hero-slide:hover img { transition: none; transform: none; }
}

/* ============ Gallery pages ============ */
.page-gallery {
  padding: 4cqh 4.5cqw;
}
.gallery-scroll {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,0.18) transparent;
}
.gallery-scroll::-webkit-scrollbar { width: 6px; }
.gallery-scroll::-webkit-scrollbar-track { background: transparent; }
.gallery-scroll::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.18);
  border-radius: 3px;
}

.gallery-grid {
  display: grid;
  /* Vertical gap is generous so the artwork/project name has breathing
     room beneath each tile before the next row begins. */
  gap: 6.8cqh 4cqw;
  padding-right: 1cqw;
}
.gallery-grid.grid-3 { grid-template-columns: repeat(3, 1fr); }
.gallery-grid.grid-2 { grid-template-columns: repeat(2, 1fr); }

.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5cqh;
  cursor: pointer;
  background: transparent;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  text-align: center;
  transition: transform 0.4s var(--ease);
}
.tile:hover { transform: translateY(-0.4cqh); }

.tile .thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  position: relative;
  overflow: hidden;
}
.gallery-grid.grid-2 .tile .thumb {
  aspect-ratio: 16 / 11;
}
/* Real artwork sits inside the placeholder frame; object-fit: contain
   shrinks/expands it to fit without distorting and without changing
   the frame dimensions. Any letterbox area shows the placeholder gray. */
.tile .thumb .thumb-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}
.tile .thumb .thumb-img.is-loaded {
  opacity: 1;
}
/* Once an image is in an artwork thumb or detail frame, drop the gray
   altogether so the piece floats on the page background. */
.tile .thumb.has-image,
.artwork-image.has-image {
  animation: none;
  background-image: none;
  background: transparent;
}
.tile .label {
  font-size: 1.55cqh;
  font-style: italic;
  letter-spacing: 0.02em;
  color: var(--ink);
}

/* ============ CV ============ */
.page-cv {
  padding: 0 4.5cqw;
  align-items: flex-start;
}
.cv-content {
  width: 100%;
  height: 100%;
  max-width: 60cqw;
  padding-left: 14cqw;
  padding-top: 4cqh;
  overflow-y: auto;
  scrollbar-width: thin;
}
.cv-content::-webkit-scrollbar { width: 4px; }
.cv-content::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.15);
  border-radius: 2px;
}

.cv-title {
  font-size: 2.4cqh;
  font-weight: 400;
  margin: 0 0 1.4cqh 0;
  letter-spacing: 0.32em;
}
.cv-name {
  font-size: 2.2cqh;
  font-weight: 400;
  font-style: italic;
  margin: 0 0 2.4cqh 0;
  letter-spacing: 0.015em;
  color: var(--ink);
  opacity: 0.85;
}
.cv-section {
  font-size: 1.7cqh;
  font-weight: 400;
  font-style: italic;
  margin: 2.4cqh 0 0.8cqh 0;
  letter-spacing: 0.02em;
  color: var(--ink);
  opacity: 0.95;
}
.cv-text {
  font-size: 1.55cqh;
  font-weight: 400;
  margin: 0 0 0.4cqh 0;
  line-height: 1.7;
  color: var(--ink);
  opacity: 0.55;
  letter-spacing: 0.012em;
}

/* ============ Artwork detail ============ */
.page-artwork-detail {
  align-items: center;
  justify-content: center;
  padding: 2cqh 4.5cqw;
  position: relative;
}
.artwork-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3cqh;
  width: 100%;
  height: 100%;
  justify-content: center;
}
/* Wrapper for the primary artwork image. For single-piece works it sits
   alone at the wireframe size. For multi-image series the frame shrinks
   slightly to leave room for the thumb strip below. */
.artwork-frames {
  display: flex;
  justify-content: center;
  align-items: center;
}

.artwork-image {
  width: 46cqw;
  height: 60cqh;
  max-height: 60cqh;
  position: relative;
  overflow: hidden;
}
/* Series: primary frame is a touch smaller so caption + thumb strip fit. */
.artwork-frames.is-series .artwork-image {
  width: 42cqw;
  height: 44cqh;
}

/* Thumbnail strip below the caption on series pages. */
.artwork-thumbs {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.4cqw;
  margin-top: 1.4cqh;
}
.strip-thumb {
  width: 8.5cqw;
  height: 10cqh;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  opacity: 0.55;
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}
.strip-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.strip-thumb:hover {
  opacity: 0.85;
  transform: translateY(-0.3cqh);
}
.strip-thumb.is-active {
  opacity: 1;
  transform: translateY(-0.3cqh);
}
.strip-thumb.is-active::after {
  content: '';
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: -0.45cqh;
  height: 1px;
  background: var(--ink);
}
.artwork-image .artwork-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}
.artwork-image .artwork-img.is-loaded {
  opacity: 1;
}
.artwork-caption {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2cqh;
}
.art-name, .art-meta, .art-status {
  margin: 0;
  font-size: 1.6cqh;
  letter-spacing: 0.02em;
  color: var(--ink);
}
.art-name {
  font-style: italic;
  font-size: 2.1cqh;
  letter-spacing: 0.015em;
}
.art-status {
  font-size: 1.3cqh;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.art-status.is-price {
  letter-spacing: 0.06em;
  text-transform: none;
  font-size: 1.5cqh;
  color: var(--ink);
}

.arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-family: inherit;
  font-size: 3cqh;
  background: transparent;
  border: 0;
  color: var(--ink);
  cursor: pointer;
  padding: 1cqh 1cqw;
  line-height: 1;
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}
.arrow:hover {
  opacity: 0.55;
}
.arrow-left { left: 16cqw; }
.arrow-right { right: 16cqw; }
.arrow-left:hover { transform: translate(-0.5cqw, -50%); }
.arrow-right:hover { transform: translate(0.5cqw, -50%); }

/* ============ Project detail ============ */
.page-project-detail {
  flex-direction: column;
  padding: 2.5cqh 4.5cqw 2cqh;
  gap: 1.8cqh;
  /* Safety net: if a project's text + gallery is taller than the stage,
     allow internal vertical scroll so the strip never gets clipped at
     the bottom. Navbar and footer remain sticky outside this. */
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,0.18) transparent;
}
.page-project-detail::-webkit-scrollbar { width: 4px; }
.page-project-detail::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.18);
  border-radius: 2px;
}
.back-arrow {
  align-self: flex-start;
  background: transparent;
  border: 0;
  color: var(--ink);
  font-size: 2.3cqh;
  font-family: inherit;
  cursor: pointer;
  padding: 0;
  margin-bottom: 0.5cqh;
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}
.back-arrow:hover {
  opacity: 0.55;
  transform: translateX(-0.4cqw);
}

.project-meta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4cqw;
  width: 100%;
}
.proj-line {
  margin: 0 0 0.7cqh 0;
  font-size: 1.55cqh;
  letter-spacing: 0.018em;
  color: var(--ink-soft);
  line-height: 1.5;
}
.project-meta-left .proj-line:first-child,
.project-meta-right .proj-line:first-child {
  font-style: italic;
  font-size: 1.9cqh;
  color: var(--ink);
  margin-bottom: 1cqh;
}

.project-images {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5cqw;
  flex: 1;
  width: 100%;
}
.project-image {
  width: 100%;
  height: 100%;
}
.arrow-inset {
  position: absolute;
  top: 50%;
  left: 22cqw;
  transform: translateY(-50%);
  font-family: inherit;
  font-size: 2.8cqh;
  background: transparent;
  border: 0;
  color: var(--ink);
  cursor: pointer;
  padding: 1cqh 1cqw;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.arrow-inset:hover {
  opacity: 0.55;
  transform: translate(-0.4cqw, -50%);
}

/* ---- Project detail: gallery mode (primary + rotating thumb strip) ---- */
.project-images.is-gallery {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2cqh;
  grid-template-columns: none;
  flex: 0 0 auto;        /* don't stretch — strip stays right under primary */
  padding-bottom: 2cqh;
}
.project-primary {
  width: 100%;
  display: flex;
  justify-content: center;
}
.project-images.is-gallery .project-image {
  width: 72cqw;
  height: 60cqh;
  max-height: 60cqh;
  position: relative;
  overflow: hidden;
}
.project-image.has-image {
  animation: none;
  background-image: none;
  background: transparent;
}
.project-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.45s var(--ease);
}
.project-img.is-loaded { opacity: 1; }

/* Rotating thumb strip: horizontally scrollable, snaps to center on click. */
.project-thumbs-window {
  width: 70cqw;
  max-width: 100%;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 0.4cqh 0 0.4cqh;
}
.project-thumbs-window::-webkit-scrollbar { display: none; }
.project-thumbs-track {
  display: flex;
  gap: 1cqw;
  /* Half-window padding lets the first/last items center cleanly:
     (window_width/2 - thumb_width/2) = 35cqw - 5.5cqw ≈ 29.5cqw. */
  padding: 0 29.5cqw;
}
.proj-thumb {
  flex: 0 0 11cqw;
  height: 10cqh;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  opacity: 0.55;
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
  scroll-snap-align: center;
}
.proj-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.proj-thumb:hover {
  opacity: 0.85;
  transform: translateY(-0.3cqh);
}
.proj-thumb.is-active {
  opacity: 1;
  transform: translateY(-0.3cqh);
}
.proj-thumb.is-active::after {
  content: '';
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 0;
  height: 1px;
  background: var(--ink);
}

/* Real-project meta lines: small tweaks for richer text. */
.proj-title { font-style: italic; }
.proj-deliverables-label { margin-top: 0.6cqh; font-style: italic; }
.proj-deliverable { margin-left: 0.6cqw; }
.project-meta-right .proj-description {
  line-height: 1.6;
  font-style: normal; /* description reads better non-italic */
  color: var(--ink);
  font-size: 1.5cqh;
  font-weight: 400;
}

/* ============ Contact ============ */
.page-contact {
  padding: 3cqh 4.5cqw;
  gap: 0;
  align-items: center;
  justify-content: space-between;
}
.contact-left {
  flex: 0 0 28cqw;
  display: flex;
  flex-direction: column;
  gap: 2.6cqh;
  max-width: 28cqw;
}
.contact-heading {
  font-size: 2.4cqh;
  font-weight: 400;
  font-style: italic;
  margin: 0;
  letter-spacing: 0.01em;
  line-height: 1.3;
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 2.4cqh;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 0.7cqh;
}
.field-label {
  font-size: 1.5cqh;
  font-style: italic;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
}
.field input,
.field textarea {
  font: inherit;
  font-size: 1.45cqh;
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.75);
  padding: 0.9cqh 1.2cqw;
  color: var(--ink);
  border-radius: 0.55cqh;
  outline: none;
  width: 100%;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.field input {
  height: 4cqh;
}
.field textarea {
  resize: none;
  height: 11.5cqh;
  border-radius: 0.7cqh;
}
.field input:focus,
.field textarea:focus {
  background: transparent;
  border-color: rgba(0, 0, 0, 1);
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.9cqw;
  font-size: 1.3cqh;
  letter-spacing: 0.02em;
  cursor: pointer;
  user-select: none;
}
.checkbox-row input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 2.2cqh;
  height: 2.2cqh;
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.75);
  border-radius: 0.3cqh;
  cursor: pointer;
  position: relative;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.checkbox-row input[type="checkbox"]:hover {
  border-color: rgba(0, 0, 0, 1);
}
.checkbox-row input[type="checkbox"]:checked {
  background: transparent;
  border-color: rgba(0, 0, 0, 1);
}
.checkbox-row input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.5cqh;
  height: 1cqh;
  border: solid var(--ink);
  border-width: 0 0.18cqh 0.18cqh 0;
  transform: translate(-50%, -60%) rotate(45deg);
}

.submit-btn {
  align-self: flex-start;
  font: inherit;
  font-size: 1.5cqh;
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.75);
  border-radius: 0.55cqh;
  padding: 0.9cqh 2.2cqw;
  cursor: pointer;
  letter-spacing: 0.02em;
  color: var(--ink);
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease), transform 0.25s var(--ease);
}
.submit-btn:hover {
  background: transparent;
  border-color: rgba(0, 0, 0, 1);
  transform: translateY(-0.2cqh);
}

.contact-right {
  width: 49cqw;
  height: 68cqh;
  overflow: hidden;
  position: relative;
}
.contact-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* ============ Loading shimmer (subtle) ============ */
.placeholder {
  background-image: linear-gradient(
    100deg,
    var(--placeholder) 0%,
    #e6e6e6 50%,
    var(--placeholder) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 4.5s ease-in-out infinite;
}
@keyframes shimmer {
  0%   { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* ============ Reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .placeholder { animation: none; background-image: none; background: var(--placeholder); }
}

/* ============ Lightbox (full-screen zoom view) ============ */
body.lightbox-open {
  overflow: hidden;
}
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.94);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, visibility 0s linear 0.22s;
}
.lightbox.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.22s ease;
}
.lightbox-stage {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: none;
}
.lightbox-img {
  max-width: 92vw;
  max-height: 92vh;
  width: auto;
  height: auto;
  object-fit: contain;
  cursor: zoom-in;
  transform-origin: center center;
  transition: transform 0.18s ease;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-user-select: none;
  will-change: transform;
}
.lightbox-img.is-zoomed {
  cursor: grab;
  transition: none;
}
.lightbox-img.is-zoomed:active {
  cursor: grabbing;
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  border-radius: 50%;
  cursor: pointer;
  z-index: 2;
  transition: background 0.15s ease, transform 0.15s ease;
  padding: 0;
}
.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: scale(1.04);
}
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 36px;
  line-height: 1;
  font-family: inherit;
  border-radius: 50%;
  cursor: pointer;
  z-index: 2;
  padding: 0 0 4px 0;
  transition: background 0.15s ease, transform 0.15s ease;
}
.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-50%) scale(1.05);
}
.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }
.lightbox-count {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  letter-spacing: 0.08em;
  font-family: inherit;
  z-index: 2;
  pointer-events: none;
}

/* Cursor hint on primary detail images so users know they can click to zoom */
.artwork-img,
.project-img {
  cursor: zoom-in;
}
