/* ==========================================================================
   Meraki Studio — Floating Gallery Grid (Dark Theme / Index copy.html)
   ========================================================================== */

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background-color: #000000 !important;
  color: #ffffff;
  font-family: "PT Mono", monospace;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* ==========================================================================
   Nav Bar Title Glitch Hover Animation (PT Mono)
   ========================================================================== */
.contain_nav_title p {
  position: relative;
  display: inline-block;
  font-family: "PT Mono", monospace;
  color: #ffffff;
  mix-blend-mode: normal;
  transition: color 0.2s ease;
}

.contain_nav_title p::before,
.contain_nav_title p::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  font-family: "PT Mono", monospace;
  pointer-events: none;
  opacity: 0;
}

.contain_nav_title p.nav_active,
.menu_respon h6.nav_active {
  text-decoration: underline;
  text-underline-offset: 4px;
  opacity: 1;
}

.contain_nav_title p:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
  animation: navGlitchSkew 0.25s linear 4 forwards;
}

.contain_nav_title p:hover::before {
  left: 2px;
  color: #ffffff;
  text-shadow: -2px 0 #ff0055 !important;
  animation:
    navGlitchClipA 0.25s linear 4 alternate-reverse,
    navGlitchLayer 1s steps(1, end) forwards;
}

.contain_nav_title p:hover::after {
  left: -2px;
  color: #ffffff;
  text-shadow: 2px 0 #00f0ff !important;
  animation:
    navGlitchClipB 0.2s linear 5 alternate-reverse,
    navGlitchLayer 1s steps(1, end) forwards;
}

@keyframes navGlitchLayer {
  0%   { opacity: 1; }
  99%  { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes navGlitchSkew {
  0%   { transform: skew(0deg); }
  20%  { transform: skew(3deg); }
  40%  { transform: skew(-2deg); }
  60%  { transform: skew(4deg); }
  80%  { transform: skew(-3deg); }
  100% { transform: skew(0deg); }
}

@keyframes navGlitchClipA {
  0%   { clip-path: inset(12% 0 65% 0); transform: translate(-2px, -1px); }
  15%  { clip-path: inset(48% 0 22% 0); transform: translate(2px, 1px); }
  30%  { clip-path: inset(8% 0 72% 0);  transform: translate(-1px, 0); }
  45%  { clip-path: inset(68% 0 10% 0); transform: translate(3px, -1px); }
  60%  { clip-path: inset(25% 0 45% 0); transform: translate(-2px, 1px); }
  75%  { clip-path: inset(75% 0 5% 0);  transform: translate(1px, 0); }
  90%  { clip-path: inset(38% 0 36% 0); transform: translate(-3px, -1px); }
  100% { clip-path: inset(5% 0 78% 0);  transform: translate(2px, 1px); }
}

@keyframes navGlitchClipB {
  0%   { clip-path: inset(62% 0 14% 0); transform: translate(2px, 1px); }
  15%  { clip-path: inset(15% 0 58% 0); transform: translate(-2px, -1px); }
  30%  { clip-path: inset(72% 0 8% 0);  transform: translate(1px, 0); }
  45%  { clip-path: inset(28% 0 48% 0); transform: translate(-3px, 1px); }
  60%  { clip-path: inset(52% 0 20% 0); transform: translate(2px, -1px); }
  75%  { clip-path: inset(10% 0 70% 0); transform: translate(-1px, 0); }
  90%  { clip-path: inset(44% 0 30% 0); transform: translate(3px, 1px); }
  100% { clip-path: inset(68% 0 12% 0); transform: translate(-2px, -1px); }
}

/* ==========================================================================
   Floating Gallery Canvas & Cards
   ========================================================================== */
.floating_stage {
  position: relative;
  width: 100%;
  min-height: 100vh;
  z-index: 5;
  overflow: hidden;
  transition: transform 0.35s ease;
}

.floating_canvas {
  position: relative;
  width: 100%;
  min-height: 100vh;
  will-change: transform;
}

.mobile_pan_hint {
  display: none;
}

.float_card {
  position: absolute;
  display: block;
  text-decoration: none;
  color: inherit;
  white-space: normal;
  border-radius: 0;
  overflow: visible;
  cursor: pointer;
  opacity: 0;
  transform: scaleY(0);
  transform-origin: 100% 0%;
  will-change: transform, opacity;
  transition:
    transform 0.55s cubic-bezier(0.39, 0.575, 0.565, 1) var(--enter-delay, 0ms),
    opacity 0.35s ease var(--enter-delay, 0ms);
}

.float_card.is-visible {
  opacity: 1;
  transform: scaleY(1);
}

.float_card.is-ready {
  transform-origin: center center;
  transition:
    transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.4s ease;
}

.float_card_inner {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #111111;
  animation: floatDrift var(--float-duration, 7s) ease-in-out var(--float-delay, 0s) infinite alternate;
  transition: box-shadow 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes floatDrift {
  0% {
    transform: translate3d(0px, 0px, 0px);
  }
  50% {
    transform: translate3d(var(--drift-x, 5px), var(--drift-y, -7px), 0px);
  }
  100% {
    transform: translate3d(calc(var(--drift-x, 5px) * -0.6), calc(var(--drift-y, -7px) * 0.7), 0px);
  }
}

.float_card.is-visible:hover {
  z-index: 48 !important;
  transform: scale(1.06);
}

.float_card:hover .float_card_inner {
  animation-play-state: paused;
  box-shadow: 0 2px 20px rgba(160, 159, 159, 0.1);
}

.floating_canvas.has-hover .float_card.is-visible:not(:hover) {
  opacity: 0.48;
}

.float_card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transform: scale(1.01);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.float_card:hover img {
  transform: scale(1.06);
}

/* Hover Info Scrim */
.float_card_overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px 12px;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.88) 0%,
    rgba(0, 0, 0, 0.25) 55%,
    rgba(0, 0, 0, 0.1) 100%
  );
  color: #ffffff;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.float_card:hover .float_card_overlay,
.float_card:focus-visible .float_card_overlay {
  opacity: 1;
}

.float_card_top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: "PT Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  opacity: 0.85;
}

