/* ==========================================================================
   Farid Al Portfolio - Core Stylesheet
   ========================================================================== */

:root {
  --font-logo: 'Mrs Saint Delafield', cursive;
  --font-header: 'Mozilla Headline', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-footer: 'Rethink Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --color-white: #ffffff;
  --color-white-90: rgba(255, 255, 255, 0.92);
  --color-white-75: rgba(255, 255, 255, 0.75);
  --color-white-50: rgba(255, 255, 255, 0.5);
  --color-white-20: rgba(255, 255, 255, 0.2);
  --color-dark: #121316;

  --transition-smooth: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html, body {
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-behavior: smooth;
  background-color: #0b0c0e;
  color: var(--color-white);
  font-family: var(--font-header);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-smooth);
}

button {
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  outline: none;
}

/* ==========================================================================
   Background Slideshow
   ========================================================================== */
.slideshow-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: 1;
  overflow: hidden;
  background-color: #000;
}

.slide {
  position: absolute;
  inset: -20px;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.0);
  transition: opacity 1.5s cubic-bezier(0.4, 0, 0.2, 1),
              transform 7.5s cubic-bezier(0.2, 0.8, 0.3, 1),
              visibility 1.5s;
  will-change: opacity, transform;
}

.slide.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1.05);
}

/* Cinematic Vignette Overlay */
.overlay-vignette {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(12, 14, 18, 0.52) 0%,
    rgba(12, 14, 18, 0.12) 18%,
    rgba(12, 14, 18, 0.05) 50%,
    rgba(12, 14, 18, 0.2) 78%,
    rgba(12, 14, 18, 0.68) 100%
  );
}

/* ==========================================================================
   Main Viewport UI Container
   ========================================================================== */
.hero-container {
  position: relative;
  z-index: 10;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.85rem 3rem;
}

/* Top Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  position: relative;
  min-height: 40px;
}

.nav-left {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  z-index: 2;
}

.menu-btn {
  font-family: var(--font-header);
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--color-white-90);
  letter-spacing: 0.02em;
  position: relative;
  padding: 0.2rem 0;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  transition: var(--transition-smooth);
}

.menu-btn::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 1px;
  background: var(--color-white);
  transition: width 0.3s ease;
}

.menu-btn:hover {
  color: var(--color-white);
  letter-spacing: 0.04em;
}

.menu-btn:hover::after {
  width: 100%;
}

.nav-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  pointer-events: none;
  z-index: 1;
}

.brand-logo {
  pointer-events: auto;
  font-family: var(--font-logo);
  font-size: 2.5rem;
  font-weight: 400;
  color: var(--color-white);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  line-height: 1;
  letter-spacing: 0.02em;
  transform: translateY(-1px);
  display: inline-block;
  white-space: nowrap;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.brand-logo:hover {
  opacity: 0.9;
  transform: translateY(-2px) scale(1.03);
}

.nav-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.85rem;
  z-index: 2;
}

.nav-link {
  font-family: var(--font-header);
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--color-white-90);
  letter-spacing: 0.02em;
  position: relative;
  padding: 0.2rem 0;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  transition: var(--transition-smooth);
  white-space: nowrap;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 1px;
  background: var(--color-white);
  transition: width 0.3s ease;
}

.nav-link:hover {
  color: var(--color-white);
}

.nav-link:hover::after {
  width: 100%;
}

/* Center Subtle Navigation Arrows (Hidden by default to match sketch) */
.slide-nav-arrows {
  display: none;
}

/* ==========================================================================
   Footer Bar
   ========================================================================== */
.footer-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: flex-end;
  width: 100%;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.contact-line {
  font-family: var(--font-footer);
  font-size: 0.86rem;
  font-weight: 400;
  color: var(--color-white-90);
  letter-spacing: 0.01em;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
  display: inline-block;
  width: fit-content;
  transition: var(--transition-smooth);
}

.contact-line:hover {
  color: var(--color-white);
  transform: translateX(2px);
}

.footer-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0.5rem 1rem;
  transition: opacity 0.3s ease;
}

.footer-center:hover {
  opacity: 0.85;
}

.scroll-text {
  font-family: var(--font-footer);
  font-size: 0.88rem;
  font-weight: 400;
  color: var(--color-white-90);
  letter-spacing: 0.04em;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
  margin-bottom: 0.75rem;
}

.scroll-line-container {
  width: 1px;
  height: 32px;
  background: rgba(255, 255, 255, 0.35);
  position: relative;
  overflow: hidden;
}

