body {
  margin: 0;
  font-family: 'Georgia', serif;
  display: flex;
  background-color: #f9f9f9;
  color: #111;
  height: 100vh;
  overflow: hidden;
}
.sidebar {
  font-family: 'Merriweather', Georgia, 'Times New Roman', Times, serif;
  background: #ffffff;
  border-right: 1.5px solid #e0dedb;
  min-height: 100vh;
  padding: 2.5rem 2rem 2rem 2rem;
  box-sizing: border-box;
  width: 270px;
  /* position: fixed; */
  top: 0;
  left: 0;
}
.sidebar h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2.1rem;
  font-weight: 700;
  margin: 0 0 2rem 0;
  letter-spacing: 1px;
  color: #000000;
  border-bottom: 1px solid #e0dedb;
  padding-bottom: 0.7rem;
}
.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sidebar li {
  margin-bottom: 1.2rem;
}
.sidebar a {
  color: #000000;
  text-decoration: none;
  
  letter-spacing: 0.5px;
  transition: color 0.2s, border-bottom 0.2s;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}

.sidebar a:not(.sidebar-title) {
  font-size: 1.08rem;
}

.sidebar a:hover {
  color: #a67c52;
  border-bottom: 1px solid #a67c52;
}

main {
  padding: 2rem;
  flex: 1;
  max-width: calc(100vw - 200px);
  height: 100vh;
  overflow-y: auto;
  position: relative; /* Ensure overlay is relative to main content */
}
h2 {
  font-weight: normal;
  font-size: 2rem;
  margin-bottom: 1rem;
}
p {
  font-size: 1rem;
  line-height: 1.6;
}
.glide__slide img {
  max-height: 80vh;
  max-width: 100%;
  object-fit: contain;
  display: block;
  margin: 0 auto 0.5rem;
  border-radius: 4px;
}
.glide__slide p {
  font-style: italic;
  color: #555;
  font-size: 0.9rem;
  margin: 0;
  text-align: center;
}
.gallery-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  /* height: 70vh;*/              /* Constant grid height */
  overflow-y: auto;
  margin: 0 auto;
  padding: 0;
  display: block;
  position: relative;
  opacity: 0;
  transition: opacity 0.4s;
}

/* When loaded, add this class: */
.gallery-grid.loaded {
  opacity: 1;
}

.gallery-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.gallery-row img {
  display: block;
  height: 220px;             /* This will be set by JS for each row */
  width: auto;
  object-fit: cover;
  border-radius: 6px;
  background: #e0e0e0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  cursor: pointer;
  transition: box-shadow 0.15s;
}

.gallery-row img:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
}

.gallery-item {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.15s;
  text-align: center;
}

.gallery-item:hover {
  transform: scale(1.03);
}

.gallery-item img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.gallery-item p {
  margin: 0.5rem 0;
  font-size: 0.95rem;
  color: #444;
}

.expanded-view {
  display: none;
  position: fixed; /* <-- Change from absolute to fixed */
  top: 0;   /* Cover from top of main */
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255,255,255,0.96);
  justify-content: center;
  align-items: center;
  flex-direction: row;
  z-index: 1000; /* Increase z-index to ensure it's above everything */
  border-radius: 12px;
  box-shadow: 0 2px 24px rgba(0,0,0,0.10);
}

.expanded-view.active {
  display: flex;
}

.expanded-img-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 95vw;
  max-height: 85vh;
  margin: 0 2rem;
}

.expanded-img-container img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 10px;
  background: #222;
}

.expanded-img-container p {
  color: #222;
  font-size: 1.1rem;
  text-align: center;
  margin: 0.5rem 0 0 0;
}

.arrow {
  background: none;
  border: none;
  font-size: 2.5rem;
  color: #333;
  cursor: pointer;
  padding: 0 1rem;
  user-select: none;
  transition: color 0.2s;
  align-self: center;
}
.arrow:hover {
  color: #000;
}

.close-btn {
  position: absolute;
  top: 1rem;
  right: 2rem;
  background: none;
  border: none;
  font-size: 2rem;
  color: #888;
  cursor: pointer;
  z-index: 11;
}
.close-btn:hover {
  color: #000;
}