.float_card_bottom {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.float_card_title {
  font-family: "PT Mono", monospace;
  font-size: 0.88rem;
  font-weight: 400;
  line-height: 1.25;
  color: #ffffff;
}

.float_card_tags {
  font-family: "PT Mono", monospace;
  font-size: 0.64rem;
  color: rgba(255, 255, 255, 0.72);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Empty state */
.floating_empty {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: "PT Mono", monospace;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
}

.dialog:not(.show) {
  pointer-events: none;
}

/* ==========================================================================
   Filter Component (Fixed Bottom-Right Dropup — matches projet.html)
   ========================================================================== */
.filter_container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 105;
  font-family: "PT Mono", monospace;
  user-select: none;
}

.filter_btn {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(0, 0, 0, 0.85);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 12px;
  padding: 12px 20px;
  font-family: "PT Mono", monospace;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
}

.filter_btn:hover {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
}

.filter_btn_arrow {
  font-size: 0.65rem;
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.filter_container.open .filter_btn_arrow {
  transform: rotate(180deg);
}

.filter_container.open .filter_btn {
  border-color: #ffffff;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.25);
}

.filter_dropdown {
  position: absolute;
  bottom: calc(100% + 12px);
  right: 0;
  min-width: 240px;
  background: rgba(10, 10, 10, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 8px 0;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.8), 0 0 1px rgba(255, 255, 255, 0.2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.97);
  transform-origin: bottom right;
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s;
  pointer-events: none;
}

.filter_container.open .filter_dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.filter_dropdown_header {
  padding: 8px 18px 10px 18px;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 4px;
}

.filter_list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.filter_item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  transition: background-color 0.2s ease, color 0.2s ease, padding-left 0.2s ease;
}

.filter_item:hover {
  background-color: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  padding-left: 22px;
}

.filter_item.active {
  background-color: #ffffff;
  color: #000000;
  font-weight: bold;
}

.filter_item_count {
  font-size: 0.72rem;
  opacity: 0.6;
  margin-left: 12px;
}

.filter_item.active .filter_item_count {
  opacity: 0.8;
}

.filter_separator {
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
  margin: 6px 0;
}

.filter_item_icon {
  font-size: 0.75rem;
  opacity: 0.7;
  margin-left: 12px;
}

.filter_item.active .filter_item_icon {
  opacity: 1;
}

@media (max-width: 767px) {
  .floating_stage {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    cursor: grab;
  }
  .floating_stage.is-grabbing {
    cursor: grabbing;
  }
  .floating_stage.is-grabbing .float_card {
    cursor: grabbing;
  }
  .mobile_pan_hint {
    position: fixed;
    left: 20px;
    bottom: 26px;
    z-index: 85;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    background: rgba(0, 0, 0, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.8);
    font-family: "PT Mono", monospace;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    pointer-events: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: opacity 0.45s ease, transform 0.45s ease;
  }
  .mobile_pan_hint.is-hidden {
    opacity: 0;
    transform: translateY(8px);
  }
}

@media (max-width: 600px) {
  .filter_container {
    bottom: 20px;
    right: 20px;
  }
  .filter_btn {
    padding: 10px 16px;
    font-size: 0.78rem;
    gap: 8px;
  }
  .filter_dropdown {
    min-width: 200px;
  }
  .filter_item {
    padding: 9px 14px;
    font-size: 0.78rem;
  }
  .float_card_title {
    font-size: 0.78rem;
  }
}

/* ==========================================================================
   Project Slide-In Overlay (70% Width Right Drawer)
   ========================================================================== */
#cursor {
  z-index: 140;
}