.scroll-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 50%;
  background: var(--color-white);
  animation: scrollDown 2.2s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

@keyframes scrollDown {
  0% {
    transform: translateY(-100%);
    opacity: 0;
  }
  30% {
    opacity: 1;
  }
  80% {
    opacity: 1;
  }
  100% {
    transform: translateY(200%);
    opacity: 0;
  }
}

.footer-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2.2rem;
}

.social-link {
  font-family: var(--font-footer);
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--color-white-90);
  letter-spacing: 0.02em;
  position: relative;
  padding: 0.25rem 0;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
  transition: var(--transition-smooth);
}

.social-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 1px;
  background: var(--color-white);
  transition: width 0.3s ease;
}

.social-link:hover {
  color: var(--color-white);
}

.social-link:hover::after {
  width: 100%;
}

/* Slide pagination kept invisible to match clean sketch */
.slide-pagination {
  display: none;
}

.page-bullet {
  width: 20px;
  height: 2px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 1px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.page-bullet:hover {
  background: rgba(255, 255, 255, 0.6);
}

.page-bullet.active {
  background: var(--color-white);
  width: 32px;
}

/* ==========================================================================
   Offcanvas Navigation Drawer Modal
   ========================================================================== */
.menu-drawer {
  position: fixed;
  inset: 0;
  z-index: 100;
  visibility: hidden;
  opacity: 0;
  transition: visibility 0.4s ease, opacity 0.4s ease;
}

.menu-drawer.open {
  visibility: visible;
  opacity: 1;
}

.menu-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 11, 14, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.menu-panel {
  position: absolute;
  top: 0;
  left: 0;
  width: 380px;
  max-width: 85vw;
  height: 100%;
  background: rgba(18, 20, 24, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 15px 0 35px rgba(0, 0, 0, 0.5);
  padding: 3rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transform: translateX(-100%);
  transition: transform 0.45s cubic-bezier(0.25, 1, 0.5, 1);
}

.menu-drawer.open .menu-panel {
  transform: translateX(0);
}

.menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.menu-brand {
  font-family: var(--font-logo);
  font-size: 3.2rem;
  color: var(--color-white);
}

.menu-close-btn {
  font-size: 2.2rem;
  line-height: 1;
  color: var(--color-white-75);
  transition: color 0.2s ease, transform 0.2s ease;
}

.menu-close-btn:hover {
  color: var(--color-white);
  transform: rotate(90deg);
}

.menu-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin: 2rem 0;
}

.drawer-link {
  font-family: var(--font-header);
  font-size: 1.6rem;
  color: var(--color-white-75);
  transition: var(--transition-smooth);
  display: inline-block;
}

.drawer-link:hover,
.drawer-link.active {
  color: var(--color-white);
  transform: translateX(8px);
}

.menu-footer {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
}

.menu-footer-label {
  font-family: var(--font-footer);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-white-50);
  margin-bottom: 0.25rem;
}

.menu-contact-line {
  font-family: var(--font-footer);
  font-size: 0.85rem;
  color: var(--color-white-75);
  transition: color 0.2s ease;
}

.menu-contact-line:hover {
  color: var(--color-white);
}

.menu-socials {
  display: flex;
  gap: 1.25rem;
  margin-top: 0.8rem;
}

.menu-socials a {
  font-family: var(--font-footer);
  font-size: 1rem;
  color: var(--color-white-75);
}

.menu-socials a:hover {
  color: var(--color-white);
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 900px) {
  .hero-container {
    padding: 2rem 1.75rem;
  }

  .brand-logo {
    font-size: 2.6rem;
  }

  .nav-right {
    gap: 1.5rem;
  }

  .nav-link {
    font-size: 1.1rem;
  }

  .footer-right {
    gap: 1.5rem;
  }
}

@media (max-width: 680px) {
  .hero-container {
    padding: 1.5rem 1.25rem;
  }

  .nav-right {
    display: none;
  }

  .navbar {
    display: flex;
    justify-content: space-between;
  }

  .footer-bar {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    align-items: center;
    text-align: center;
  }

  .footer-left {
    align-items: center;
    order: 2;
  }

  .footer-center {
    order: 1;
  }

  .footer-right {
    justify-content: center;
    order: 3;
    gap: 2rem;
  }

  .slide-nav-arrows {
    display: none;
  }
}

/* ==========================================================================
   Portfolio Section (Masonry Grid matching Sketch 1)
   ========================================================================== */
