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

html, body {
  height: 100%;
  font-family: 'Inter', sans-serif;
}

/* ===============================
   PAGE + HEADER
================================ */
.page {
  display: flex;
  margin-top: 70px;
}

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

.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;
  text-align: left;
  font-family: 'Inter';
  font-weight: 500;
  color: #000000;
  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;
  flex-direction: row;
  align-items: center;
  margin-left: auto;
  margin-right: 1.5rem;
}

.linkedin img,
.mail img {
  max-height: 1.3rem;
  width: auto;
  vertical-align: middle;
  margin-right: 1.5rem;
}

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

/* ===============================
   BACK ARROW (ORIGINAL LOOK)
================================ */
/* 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;
}

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

/* ===============================
   FOOTER
================================ */
.main-footer {
  position: relative;
  bottom: -1rem;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  padding-bottom: 1.3rem;
  padding-top: 2rem;
}

.main-footer-text {
  font-size: 15px;
  font-family: 'Inter';
  font-weight: 300;
  color: black;
  margin-bottom: 0.5rem;
}

/* ===============================
   SCROLLBAR
================================ */
body.main-container::-webkit-scrollbar {
  width: 8px;
}

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

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

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

/* ===============================
   GALLERY LAYOUT (3 + 4 GRID)
================================ */
.gallery-container {
  position: relative;
  margin: 20px auto;
  width: 80%;
  padding-top: 40px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
  width: 100%;
}

.gallery-item {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Row 1: 3 items */
.gallery-item:nth-child(-n+3) {
  grid-column: span 4;
}

/* Row 2: 4 items */
.gallery-item:nth-child(n+4):nth-child(-n+7) {
  grid-column: span 3;
}

.gallery-item img,
.gallery-item video {
  max-width: 100%;
  height: auto;
  transition: transform 0.3s ease;
  cursor: pointer;
  position: relative;
  z-index: 0;
}

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

/* Hover overlay (CLICK-THROUGH FIX) */
.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background-color: black;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  z-index: 1;
  pointer-events: none;
}

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

.gallery-item-title {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  text-align: center;
  font-size: 1rem;
  color: white;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
  font-family: 'Inter', sans-serif;
  pointer-events: none;
  line-height: 1.5;
}

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

/* ===============================
   SECTION TITLE (ORIGINAL LOOK)
================================ */
.section-title {
  font-size: 2rem;
  font-family: 'Inter';
  font-weight: 500;
  text-align: center;
  margin: 2rem 0;
  color: #000000;
}

/* ===============================
   FULLSCREEN GALLERY
================================ */
.fullscreen-gallery {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

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

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

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

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

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

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

/* ===============================
   RESPONSIVE
================================ */
@media (max-width: 900px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-item {
    grid-column: span 1 !important;
  }
}

@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-item {
    grid-column: span 1 !important;
  }
}

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

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