html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
}

/* Header */
.site-header {
  position: relative;
  z-index: 50;
  background-color: #ffffff;
}

/* Standard Navigation Link */
.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding-bottom: 6px;
  color: #000000;
  transition: opacity 0.25s ease;
}

.nav-link:hover {
  opacity: 0.6;
}

.nav-link.active-nav::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 18px;
  height: 2px;
  background-color: #000000;
  border-radius: 999px;
  transform: translateX(-50%);
}

/* Photobooth CTA in Header */
.photobooth-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: #000000;
  color: #ffffff;
  padding: 12px 18px;
  border-radius: 999px;
  line-height: 1;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.25s ease, background-color 0.25s ease;
}

.photobooth-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(255, 255, 255, 0.18) 45%,
    transparent 70%
  );
  transform: translateX(-120%);
  transition: transform 0.5s ease;
  z-index: -1;
}

.photobooth-cta:hover {
  background-color: #18181b;
  transform: translateY(-2px);
}

.photobooth-cta:hover::before {
  transform: translateX(120%);
}

.photobooth-cta i {
  font-size: 11px;
}

.active-photobooth-cta {
  box-shadow: 0 0 0 2px #000000, 0 0 0 5px #ffffff;
}

/* Active state inside mobile menu */
.mobile-menu a.active-mobile-nav {
  font-weight: 700;
  color: #000000;
}

.mobile-menu a.active-mobile-nav::before {
  content: "• ";
}

/* Mobile Photobooth CTA */
.mobile-photobooth-cta {
  margin-top: 12px;
  text-align: center;
  background-color: #000000;
  color: #ffffff !important;
  border-radius: 999px;
  padding: 15px 18px !important;
  border-bottom: none !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700 !important;
  letter-spacing: 0.02em;
}

.mobile-photobooth-cta:hover {
  opacity: 1 !important;
  background-color: #18181b;
}

.active-mobile-photobooth {
  box-shadow: inset 0 0 0 2px #ffffff;
}

/* Active Navigation State */
.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding-bottom: 6px;
  transition: opacity 0.25s ease;
}

.nav-link:hover {
  opacity: 0.6;
}

.nav-link.active-nav::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 18px;
  height: 2px;
  background-color: #000000;
  border-radius: 999px;
  transform: translateX(-50%);
}

.nav-link.active-nav {
  opacity: 1;
}

/* Active state inside mobile menu */
.mobile-menu a.active-mobile-nav {
  font-weight: 700;
  color: #000000;
}

.mobile-menu a.active-mobile-nav::before {
  content: "• ";
}

/* Burger Button */
.hamburger-button {
  width: 38px;
  height: 38px;
  border: 1px solid #e5e5e5;
  border-radius: 999px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background-color: #ffffff;
  cursor: pointer;
  transition: all 0.25s ease;
}

.hamburger-button:hover {
  background-color: #f4f4f5;
}

/* Burger Lines */
.hamburger-line {
  width: 16px;
  height: 1.5px;
  background-color: #000000;
  border-radius: 999px;
  transition: all 0.3s ease;
}

/* Burger animation kapag open */
.hamburger-button.open .hamburger-line:nth-child(1) {
  transform: translateY(5.5px) rotate(45deg);
}

.hamburger-button.open .hamburger-line:nth-child(2) {
  opacity: 0;
}

.hamburger-button.open .hamburger-line:nth-child(3) {
  transform: translateY(-5.5px) rotate(-45deg);
}

/* Mobile Menu */
.mobile-menu {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  padding: 0 24px;
  background-color: #ffffff;
  border-top: 1px solid transparent;
  transition: max-height 0.35s ease, opacity 0.25s ease, padding 0.3s ease, border-color 0.3s ease;
}

.mobile-menu.open {
  max-height: 240px;
  opacity: 1;
  padding: 12px 24px 24px;
  border-top-color: #eeeeee;
}

.mobile-menu a {
  display: block;
  padding: 14px 0;
  font-size: 12px;
  font-weight: 500;
  color: #000000;
  border-bottom: 1px solid #f1f1f1;
  transition: opacity 0.25s ease;
}

.mobile-menu a:hover {
  opacity: 0.6;
}

.mobile-menu a:last-child {
  border-bottom: none;
}

/* Mobile Hire Me Button */
.mobile-hire-button {
  margin-top: 10px;
  text-align: center;
  background-color: #000000;
  color: #ffffff !important;
  border-radius: 8px;
  padding: 14px 0 !important;
  border-bottom: none !important;
}

.mobile-hire-button:hover {
  opacity: 1 !important;
  background-color: #27272a;
}

/* Hide tablet/mobile menu on desktop */
@media (min-width: 1024px) {
  .mobile-menu {
    display: none !important;
  }
}

/* Portfolio Grid */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 260px;
  gap: 8px;
}

/* Image Card */
.portfolio-card {
  position: relative;
  overflow: hidden;
  background-color: #d9d9d9;
}

.portfolio-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.portfolio-card:hover img {
  transform: scale(1.08);
}

/* Placeholder kapag wala pang image */
.portfolio-placeholder {
  width: 100%;
  height: 100%;
  background-color: #d9d9d9;
}

/* Masonry Layout Sizes */
.tile-1 {
  grid-row: span 2;
}