.portfolio-section {
  position: relative;
  z-index: 20;
  background-color: #ffffff;
  color: #121316;
  padding: 5rem 3.5rem 8rem;
  min-height: 100vh;
}

.portfolio-container {
  max-width: 1540px;
  margin: 0 auto;
  width: 100%;
}

.portfolio-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.75rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  padding-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 16px;
}

.portfolio-controls {
  display: flex;
  align-items: center;
  gap: 24px;
}

.portfolio-title {
  font-family: var(--font-header);
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #111215;
  text-transform: uppercase;
}

.portfolio-tag {
  font-family: var(--font-header);
  font-size: 0.95rem;
  font-weight: 400;
  color: #64676e;
  letter-spacing: 0.02em;
}

/* ==========================================================================
   Liquid Glass Switcher (Reference: CodePen @fooontic/pen/KwpRaGr)
   ========================================================================== */
.switcher {
  --c-glass: #bbbbbc;
  --c-light: #ffffff;
  --c-dark: #000000;
  --c-content: #585860;
  --c-action: #111215;
  --glass-reflex-dark: 1;
  --glass-reflex-light: 1;
  --saturation: 150%;

  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0;
  width: 156px;
  height: 38px;
  box-sizing: border-box;
  padding: 4px;
  margin: 0;
  border: none;
  border-radius: 99em;
  background-color: color-mix(in srgb, var(--c-glass) 14%, transparent);
  backdrop-filter: blur(8px) url(#switcher) saturate(var(--saturation));
  -webkit-backdrop-filter: blur(8px) saturate(var(--saturation));
  box-shadow: 
    inset 0 0 0 1px color-mix(in srgb, var(--c-light) calc(var(--glass-reflex-light) * 10%), transparent),
    inset 1.8px 3px 0px -2px color-mix(in srgb, var(--c-light) calc(var(--glass-reflex-light) * 90%), transparent), 
    inset -2px -2px 0px -2px color-mix(in srgb, var(--c-light) calc(var(--glass-reflex-light) * 80%), transparent), 
    inset -3px -8px 1px -6px color-mix(in srgb, var(--c-light) calc(var(--glass-reflex-light) * 60%), transparent), 
    inset -0.3px -1px 4px 0px color-mix(in srgb, var(--c-dark) calc(var(--glass-reflex-dark) * 12%), transparent), 
    inset -1.5px 2.5px 0px -2px color-mix(in srgb, var(--c-dark) calc(var(--glass-reflex-dark) * 20%), transparent), 
    inset 0px 3px 4px -2px color-mix(in srgb, var(--c-dark) calc(var(--glass-reflex-dark) * 20%), transparent), 
    inset 2px -6.5px 1px -4px color-mix(in srgb, var(--c-dark) calc(var(--glass-reflex-dark) * 10%), transparent), 
    0px 1px 5px 0px color-mix(in srgb, var(--c-dark) calc(var(--glass-reflex-dark) * 10%), transparent), 
    0px 6px 16px 0px color-mix(in srgb, var(--c-dark) calc(var(--glass-reflex-dark) * 8%), transparent);
  transition: 
    background-color 400ms cubic-bezier(1, 0.0, 0.4, 1),
    box-shadow 400ms cubic-bezier(1, 0.0, 0.4, 1);
  user-select: none;
}

.switcher__legend {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  border: 0;
  padding: 0;
  white-space: nowrap;
  clip-path: inset(100%);
  clip: rect(0 0 0 0);
  overflow: hidden;
}

.switcher__input {
  clip: rect(0 0 0 0);
  clip-path: inset(100%);
  height: 1px;
  width: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
}

.switcher__filter {
  position: absolute;
  width: 0;
  height: 0;
  z-index: -1;
  pointer-events: none;
}

.switcher__option {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 74px;
  height: 100%;
  box-sizing: border-box;
  border-radius: 99em;
  cursor: pointer;
  transition: all 160ms ease;
}

.switcher__text {
  font-family: var(--font-footer), -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--c-content);
  transition: color 200ms ease, transform 200ms ease;
}

.switcher__option:hover .switcher__text {
  color: #111215;
}

.switcher__option:has(input:checked) .switcher__text {
  color: #111215;
  font-weight: 700;
}

