/* gallery.css */
body { font-family: 'Open Sans', sans-serif; margin: 0; background: #fafafa; color: #222; line-height: 1.6; }
a { color: #0077cc; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Top nav */
nav {
  background: #fff;
  border-bottom: 1px solid #ddd;
  padding: 10px 40px;
  display: flex;
  justify-content: center;
  gap: 40px;
  font-family: 'Open Sans', sans-serif;
  font-weight: 600;
}
nav a { color: #222; font-size: 16px; }
nav a.active { border-bottom: 2px solid #0077cc; padding-bottom: 2px; }

/* Header */
/*

header h1 { margin: 0; font-size: 28px; font-family: 'Lora', serif; font-weight: 700; }
*/
header { display: flex; justify-content: space-between; align-items: center; padding: 20px 40px;  max-width: 1100px;  margin: 0 auto;   padding-left: 20px;  padding-right: 20px;}
header img { height: 100px; }

/* Main layout */
.main { display: flex; flex-wrap: wrap; padding: 20px 40px; gap: 20px; }


.details { flex: 1 1 32%; min-width: 250px; background: #fff; padding: 20px; border-right: 1px solid #eee; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.details h2 { margin-top: 0; font-size: 20px; font-family: 'Lora', serif; border-bottom: 1px solid #eee; padding-bottom: 6px; }
.essay { display: flex; flex : 1 1 60%; min-width: 300px; }

/* Links block */
.links a { display: block; margin-bottom: 6px; }
*/



.details h2 {
  font-family: 'Playfair Display', serif;
  font-weight: 600;      /* slightly lighter than title */
  font-size: 20px;       /* subheading size */
  letter-spacing: 0.3px;
  color: #333;           /* softer than title */
  margin-top: 0;
  margin-bottom: 12px;
}

header h1 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  font-size: 36px;
  letter-spacing: 1px;
  font-variant: small-caps;
  color: #111;
  margin: 0;
}

/* Body / essay / nav text */
body, .essay, nav, .links a {
  font-family: 'Open Sans', sans-serif;
  font-weight: 400;
  color: #222;
  line-height: 1.6;
}




/* Optional: subtle styling for links */
.links a {
  font-weight: 600;
  color: #0077cc;
}
.links a:hover { text-decoration: underline; }

/* Gallery grid */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* always 4 columns */
  gap: 20px;
  max-width: 1200px; /* center the grid */
  margin: 0 auto;
  padding: 20px;
}
/* Mobile / small screens */
@media (max-width: 768px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}


.gallery-item { position: relative; cursor: pointer; overflow: hidden; }
.gallery-item img, .gallery-item video { width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block; transition: transform 0.3s, opacity 0.3s; }
.gallery-item:hover img, .gallery-item:hover video { opacity: 0.85; transform: scale(1.02); }
.overlay { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(to top, rgba(0,0,0,0.6), rgba(0,0,0,0)); color: #fff; padding: 6px; font-size: 13px; opacity: 0; transition: opacity 0.3s ease; }
.overlay strong { display: block; font-size: 14px; }
.gallery-item:hover .overlay { opacity: 1; }

/* Lightbox */
.lightbox { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.95); z-index: 1000; align-items: center; justify-content: center; padding: 40px; }
.lightbox.active { display: flex; }
.lightbox-content { position: relative; max-width: 90%; max-height: 90%; text-align: center; }
.lightbox img, .lightbox video { width: auto; max-width: 100%; height: auto; max-height: 80vh; display: block; }

/* Caption */
.caption { margin-top: 12px; font-size: 16px; color: #eee; }
.caption strong { display: block; font-size: 18px; color: #fff; margin-bottom: 4px; font-family: 'Lora', serif; }

/* Lightbox controls */
.close-btn { position: absolute; top: 20px; right: 20px; font-size: 28px; font-weight: bold; color: #fff; cursor: pointer; background: rgba(0,0,0,0.6); width: 36px; height: 36px; text-align: center; line-height: 36px; z-index: 1002; }
.nav-arrow { position: absolute; top: 50%; transform: translateY(-50%); font-size: 40px; color: rgba(255,255,255,0.6); cursor: pointer; user-select: none; z-index: 1002; padding: 10px; transition: color 0.2s, opacity 0.2s; opacity: 0; }
.lightbox:hover .nav-arrow { opacity: 1; }
.nav-arrow:hover { color: #fff; }
.nav-prev { left: 20px; }
.nav-next { right: 20px; }

/* Make 3D models scale properly inside lightbox */
.lightbox model-viewer {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 80vh;
  display: block;
  background: #111; /* optional: dark backdrop */
}
/* Match text width to gallery grid */
.content-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 5px;
  padding-top:2px;
}

.essay {
  /*flex: 1 1 60%;
  min-width: 300px;
  display: block; /* changed from flex */ 
  line-height: 1.6;
}
.curators {
  margin-top: 1em;
  max-width: 300px; /* optional, or let it fill */
}

.essay-container {
  display: flex;
  gap: 40px; /* space between main text and curators */
}

.essay-text {
  flex: 1; /* take remaining space */
}

.curators {
  flex: 0 0 200px; /* fixed width column */
}

.details { flex: 0 0 35%; }  /* details fixed 35% */
.essay { flex: 0 0 65%; display: flex; gap: 40px; }


.gallery-wrapper {
  max-width: 1200px;
  margin: 20px auto 0; /* margin-top to separate from text */
  padding: 0 20px;
}
#loaded-bar {
  background: #111;
  color: #fff;
  padding: 8px 12px;
  font-size: 14px;
  margin-bottom: 12px;
  min-height: 36px;         /* ensures it’s tall enough */
  line-height: 1.4;         /* controls spacing of text lines */
}

/* Subtle overlay for photosensitive works */
.gallery-item.photosensitive::after {
  content: "⚠️ Photosensitive";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.9); /* darkened overlay */
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  text-align: center;
  opacity: 0.9;
  pointer-events: none; /* still clickable */
  z-index: 2;
  border: 2px solid #f00; /* optional highlight */
}