/* Hide sidebar and adjust main on small screens */
@media (max-width: 700px) {
  body {
    display: contents;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 80vw;
    max-width: 320px;
    height: 100vh;
    background: #fff;
    z-index: 200;
    box-shadow: 2px 0 16px rgba(0,0,0,0.08);
    transform: translateX(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s cubic-bezier(.4,0,.2,1), opacity 0.3s cubic-bezier(.4,0,.2,1);
  }
  .sidebar.open {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
  }
  main {
    max-width: 100vw;
    padding: 1rem;
  }
  #sidebar-overlay {
    display: block;
    position: fixed;
    z-index: 150;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.15);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(.4,0,.2,1);
  }
  #sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
  }
}

/* Optional: Make gallery images a bit smaller on mobile */
@media (max-width: 700px) {
  .gallery-row img {
    height: 120px;
  }
  .arrow {
    font-size: 1.5rem;
    padding: 0 0.5rem;
  }
}

.sidebar-toggle {
  display: none;
  position: fixed;
  top: 1.8rem;
  left: 1rem;
  z-index: 100;
  background: #fff;
  background-color: #f0f0f0;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  color: #3a2c1a;
  padding: 0.1em;
  cursor: pointer;
  /* box-shadow: 0 2px 8px rgba(0,0,0,0.04); */
}
@media (max-width: 700px) {
  .sidebar-toggle {
    display: block;
  }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 80vw;
    max-width: 320px;
    height: 100vh;
    background: #fff;
    z-index: 200;
    box-shadow: 2px 0 16px rgba(0,0,0,0.08);
    transform: translateX(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s cubic-bezier(.4,0,.2,1), opacity 0.3s cubic-bezier(.4,0,.2,1);
  }
  .sidebar.open {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
  }
  /* Optional: dark overlay when sidebar is open */
  #sidebar-overlay {
    display: block;
    position: fixed;
    z-index: 150;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.15);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(.4,0,.2,1);
  }
  #sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
  }
}

/* Hide mobile header on desktop, show on mobile */
.mobile-header {
  display: none;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2.1rem;
  font-weight: 700;
  margin-bottom: 0;
  letter-spacing: 1px;
  color: #000000;
  text-align: center;
  /* background: #fff; */
  padding: 1rem 0 0.5rem 0;
  border-bottom: 1px solid #e0dedb;
  /* position: fixed; */
  z-index: 1;
  /* background: white; */
  margin-top: 0px;
  top: 0;
  width: 100%;
}

.mobile-header a {
  text-decoration: none;
  color: black;
}

@media (max-width: 700px) {
  .mobile-header {
    display: block;
  }
  .sidebar h1 {
    display: none;
  }
}

.sidebar-bottom {
  margin-top: 3rem;
  text-align: center;
}
.sidebar-bottom a {
  font-family: 'Merriweather', Georgia, serif;
  font-size: 1.05rem;
  color: #4b3b23;
  text-decoration: none;
  border-bottom: 1px solid #e0dedb;
  transition: color 0.2s;
}
.sidebar-bottom a:hover {
  color: #a67c52;
}
.about-profile {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2rem;
  margin: 3rem auto 0 auto;
  max-width: 900px;
  background: #fff;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.04);
}

.about-profile > div {
  flex: 1 1 250px;
  min-width: 250px;
}

.about-avatar {
  width: 500px;
  height: 500px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e0dedb;
  flex-shrink: 0;
  margin: 0 auto;
}

.about-profile br {
  line-height: 2.5;      /* Increases vertical space */
  content: "";
  display: block;
  margin-bottom: 1em;    /* Or adjust as needed */
}

.about-profile a {
font-family: 'Merriweather', Georgia, serif;
  font-size: 1.05rem;
  color: #4b3b23;
  text-decoration: none;
  border-bottom: 1px solid #e0dedb;
  transition: color 0.2s;
}

.br-big {
  display: block;
  height: 2em;   /* Adjust as needed */
  content: "";
}

@media (max-width: 700px) {
  .about-profile {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
  }
  .about-avatar {
    width: 90px;
    height: 90px;
  }
}