/* The liquid glass toggle capsule */
.switcher::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 4px;
  display: block;
  width: 74px;
  height: calc(100% - 8px);
  border-radius: 99em;
  background-color: color-mix(in srgb, var(--c-glass) 36%, transparent);
  z-index: 0;
  box-shadow: 
    inset 0 0 0 1px color-mix(in srgb, var(--c-light) calc(var(--glass-reflex-light) * 10%), transparent),
    inset 2px 1px 0px -1px color-mix(in srgb, var(--c-light) calc(var(--glass-reflex-light) * 90%), transparent), 
    inset -1.5px -1px 0px -1px color-mix(in srgb, var(--c-light) calc(var(--glass-reflex-light) * 80%), transparent), 
    inset -2px -6px 1px -5px color-mix(in srgb, var(--c-light) calc(var(--glass-reflex-light) * 60%), transparent), 
    inset -1px 2px 3px -1px color-mix(in srgb, var(--c-dark) calc(var(--glass-reflex-dark) * 20%), transparent), 
    inset 0px -4px 1px -2px color-mix(in srgb, var(--c-dark) calc(var(--glass-reflex-dark) * 10%), transparent), 
    0px 3px 6px 0px color-mix(in srgb, var(--c-dark) calc(var(--glass-reflex-dark) * 8%), transparent);
  pointer-events: none;
}

.switcher:has(input[c-option="1"]:checked)::after {
  translate: 0 0;
  transform-origin: right;
  transition: 
    background-color 400ms cubic-bezier(1, 0.0, 0.4, 1),
    box-shadow 400ms cubic-bezier(1, 0.0, 0.4, 1),
    translate 400ms cubic-bezier(1, 0.0, 0.4, 1);
  animation: scaleToggle 440ms ease; 
}

.switcher:has(input[c-option="2"]:checked)::after {
  translate: 74px 0;
  transform-origin: left;
  transition: 
    background-color 400ms cubic-bezier(1, 0.0, 0.4, 1),
    box-shadow 400ms cubic-bezier(1, 0.0, 0.4, 1),
    translate 400ms cubic-bezier(1, 0.0, 0.4, 1);
  animation: scaleToggle2 440ms ease; 
}

.switcher[c-previous="1"]:has(input[c-option="2"]:checked)::after {
  transform-origin: left;
}

.switcher[c-previous="2"]:has(input[c-option="1"]:checked)::after {
  transform-origin: right;
}

@keyframes scaleToggle {
  0% { scale: 1 1; }
  50% { scale: 1.15 1; }
  100% { scale: 1 1; }
}

@keyframes scaleToggle2 {
  0% { scale: 1 1; }
  50% { scale: 1.15 1; }
  100% { scale: 1 1; }
}

.masonry-columns {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  width: 100%;
}

.masonry-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.portfolio-grid {
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.portfolio-grid.is-hidden {
  display: none !important;
  opacity: 0;
}

.portfolio-grid.fade-out {
  opacity: 0;
  transform: translateY(8px);
}

.portfolio-grid.fade-in {
  opacity: 1;
  transform: translateY(0);
}

.masonry-item {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  background-color: #f1f2f4;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.masonry-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.12);
}

.masonry-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.masonry-item:hover img {
  transform: scale(1.025);
}

/* Video Masonry Card Styles */
.video-item {
  background-color: #0b0c0e;
}

.video-preview-box {
  position: relative;
  width: 100%;
  overflow: hidden;
  display: block;
}

.masonry-video {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.video-item:hover .masonry-video {
  transform: scale(1.025);
}

.video-overlay-badge {
  position: absolute;
  bottom: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25), inset 0 1px 2px rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), background-color 0.3s ease;
}

.video-item:hover .video-overlay-badge {
  transform: scale(1.12);
  background: rgba(255, 255, 255, 0.45);
}

/* ==========================================================================
   Glassmorphic Lightbox Modal (matching Sketch 2)
   ========================================================================== */
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.lightbox-modal.active {
  opacity: 1;
  visibility: visible;
}

/* Heavy frosted glass background over the masonry grid */
.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.48);
  backdrop-filter: blur(36px) saturate(190%);
  -webkit-backdrop-filter: blur(36px) saturate(190%);
  cursor: pointer;
}

.lightbox-content-wrapper {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  max-width: 86vw;
  max-height: 88vh;
}