.tile-2 {
  grid-row: span 2;
}

.tile-3 {
  grid-column: span 2;
  grid-row: span 1;
}

.tile-4 {
  grid-column: span 2;
  grid-row: span 2;
}

.tile-5 {
  grid-row: span 1;
}

.tile-6 {
  grid-row: span 1;
}

.tile-7 {
  grid-row: span 1;
}

.tile-8 {
  grid-row: span 1;
}

.tile-9 {
  grid-column: span 2;
  grid-row: span 1;
}

.tile-10 {
  grid-row: span 2;
}

.tile-11 {
  grid-row: span 2;
}

.tile-12 {
  grid-column: span 2;
  grid-row: span 2;
}

/* Fade Transition */
.portfolio-fade {
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.portfolio-hidden {
  opacity: 0;
  transform: translateY(10px);
}

/* Pagination */
.portfolio-page-button {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}

.portfolio-page-button.active {
  background-color: #000000;
  color: #ffffff;
}

.portfolio-page-button.inactive {
  background-color: #e5e5e5;
  color: #71717a;
}

.portfolio-page-button.inactive:hover {
  background-color: #d4d4d8;
}

.portfolio-arrow {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}

.portfolio-arrow:hover {
  background-color: #e5e5e5;
}

/* Tablet Layout */
@media (min-width: 768px) and (max-width: 1023px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 230px;
    gap: 8px;
  }

  .tile-1 {
    grid-column: span 1;
    grid-row: span 2;
  }

  .tile-2 {
    grid-column: span 1;
    grid-row: span 2;
  }

  .tile-3 {
    grid-column: span 2;
    grid-row: span 1;
  }

  .tile-4 {
    grid-column: span 2;
    grid-row: span 2;
  }

  .tile-5,
  .tile-6,
  .tile-7,
  .tile-8 {
    grid-column: span 1;
    grid-row: span 1;
  }

  .tile-9 {
    grid-column: span 2;
    grid-row: span 1;
  }

  .tile-10,
  .tile-11 {
    grid-column: span 1;
    grid-row: span 2;
  }

  .tile-12 {
    grid-column: span 2;
    grid-row: span 2;
  }
}

/* Mobile Layout */
@media (max-width: 767px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 160px;
    gap: 6px;
  }

  .tile-1,
  .tile-2 {
    grid-column: span 1;
    grid-row: span 2;
  }

  .tile-3,
  .tile-4,
  .tile-9,
  .tile-12 {
    grid-column: span 2;
  }

  .tile-4,
  .tile-12 {
    grid-row: span 2;
  }

  .tile-5,
  .tile-6,
  .tile-7,
  .tile-8 {
    grid-column: span 1;
    grid-row: span 1;
  }

  .tile-10,
  .tile-11 {
    grid-column: span 1;
    grid-row: span 2;
  }
}

/* Make portfolio cards clickable */
.portfolio-card {
  border: 0;
  padding: 0;
  cursor: pointer;
  display: block;
  width: 100%;
  height: 100%;
}

.portfolio-card.is-placeholder {
  cursor: default;
}

/* Prevent background scroll kapag open ang lightbox */
body.no-scroll {
  overflow: hidden;
}

/* Lightbox */
.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 999;
  background-color: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.image-lightbox.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.lightbox-content {
  max-width: 92vw;
  max-height: 88vh;
  text-align: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 82vh;
  object-fit: contain;
  display: block;
}

#lightboxCaption {
  margin-top: 14px;
  font-size: 12px;
  color: #ffffff;
  opacity: 0.75;
}

/* Close Button */
.lightbox-close {
  position: absolute;
  top: 24px;
  right: 28px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background-color: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.25s ease;
}

.lightbox-close:hover {
  background-color: rgba(255, 255, 255, 0.18);
}

/* Previous and Next Buttons */
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background-color: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 20px;
  cursor: pointer;
  transition: background-color 0.25s ease;
}

.lightbox-nav:hover {
  background-color: rgba(255, 255, 255, 0.18);
}

.lightbox-prev {
  left: 28px;
}

.lightbox-next {
  right: 28px;
}

/* Mobile Lightbox */
@media (max-width: 767px) {
  .image-lightbox {
    padding: 18px;
  }

  .lightbox-content img {
    max-height: 76vh;
  }

  .lightbox-close {
    top: 16px;
    right: 16px;
    width: 38px;
    height: 38px;
    font-size: 24px;
  }

  .lightbox-nav {
    width: 38px;
    height: 38px;
    top: auto;
    bottom: 22px;
    transform: none;
  }

  .lightbox-prev {
    left: 24px;
  }

  .lightbox-next {
    right: 24px;
  }
}

/* Footer Social Icons */
.site-footer {
  padding-top: 40px;
}

.social-icons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 24px;
}

.social-icons a {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid #d4d4d8;
  color: #000000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: all 0.25s ease;
}

.social-icons a:hover {
  background-color: #000000;
  color: #ffffff;
  border-color: #000000;
  transform: translateY(-2px);
}

.social-icons a:focus {
  outline: 2px solid #000000;
  outline-offset: 4px;
}

/* Mobile Footer */
@media (max-width: 767px) {
  .social-icons {
    gap: 10px;
    margin-top: 22px;
  }

  .social-icons a {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }
}