.project_overlay_backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  background-color: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.project_overlay_backdrop.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.project_overlay_panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 70vw;
  height: 100vh;
  /* background-color: #141414; */
  backdrop-filter: blur(15px);
  border-left: 0.5px solid rgba(255, 255, 255, 0.5);
  box-shadow: -24px 0 60px rgba(0, 0, 0, 0.75);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  color: #ffffff;
}

.project_overlay_backdrop.is-open .project_overlay_panel {
  transform: translateX(0);
}

.project_overlay_close {
  position: absolute;
  top: 22px;
  right: 26px;
  z-index: 5;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  transition: color 0.2s ease, transform 0.25s ease;
}

.project_overlay_close:hover {
  color: #ffffff;
  transform: rotate(90deg);
}

.project_overlay_content {
  padding: 64px 56px 48px;
  display: flex;
  flex-direction: column;
}

.project_overlay_media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #000000;
  overflow: hidden;
}

.project_overlay_media iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.project_overlay_fallback {
  position: relative;
  width: 100%;
  height: 100%;
}

.project_overlay_fallback img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project_overlay_fallback_cta {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 12px 22px;
  background: rgba(15, 15, 15, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.55);
  color: #ffffff;
  font-family: "PT Mono", monospace;
  font-size: 0.85rem;
  text-decoration: none;
  backdrop-filter: blur(8px);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.project_overlay_fallback_cta:hover {
  background: #ffffff;
  color: #000000;
}

.project_overlay_details {
  display: grid;
  grid-template-columns: minmax(200px, 34%) 1fr;
  gap: 36px;
  margin-top: 28px;
  align-items: start;
}

.project_overlay_meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 20px;
}

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

.overlay_meta_full {
  grid-column: 1 / -1;
}

.overlay_meta_label {
  font-family: "PT Mono", monospace;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.62);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.overlay_meta_value {
  font-family: "Inter", sans-serif;
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.5;
  overflow-wrap: break-word;
}

.project_overlay_body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.project_overlay_title {
  font-family: "Inter", sans-serif;
  font-size: clamp(1.5rem, 2.5vw, 2.35rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: #ffffff;
  margin: 0 0 14px 0;
}

.project_overlay_synopsis {
  font-family: "Inter", sans-serif;
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.58;
  color: rgba(255, 255, 255, 0.78);
  margin: 0 0 22px 0;
  white-space: normal;
}

.project_overlay_link {
  display: inline-block;
  font-family: "PT Mono", monospace;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.84);
  text-decoration: none;
  transition: color 0.2s ease;
}

.project_overlay_link:hover {
  color: #ffffff;
  text-decoration: underline;
}

@media (max-width: 960px) {
  .project_overlay_panel {
    width: 88vw;
  }
  .project_overlay_content {
    padding: 58px 32px 40px;
  }
  .project_overlay_details {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

@media (max-width: 600px) {
  .project_overlay_panel {
    width: 100vw;
  }
  .project_overlay_content {
    padding: 56px 20px 32px;
  }
  .project_overlay_close {
    top: 14px;
    right: 16px;
  }
  .project_overlay_title {
    font-size: 1.45rem;
  }
  .project_overlay_synopsis {
    font-size: 0.85rem;
  }
}