.lightbox-card {
  position: relative;
  /* Proportional concentric corner following the button (outer r = inner r 19px + padding 16px = 35px) */
  border-radius: 35px;
  overflow: hidden;
  background: #111215;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.28), 0 12px 28px rgba(0, 0, 0, 0.16);
  transform: scale(0.96);
  transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lightbox-modal.active .lightbox-card {
  transform: scale(1.0);
}

/* Apple Liquid Glass Button (Max Rovensky liquid-glass-react implementation) */
.lightbox-back-btn {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 18px 0 14px;
  box-sizing: border-box;
  border-radius: 9999px;
  cursor: pointer;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: 
    0 10px 30px rgba(0, 0, 0, 0.22),
    inset 0 1.5px 2px rgba(255, 255, 255, 0.85),
    inset 0 -1.5px 2px rgba(255, 255, 255, 0.3),
    inset 2px 0 3px rgba(255, 255, 255, 0.45),
    inset -2px 0 3px rgba(255, 255, 255, 0.45);
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.2s ease, border-color 0.2s ease;
  user-select: none;
}

.lightbox-back-btn .glass__warp,
.lightbox-zoom-bar .glass__warp {
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  filter: url(#liquid-glass-filter);
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.34) 0%, rgba(255, 255, 255, 0.12) 100%);
  pointer-events: none;
}

.lightbox-back-btn .glass__content {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #ffffff;
  font-family: var(--font-footer), -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  font-size: 0.96rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.lightbox-back-btn:hover {
  border-color: rgba(255, 255, 255, 0.85);
  box-shadow: 
    0 14px 40px rgba(0, 0, 0, 0.28),
    inset 0 2px 3px rgba(255, 255, 255, 0.95),
    inset 0 -1.5px 2px rgba(255, 255, 255, 0.45),
    inset 2px 0 3px rgba(255, 255, 255, 0.6),
    inset -2px 0 3px rgba(255, 255, 255, 0.6);
}

.lightbox-back-btn:active {
  transform: scale(0.96) !important;
}

/* Viewport for zoomable image */
.lightbox-viewport {
  max-width: 84vw;
  max-height: 86vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 35px;
  cursor: zoom-in;
  position: relative;
}

.lightbox-viewport.is-zoomed {
  cursor: grab;
}

.lightbox-viewport.is-dragging {
  cursor: grabbing;
}

.lightbox-img {
  max-width: 84vw;
  max-height: 86vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 35px;
  transform-origin: center center;
  transition: transform 0.22s cubic-bezier(0.25, 1, 0.5, 1);
  user-select: none;
}

/* Lightbox Video Player */
.lightbox-video {
  display: none;
  max-width: 84vw;
  max-height: 84vh;
  min-width: min(720px, 82vw);
  width: auto;
  height: auto;
  border-radius: 35px;
  outline: none;
  background: #000000;
  object-fit: contain;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.45);
}

/* In Video mode: strictly hide the zoom button, keep only the back button */
.lightbox-card.is-video-mode .lightbox-zoom-bar {
  display: none !important;
}

.lightbox-card.is-video-mode .lightbox-viewport {
  cursor: default;
}

/* Floating Glass Zoom Bar: exact Apple Liquid Glass match with back button */
.lightbox-zoom-bar {
  position: absolute;
  bottom: 16px;
  right: 16px;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 16px;
  box-sizing: border-box;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  overflow: hidden;
  box-shadow: 
    0 10px 30px rgba(0, 0, 0, 0.22),
    inset 0 1.5px 2px rgba(255, 255, 255, 0.85),
    inset 0 -1.5px 2px rgba(255, 255, 255, 0.3),
    inset 2px 0 3px rgba(255, 255, 255, 0.45),
    inset -2px 0 3px rgba(255, 255, 255, 0.45);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.2, 0.8, 0.2, 1),
              visibility 0.3s cubic-bezier(0.2, 0.8, 0.2, 1),
              transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1),
              box-shadow 0.2s ease,
              border-color 0.2s ease;
  user-select: none;
}

