* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  min-height: 100vh;
  background: #1a120b;
  font-family: 'Space Mono', monospace;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* grainy wall texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.08'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/*  HEADER  */
header {
  position: relative;
  z-index: 1;
  padding: 32px 56px 14px;
  text-align: center;
}

.site-title {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2rem, 5vw, 4.2rem);
  color: #f0e8d5;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.site-title em { color: #e8c44a; font-style: italic; }


/*  GALLERY GRID (diamond)  */
.gallery {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1400px;
  padding: 10px 40px 16px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 16px 32px;
  flex: 1;
  align-content: center;
}

.painting-wrap {
  cursor: pointer;
  position: relative;
}

/* diamond: rows 1 & 3 offset right, row 2 full width */
.painting-wrap:nth-child(1),
.painting-wrap:nth-child(2),
.painting-wrap:nth-child(3) { grid-row: 1; }
.painting-wrap:nth-child(4),
.painting-wrap:nth-child(5),
.painting-wrap:nth-child(6),
.painting-wrap:nth-child(7) { grid-row: 2; }
.painting-wrap:nth-child(8),
.painting-wrap:nth-child(9),
.painting-wrap:nth-child(10) { grid-row: 3; }

.painting-wrap:nth-child(1) { grid-column: 2; }
.painting-wrap:nth-child(2) { grid-column: 4; }
.painting-wrap:nth-child(3) { grid-column: 6; }
.painting-wrap:nth-child(4) { grid-column: 1; margin-top: -80px; }
.painting-wrap:nth-child(5) { grid-column: 3; margin-top: -80px; }
.painting-wrap:nth-child(6) { grid-column: 5; margin-top: -80px; }
.painting-wrap:nth-child(7) { grid-column: 7; margin-top: -80px; }
.painting-wrap:nth-child(8) { grid-column: 2; margin-top: -80px; }
.painting-wrap:nth-child(9) { grid-column: 4; margin-top: -80px; }
.painting-wrap:nth-child(10) { grid-column: 6; margin-top: -80px; }

/* CSS gold ornate frame */
.frame {
  position: relative;
  padding: 8px;
  background:
    linear-gradient(135deg, #c8a84b 0%, #f0d080 20%, #a07828 40%, #e8c050 55%, #b08030 70%, #f0d878 85%, #c09040 100%);
  box-shadow:
    0 0 0 2px #7a5a18,
    0 0 0 4px #c8a840,
    0 0 0 6px #7a5a18,
    inset 0 0 0 2px #7a5a18,
    inset 0 0 0 4px #d4b050,
    0 20px 60px rgba(0,0,0,0.7),
    0 8px 20px rgba(0,0,0,0.5);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  aspect-ratio: 3 / 4;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* spotlight effect per painting */
.painting-wrap::before {
  content: '';
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 40px;
  background: radial-gradient(ellipse at center bottom, rgba(255,220,120,0.15), transparent);
  pointer-events: none;
}

/*  MUSEUM PLACARD (overlay on hover)  */
.placard {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 6px 10px;
  background: rgba(0,0,0,0.85);
  border-left: 2px solid #c8a840;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}
.painting-wrap:hover .placard {
  opacity: 1;
  transform: translateY(0);
}

.placard-title {
  font-family: 'DM Serif Display', serif;
  font-size: 0.7rem;
  color: #f0e8d5;
  margin-bottom: 2px;
}
.placard-info {
  font-family: 'Cardo', serif;
  font-size: 0.52rem;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.5);
  line-height: 1.5;
}

/*  LIGHTBOX  */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  cursor: zoom-out;
}
.lightbox.open {
  opacity: 1;
  pointer-events: all;
}

.lightbox-inner {
  position: relative;
  max-width: 85vw;
  max-height: 85vh;
  transform: scale(0.85);
  transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
}
.lightbox.open .lightbox-inner {
  transform: scale(1);
}

/* lightbox frame */
.lightbox-frame {
  padding: 20px;
  background:
    linear-gradient(135deg, #c8a84b 0%, #f0d080 20%, #a07828 40%, #e8c050 55%, #b08030 70%, #f0d878 85%, #c09040 100%);
  box-shadow:
    0 0 0 2px #7a5a18,
    0 0 0 5px #c8a840,
    0 0 0 7px #7a5a18,
    0 40px 120px rgba(0,0,0,0.9);
}

.lightbox-frame img {
  display: block;
  max-width: 80vw;
  max-height: 75vh;
  object-fit: contain;
}

.lightbox-placard {
  margin-top: 16px;
  padding: 12px 16px;
  background: #0f0f0f;
  border-left: 3px solid #c8a840;
}
.lightbox-placard .placard-title {
  font-size: 1.1rem;
  margin-bottom: 6px;
}
.lightbox-placard .placard-info {
  font-size: 0.65rem;
}

.lightbox-close {
  position: absolute;
  top: -36px;
  right: 0;
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  font-family: 'Space Mono', monospace;
  font-size: 0.55rem;
  letter-spacing: 0.2em;
  cursor: pointer;
  transition: color 0.2s;
}
.lightbox-close:hover { color: #e8c44a; }

/*  CONTACT  */
.contact-section {
  position: relative;
  z-index: 1;
  padding: 0 56px 28px;
  width: 100%;
  display: flex;
  justify-content: center;
}
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  justify-content: center;
}
.contact-link {
  font-size: 0.6rem;
  color: rgba(255,255,255,0.45);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.08em;
  transition: color 0.2s;
  font-family: 'Space Mono', monospace;
}
.contact-link:hover { color: #e8c44a; }
.contact-link svg { width: 13px; height: 13px; fill: currentColor; }

.back-btn {
  position: fixed;
  top: 16px; left: 16px;
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  color: rgba(255,255,255,0.45);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 7px 14px;
  border-radius: 3px;
  text-decoration: none;
  transition: background 0.2s;
  z-index: 300;
}
.back-btn:hover { background: rgba(255,255,255,0.12); color: #e8c44a; }
