body {
  margin: 0;
  padding: 0;
  overflow: auto;
  background-color: #fff;
  font-family: Times, serif;
  cursor: default;
}

/* Canvas area for images */
#gallery {
  position: relative;
  width: 200vw;
  height: 200vh;
  overflow: hidden; /* prevents weird Safari boundary issues */
  background-color: #fff;
}

/* Images */
.gallery-image {
  position: absolute;
  border-radius: 0;
  cursor: grab;
  transition: transform 0.1s ease;
  user-select: none;

  max-width: 35vw;
  max-height: 35vh;
  min-width: 120px;
  min-height: 120px;
  object-fit: contain;
}

.gallery-image:active {
  cursor: grabbing;
  transform: scale(1.02);
}

/* Header + nav */
.top-header {
  position: fixed;
  top: 20px;
  left: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1000;
  transform: none;
  align-items: flex-start;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Default nav links */
a {
  text-decoration: none;
  color: blue;
  font-size: 16px;
}

/* Active link = black */
a.active,
.logo.active {
  color: black !important;
}

.logo {
  font-size: 16px;
}

/* ABOUT PAGE */
.about-container {
  padding-top: 0px;
}

.about-text {
  color: black;
  margin-top: 20px;
  margin-left: 140px;
  margin-right: 20px;
  max-width: 600px;
  font-size: 16px;
  line-height: 1.6;
}

.section-title {
  color: grey;
  font-weight: normal;
  margin-top: 20px;
  cursor: pointer;
}

/* PORTFOLIO PAGE */
.portfolio-container {
  margin-top: 140px;
  margin-left: 140px;
  max-width: 600px;
  font-size: 16px;
  line-height: 1.4;
}

/* ---- IMAGE MODAL ---- */
#imageModal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: transparent;
  z-index: 2000;
}

#imageModal[hidden] {
  display: none;
}

#modalImage {
  max-width: 80vw;
  max-height: 80vh;
  object-fit: contain;
  cursor: default;
}

#modalCaption {
  color: black;
  font-size: 14px;
  margin-top: 10px;
  text-align: center;
}

#closeModal {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 24px;
  color: black;
  cursor: pointer;
  opacity: 0.4;
  transition: opacity 0.2s ease;
}

#closeModal:hover {
  opacity: 1;
}

.gallery-image {
  will-change: transform, top, left;
}