/* Reveal zoom bar when hovering over picture card or zoom bar itself */
.lightbox-card:hover .lightbox-zoom-bar,
.lightbox-zoom-bar:hover {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.lightbox-zoom-bar:hover {
  border-color: rgba(255, 255, 255, 0.85);
  box-shadow: 
    0 14px 40px rgba(0, 0, 0, 0.28),
    inset 0 2px 3px rgba(255, 255, 255, 0.95),
    inset 0 -1.5px 2px rgba(255, 255, 255, 0.45),
    inset 2px 0 3px rgba(255, 255, 255, 0.6),
    inset -2px 0 3px rgba(255, 255, 255, 0.6);
}

/* Always visible on touch-only mobile devices without hover */
@media (hover: none) {
  .lightbox-zoom-bar {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
}

.lightbox-zoom-bar .glass__content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #ffffff;
  font-family: var(--font-footer), -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  font-size: 0.94rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

/* Seamless buttons inside liquid glass pill: zero white blocking */
.zoom-btn {
  color: #ffffff;
  background: transparent;
  border: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
  opacity: 0.9;
}

.zoom-btn:hover {
  opacity: 1;
  transform: scale(1.15);
}

.zoom-btn:active {
  transform: scale(0.9);
}

.zoom-btn.reset-btn {
  width: auto;
  height: 24px;
  padding: 0 8px;
  border-radius: 12px;
  font-size: 0.92rem;
  font-family: var(--font-footer), -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  font-weight: 500;
  letter-spacing: -0.01em;
  background: transparent;
  margin-left: 2px;
}

.zoom-btn.reset-btn:hover {
  transform: scale(1.05);
}

.zoom-level {
  min-width: 44px;
  text-align: center;
  font-size: 0.94rem;
  font-family: var(--font-footer), -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  font-weight: 500;
  padding: 0 2px;
}

/* ==========================================================================
   Responsive Adaptations for Masonry
   ========================================================================== */
@media (max-width: 1024px) {
  .portfolio-section {
    padding: 3.5rem 2rem 5rem;
  }

  .portfolio-title {
    font-size: 2rem;
  }

  .masonry-columns {
    gap: 16px;
  }

  .masonry-col {
    gap: 16px;
  }
}

@media (max-width: 768px) {
  .masonry-columns {
    flex-direction: column;
  }

  .lightbox-card {
    max-width: 94vw;
    max-height: 90vh;
  }

  .lightbox-viewport, .lightbox-img {
    max-width: 94vw;
    max-height: 90vh;
  }
}

/* ==========================================================================
   Main Page Wrapper (for smooth horizontal slide transition)
   ========================================================================== */
.main-page-wrapper {
  position: relative;
  width: 100%;
  min-height: 100vh;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s ease, filter 0.8s ease;
  will-change: transform, opacity;
}

body.about-open {
  overflow: hidden !important;
}

body.about-open .main-page-wrapper {
  transform: translateX(-15vw);
  opacity: 0.45;
  filter: blur(2px);
  pointer-events: none;
}

/* ==========================================================================
   About Me Page - Horizontal Sliding Editorial View
   ========================================================================== */
.about-page {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 2000;
  background-color: #ededed;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transform: translateX(100%);
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
  pointer-events: none;
}

.about-page.is-open {
  transform: translateX(0) !important;
  pointer-events: auto !important;
}

/* Top Bar Navigation (< back) */
.about-top-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding: 2.2rem 3.5rem;
  z-index: 10;
  display: flex;
  align-items: center;
}

.about-back-btn {
  font-family: var(--font-header);
  font-size: 1rem;
  font-weight: 400;
  color: #1a1a1a;
  background: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0;
  letter-spacing: 0.02em;
  opacity: 0;
  transform: translateX(-15px);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.2s, opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.2s;
}

.about-page.is-open .about-back-btn {
  opacity: 0.85;
  transform: translateX(0);
}

.about-back-btn:hover {
  opacity: 1 !important;
  transform: translateX(-4px) !important;
}

.about-back-arrow {
  font-size: 1.05rem;
  display: inline-block;
  transition: transform 0.25s ease;
}

.about-back-btn:hover .about-back-arrow {
  transform: translateX(-3px);
}

/* Background Portrait from aboutme/ */
.about-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.about-backdrop-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right bottom;
  transform: scale(1.02);
  transform-origin: center center;
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  -webkit-user-drag: none;
}

.about-page.is-open .about-backdrop-img {
  transform: scale(1.0);
}

.about-backdrop-fade {
  display: none;
}

/* Scrollable Content Container */
.about-scroll-container {
  position: relative;
  z-index: 2;
  width: 100%;
  min-height: 100%;
  display: flex;
  align-items: center;
  padding: 6.5rem 3.5rem 4rem 3.5rem;
}

.about-content {
  max-width: 580px;
  width: 100%;
  margin-left: clamp(1rem, 4.5vw, 4rem);
}

/* Hero Block: "Hi!" + Intro Line */
.about-hero-block {
  display: flex;
  align-items: flex-start;
  gap: 1.35rem;
  margin-bottom: 2.2rem;
}

