/* =========================
   General reset and base
========================= */
body {
  margin: 0;
  padding: 0;
  background-color: #e9e9e9;;
  color: #000;;
  font-family: Arial, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

/* =========================
   Header
========================= */
header {
  text-align: center;
  margin: 2rem 0;
}

header h1 {
  font-weight: normal; /* remove bold */
  font-size: 2rem;     /* large title */
  margin: 0;
}

header h1 .home-link {
  color: inherit;
  text-decoration: none;
  font-weight: normal;
}

header h1 .home-link:hover {
  text-decoration: none;
}

.subnav {
  margin-top: 0.25rem;
}

.subnav a {
  font-size: 1rem;
  color: black;
  opacity: 0.8;
}

.subnav a:hover {
  opacity: 1;
  text-decoration: none;
}

/* =========================
   Gallery
========================= */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 1px; /* base row for masonry */
  row-gap: 12px;
  column-gap: 14px;
  max-width: 1200px;   /* optional: keeps gallery centered */
  margin: 0 auto;      /* centers the gallery horizontally */
  padding: 0 0.1rem;   /* adds negative space on left/right */
}

.gallery img {
  width: 100%;
  display: block;
  grid-row: span var(--span);
  user-select: none;
  -webkit-user-drag: none;
  transition: opacity 0.2s ease;
  cursor: pointer;
  border-radius: 4px;
}

.gallery img:hover {
  opacity: 0.8;  /* subtle dim on hover */
}

/* Responsive: 2 columns on tablets/mobile */
@media (max-width: 900px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 12px;
    column-gap: 14px;
    margin: 0 20px;
  }
}

@media (max-width: 500px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 12px;
    column-gap: 14px;
    margin: 0 20px;
  }

  .lightbox {
    padding: 0 !important;
  }
}

/* =========================
   Lightbox
========================= */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.lightbox.hidden {
  display: none;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
  border: 20px solid white; /* larger frame */
  box-sizing: border-box;
  opacity: 1;
  transition: opacity 0.25s ease-in-out;
}

.lightbox img.fade-out {
  opacity: 0;
}

/* =========================
   Bio page
========================= */
.bio {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.bio-content {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.bio-content img {
  max-width: 300px;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

.bio-text {
  margin-top: 0;
  line-height: 1.6;
  color: #000;
}

.bio-text p {
  margin-top: 0;
  margin-bottom: 1.5rem;
}

/* responsive: stack image above text on small screens */
@media (max-width: 700px) {
  .bio-content {
    flex-direction: column;
    align-items: center;
  }

  .bio-content img {
    max-width: 100%;
  }
}

/* =========================
   Footer
========================= */
footer {
  text-align: center;
  margin: 2rem 0;
  font-size: 0.9rem;
  color: #aaa;
}
