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

body, html {
  height: 100%;
}

.page {
  display: flex;
  margin-top: 70px;
}

#homepage {
  background-color: white;
  height: auto;
  overflow-y: auto;
}

/* ================= HEADER ================= */

.header {
  position: fixed;
  top: 0;
  background-color: #f2f2f2;
  padding: 1rem;
  width: 100%;
  height: 70px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.left-header {
  display: flex;
  align-items: center;
  font-family: 'Inter';
  font-weight: 500;
  color: #000;
  font-size: 1.3rem;
  margin-left: 1.5rem;
}

.header-box:first-child {
  margin-right: 2rem;
}

.header-box:last-child {
  margin-left: 2rem;
}

.header-box a {
  text-decoration: none;
  color: inherit;
}

.header-box a:hover {
  color: #404040;
}

.header-box:hover {
  filter: brightness(2);
  cursor: pointer;
}

.right-header {
  display: flex;
  align-items: center;
  margin-right: 1.5rem;
}

.linkedin img,
.mail img {
  max-height: 1.3rem;
  margin-right: 1.5rem;
}

.linkedin img:hover,
.mail img:hover {
  filter: brightness(2);
  cursor: pointer;
}

/* ================= BACK ARROW ================= */

.back-arrow {
  position: fixed;
  top: 50%;
  left: 20px;
  transform: translateY(-50%);
  background: #f2f2f2;
  padding: 10px 15px;
  border-radius: 5px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  z-index: 2;
  font-family: 'Inter';
}

.back-arrow a {
  text-decoration: none;
  color: black;
}

.back-arrow a:hover {
  color: #9c9c9c;
}

/* ================= MAIN FOOTER ================= */

.main-footer {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  padding: 2rem 0 1.3rem;
}

.main-footer-text {
  font-size: 15px;
  font-family: 'Inter';
  font-weight: 300;
}

/* ================= SCROLLBAR (PAGE) ================= */

body.main-container::-webkit-scrollbar {
  width: 8px;
}

body.main-container::-webkit-scrollbar-track {
  background: #fff;
}

body.main-container::-webkit-scrollbar-thumb {
  background: #000;
}

body.main-container::-webkit-scrollbar-thumb:hover {
  background: #616161;
}

/* ================= GALLERY CONTAINER ================= */

.gallery-container {
  width: 80%;
  margin: 20px auto;
  padding-top: 70px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ================= SECTION TITLES ================= */

.section-title {
  font-size: 2rem;
  font-family: 'Inter';
  font-weight: 500;
  text-align: center;
  margin: 2rem 0 1rem;
  color: #000;
}

/* ================= HORIZONTAL SCROLL SECTIONS ================= */

.gallery-grid {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  gap: 20px;
  padding-bottom: 12px;
  scroll-behavior: smooth;
}

/* Scrollbar for each section */
.gallery-grid::-webkit-scrollbar {
  height: 8px;
}

.gallery-grid::-webkit-scrollbar-track {
  background: #f2f2f2;
}

.gallery-grid::-webkit-scrollbar-thumb {
  background: #000;
}

.gallery-grid::-webkit-scrollbar-thumb:hover {
  background: #616161;
}

/* ================= GALLERY ITEMS ================= */

.gallery-item {
  flex: 0 0 auto;
  width: 300px;
  max-width: 300px;
  position: relative;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.gallery-item img,
.gallery-item video {
  width: 100%;
  height: auto;
  transition: transform 0.3s ease;
}

.gallery-item:hover img,
.gallery-item:hover video {
  transform: scale(1.05);
}

/* Overlay title (optional) */
.gallery-item-title {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  opacity: 0;
  z-index: 2;
  font-family: 'Inter';
  pointer-events: none;
}

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: black;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none; /* ✅ allow clicks to pass through */
}

.gallery-item:hover::after {
  opacity: 0.8;
}

.gallery-item:hover .gallery-item-title {
  opacity: 1;
}

/* ================= X SECTION ONLY ================= */

.gallery-grid.x-section .gallery-item {
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 420px;
}

.gallery-grid.x-section .gallery-item img,
.gallery-grid.x-section .gallery-item video {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  display: block;
}

/* ================= FULLSCREEN GALLERY ================= */

.fullscreen-gallery {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  z-index: 9999;
}

.fullscreen-gallery .image-container {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.fullscreen-gallery .close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 40px;
  color: white;
  cursor: pointer;
}

.fullscreen-gallery .prev,
.fullscreen-gallery .next {
  position: absolute;
  top: 50%;
  padding: 16px;
  color: white;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
}

.fullscreen-gallery .prev {
  left: 10px;
}

.fullscreen-gallery .next {
  right: 10px;
}

.fullscreen-item {
  max-width: 80%;
  max-height: 80%;
  display: none;
}

.fullscreen-item.show {
  display: block;
}

/* ================= RESPONSIVE ================= */

@media (max-width: 768px) {
  .gallery-item {
    width: 260px;
    max-width: 260px;
  }

  .section-title {
    font-size: 1.6rem;
  }
}

@media (max-width: 600px) {
  .left-header {
    font-size: 1rem;
  }

  .linkedin img,
  .mail img {
    max-height: 1rem;
  }
}