.about-greeting {
  font-family: var(--font-header);
  font-size: clamp(2.8rem, 4vw, 3.6rem);
  font-weight: 700;
  line-height: 0.92;
  color: #111215;
  letter-spacing: -0.02em;
  margin: 0;
  flex-shrink: 0;
}

.about-intro {
  font-family: var(--font-footer);
  font-size: 1.05rem;
  line-height: 1.6;
  color: #1a1a1c;
  font-weight: 400;
  margin: 0;
  padding-top: 0.15rem;
}

/* Narrative Body Paragraphs */
.about-body-block {
  display: flex;
  flex-direction: column;
  gap: 1.55rem;
}

.about-paragraph {
  font-family: var(--font-footer);
  font-size: 1.02rem;
  line-height: 1.65;
  color: #24252a;
  font-weight: 400;
  margin: 0;
  letter-spacing: 0.005em;
  position: relative;
  transition: color 0.25s ease, transform 0.25s ease;
}

.about-paragraph:hover {
  color: #000000;
  transform: translateX(4px);
}

/* Staggered Organic Typography Reveal Animation (Not like a slideshow) */
.about-anim-item {
  opacity: 0;
  transform: translateY(26px);
  filter: blur(5px);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.75s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.75s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform, filter;
}

.about-page.is-open .about-anim-item {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
  transition-delay: calc(0.22s + var(--anim-order, 1) * 0.11s);
}

.about-page:not(.is-open) .about-anim-item {
  opacity: 0;
  transform: translateY(26px);
  filter: blur(5px);
  transition: opacity 0.25s ease, transform 0.25s ease, filter 0.25s ease;
  transition-delay: 0s !important;
}

/* Responsive Adaptations for About Page */
@media (max-width: 1024px) {
  .about-scroll-container {
    padding: 5.5rem 2rem 3rem 2rem;
  }
  .about-top-bar {
    padding: 1.8rem 2rem;
  }
  .about-content {
    margin-left: 1rem;
    max-width: 520px;
  }
}

@media (max-width: 820px) {
  .about-backdrop-fade {
    display: block;
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(237, 237, 237, 0.94) 0%, rgba(237, 237, 237, 0.8) 55%, rgba(237, 237, 237, 0.4) 100%);
  }
  .about-backdrop-img {
    opacity: 0.4;
  }
  .about-content {
    max-width: 100%;
    margin-left: 0;
  }
  .about-hero-block {
    flex-direction: column;
    gap: 0.75rem;
  }
}

/* ==========================================================================
   Contact Section (Lowest Page matching Sketch)
   ========================================================================== */
.contact-section {
  position: relative;
  z-index: 20;
  width: 100%;
  min-height: 100vh;
  background-color: #ffffff;
  color: #0f1013;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  --circle-x: 50%;
  --circle-y: 50%;
  transition: border-color 0.4s ease;
}

.contact-section.is-inverted {
  border-top-color: rgba(255, 255, 255, 0.1);
}

