* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Syne', sans-serif;
  background: #f5f7f1;
  color: #3b4a36;
  line-height: 1.6;
}

/* Dynamic header */
.title {
  position: relative;
  text-align: center;
  padding: 80px 20px 60px;
  overflow: hidden;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.main-title {
  font-family: 'Syne', sans-serif;
  font-size: 3.5rem;
  font-weight: 800;
  color: #556b2f;
  line-height: 1.2;
  opacity: 0;
  animation: fadeInHeader 1.5s forwards;
  letter-spacing: 0;
}

.header-signature {
  width: 120px;
  position: absolute;
  top: 20px;
  right: 30px;
  opacity: 0;
  transform: rotate(-7deg);
  animation: fadeInSignature 2s 1s forwards;
}

/* Moving lines */
.line {
  width: 150px;
  height: 2px;
  background-color: #556b2f;
  animation: moveLine 2s infinite alternate;
}

.left-line { margin-right: 10px; }
.right-line { margin-left: 10px; }

/* Fade in animations */
@keyframes fadeInHeader {
  0% { opacity: 0; transform: translateY(-20px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInSignature {
  0% { opacity: 0; transform: rotate(-7deg) translateY(-20px); }
  100% { opacity: 1; transform: rotate(-7deg) translateY(0); }
}

@keyframes moveLine {
  0% { transform: translateX(0); }
  50% { transform: translateX(10px); }
  100% { transform: translateX(0); }
}

/* Subtitle typing effect */
.subtitle {
  font-family: 'Dancing Script', cursive;
  font-weight: 700;
  font-size: 1.9rem;
  opacity: 0.9;
  margin-top: 10px;
  white-space: nowrap;
  border-right: 2px solid #556b2f;
  overflow: hidden;
}
.subtitle {
  border-right: none;
}

/* Gallery */
.gallery {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 60px;
}

.row {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}

.frame {
  background: #fdfbf6;
  padding: 20px;
  max-width: var(--width, 480px);
  box-shadow:
    0 12px 35px rgba(0,0,0,0.25),
    inset 0 0 0 1px #7a845d;
  border-radius: 4px;
  flex: 1 1 calc(var(--flexBasis, 40%) - 30px);
}

.frame img {
  width: 100%;
  display: block;
}

/* Fade-in on scroll */
.frame {
  opacity: 0;
  transform: translateY(30px);
}

.frame.visible {
  opacity: 1;
  transform: translateY(0);
  transition: transform 1s ease, opacity 1s ease;
}

/* Footer small signature */
.footer-signature-container {
  text-align: center;
  margin-bottom: 30px;
}

.footer-signature {
  width: 100px;
  opacity: 0.8;
}

.quote-section {
  text-align: center;
  margin: 60px 20px 40px;
}

#dynamic-quote {
  font-family: 'Dancing Script', cursive; /* cursive like Divinely Wired */
  font-size: 2rem;
  color: #556b2f;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 2s ease forwards; /* different animation from typing */
  letter-spacing: 0.5px;
}

/* Slide up fade-in animation */
@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}
.quote-section {
  text-align: center;
  margin: 20px 20px 10px; /* top, sides, bottom */
}

.footer-signature-container {
  text-align: center;
  margin: 10px 0 20px; /* reduce top margin */
}

footer {
  text-align: center;
  padding: 20px 20px 40px; /* smaller padding */
  font-size: 0.8rem;
  opacity: 0.6;
}

/* Lightbox overlay */
.lightbox {
  display: none; /* hidden by default */
  position: fixed;
  z-index: 1000;
  padding-top: 60px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto; /* enable scrolling if needed */
  background-color: rgba(0,0,0,0.9); /* dark semi-transparent background */
}

.lightbox-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 80%;
  border: 5px solid #556b2f;
  box-shadow: 0 0 20px rgba(0,0,0,0.7);
  animation: fadeIn 0.3s;
}

.close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.2s;
}

.close:hover {
  color: #bbb;
}

/* Fade-in animation for the image */
@keyframes fadeIn {
  from {opacity: 0;}
  to {opacity: 1;}
}
.frame img:hover {
  transform: scale(1.05);
  box-shadow: 0 15px 30px rgba(0,0,0,0.3);
  transition: all 0.4s ease;
}
/* Lightbox overlay */
.lightbox {
  display: none;
  position: fixed;
  z-index: 1000;
  padding-top: 60px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.9);
  opacity: 0;
  transition: opacity 0.4s ease;
}

/* Show class triggers fade-in */
.lightbox.show {
  display: block;
  opacity: 1;
}

.lightbox-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 80%;
  border: 5px solid #556b2f;
  box-shadow: 0 0 20px rgba(0,0,0,0.7);
  transition: transform 0.3s ease;
  object-fit: contain; /* ensures proper aspect ratio */
}