/* Circular Inverted Color Transformation Overlay (White to Black) */
.contact-circle-reveal {
  position: absolute;
  left: var(--circle-x, 50%);
  top: var(--circle-y, 50%);
  width: 260vmax;
  height: 260vmax;
  border-radius: 50%;
  background-color: #0c0d10;
  pointer-events: none;
  z-index: 1;
  transform: translate3d(-50%, -50%, 0) scale(0);
  transition: transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.contact-section.is-inverted .contact-circle-reveal {
  transform: translate3d(-50%, -50%, 0) scale(1);
}

.contact-playground {
  position: relative;
  z-index: 5;
  flex: 1;
  width: 100%;
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Floating Contact Text Links */
.floating-contact-link {
  display: inline-block;
  text-decoration: none;
  color: #0f1013;
  user-select: none;
  cursor: pointer;
  will-change: transform, color;
  transition: color 0.4s ease, transform 0.2s ease;
}

.floating-text {
  display: inline-block;
  font-family: var(--font-header);
  font-size: clamp(3.8rem, 8.5vw, 7.8rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1;
  position: relative;
  transform: translate3d(var(--cursor-shift-x, 0px), var(--cursor-shift-y, 0px), 0);
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), text-shadow 0.4s ease, color 0.4s ease;
}

/* Flying Around Base Organic Animations */
.float-whatsapp {
  position: absolute;
  top: 26%;
  left: 14%;
  animation: flyAroundWhatsapp 12s ease-in-out infinite alternate;
}

.float-email {
  position: absolute;
  top: 54%;
  right: 16%;
  animation: flyAroundEmail 14s ease-in-out infinite alternate;
}

@keyframes flyAroundWhatsapp {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  20% {
    transform: translate3d(38px, -26px, 0) rotate(-1.5deg);
  }
  45% {
    transform: translate3d(-24px, 36px, 0) rotate(1.4deg);
  }
  70% {
    transform: translate3d(-46px, -18px, 0) rotate(-0.8deg);
  }
  88% {
    transform: translate3d(26px, 16px, 0) rotate(0.6deg);
  }
  100% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
}

@keyframes flyAroundEmail {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  25% {
    transform: translate3d(-42px, 30px, 0) rotate(1.6deg);
  }
  50% {
    transform: translate3d(36px, -36px, 0) rotate(-1.5deg);
  }
  75% {
    transform: translate3d(42px, 26px, 0) rotate(1.1deg);
  }
  90% {
    transform: translate3d(-20px, -18px, 0) rotate(-0.6deg);
  }
  100% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
}

/* Interactive Hover Reactions */
.floating-contact-link:hover .floating-text {
  transform: translate3d(var(--cursor-shift-x, 0px), var(--cursor-shift-y, 0px), 0) scale(1.05);
  text-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

/* Inverted Mode (White to Black) Styling */
.contact-section.is-inverted .floating-contact-link {
  color: #ffffff !important;
}

.contact-section.is-inverted .floating-text {
  text-shadow: 0 0 35px rgba(255, 255, 255, 0.25);
}

.contact-section.is-inverted .floating-contact-link:hover .floating-text {
  text-shadow: 0 0 50px rgba(255, 255, 255, 0.55), 0 0 100px rgba(255, 255, 255, 0.25) !important;
}

/* Contact Footer Bar */
.contact-footer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 2.2rem 3.5rem;
  font-family: var(--font-footer);
  font-size: 0.92rem;
  color: #1a1a1c;
  z-index: 5;
  position: relative;
  background: transparent;
  transition: color 0.4s ease;
}

.contact-section.is-inverted .contact-footer-bar,
.contact-section.is-inverted .contact-footer-link,
.contact-section.is-inverted .back-to-top-btn,
.contact-section.is-inverted .contact-footer-social {
  color: #ffffff !important;
}

.contact-footer-left {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.contact-footer-link {
  color: inherit;
  transition: opacity 0.2s ease, transform 0.2s ease, color 0.4s ease;
  display: inline-block;
}

.contact-footer-link:hover {
  opacity: 0.7;
  transform: translateX(2px);
}

.contact-footer-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Back to Top Button with Animated Arrow */
.back-to-top-btn {
  background: none;
  border: none;
  font-family: var(--font-footer);
  font-size: 0.95rem;
  font-weight: 400;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.8rem;
  transition: opacity 0.25s ease, color 0.4s ease;
}

.back-to-top-btn:hover {
  opacity: 0.7;
}

.back-to-top-arrow {
  display: inline-block;
  font-size: 1.15rem;
  line-height: 1;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: arrowBounce 1.8s ease-in-out infinite;
}

@keyframes arrowBounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

.back-to-top-btn:hover .back-to-top-arrow {
  animation: arrowLoop 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes arrowLoop {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  45% {
    transform: translateY(-14px);
    opacity: 0;
  }
  46% {
    transform: translateY(14px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

.contact-footer-right {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.contact-footer-social {
  color: inherit;
  transition: opacity 0.2s ease, transform 0.2s ease, color 0.4s ease;
}

.contact-footer-social:hover {
  opacity: 0.7;
  transform: translateY(-1px);
}

/* Responsive Adaptations for Contact Section */
@media (max-width: 1024px) {
  .contact-footer-bar {
    padding: 1.8rem 2rem;
  }
  .float-whatsapp {
    left: 8%;
  }
  .float-email {
    right: 8%;
  }
}

@media (max-width: 768px) {
  .contact-playground {
    flex-direction: column;
    gap: 4rem;
    min-height: 60vh;
    padding: 5rem 1.5rem;
  }

  .float-whatsapp,
  .float-email {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    text-align: center;
  }

  .floating-text {
    font-size: clamp(2.8rem, 12vw, 4.5rem);
  }

  .contact-footer-bar {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
    padding: 2rem 1.5rem 3.5rem;
  }

  .contact-footer-left {
    align-items: center;
  }

  .contact-footer-right {
    gap: 1.5rem;
  }
}


