/* Gallery page styles extracted from core.css */

.portfolio-container {
  position: relative;
}

.portfolio-item {
  position: relative;
}

/* Keep a stable tile height even while images are still loading (important for Isotope) */
.portfolio-container .portfolio-item > .position-relative {
  aspect-ratio: 4 / 3;
}

.portfolio-container .portfolio-item > .position-relative > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.portfolio-item::after {
  position: absolute;
  content: "";
  top: 30px;
  right: 30px;
  bottom: 30px;
  left: 30px;
  border: 2px solid #FFFFFF;
  z-index: 1;
}

.portfolio-item .portfolio-btn {
  position: absolute;
  width: 0;
  height: 0;
  top: 50%;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
  text-decoration: none;
  opacity: 0;
  transition: .5s;
  z-index: 2;
}

.portfolio-item:hover .portfolio-btn {
  opacity: 1;
  width: calc(100% - 60px);
  height: calc(100% - 60px);
  top: 30px;
  left: 30px;
}

/* Gallery tech animation (HUD / scanning core) */

.gallery-tech-stage {
  background: #ffffff;
  padding: 44px 0;
}

.gallery-tech-stage .gts-wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 16px;
}

.gallery-tech-stage .gts-hud {
  position: relative;
  height: 240px;
  border-radius: 18px;
  overflow: hidden;
  background:
    radial-gradient(60% 70% at 50% 45%, rgba(0, 191, 255, 0.12) 0%, rgba(0, 191, 255, 0.04) 45%, rgba(255, 255, 255, 1) 72%),
    linear-gradient(180deg, rgba(0, 191, 255, 0.03), rgba(0, 0, 0, 0));
  border: 1px solid rgba(0, 191, 255, 0.18);
}

.gallery-tech-stage .gts-hud::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 191, 255, 0.10) 1px, transparent 1px),
    linear-gradient(180deg, rgba(0, 191, 255, 0.08) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.25;
  mix-blend-mode: multiply;
  pointer-events: none;
}

.gallery-tech-stage .gts-hud::after {
  content: "";
  position: absolute;
  inset: -45% -20%;
  background: linear-gradient(90deg, transparent 0%, rgba(0, 191, 255, 0.10) 45%, rgba(0, 191, 255, 0.16) 50%, rgba(0, 191, 255, 0.10) 55%, transparent 100%);
  transform: translateX(-35%) skewX(-16deg);
  animation: gtsSweep 4.2s linear infinite;
  pointer-events: none;
}

.gallery-tech-stage .gts-core {
  position: absolute;
  left: 50%;
  top: 48%;
  transform: translate(-50%, -50%);
  width: 300px;
  height: 300px;
}

.gallery-tech-stage .gts-ring {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  border: 1px solid rgba(0, 191, 255, 0.28);
  box-shadow: 0 0 24px rgba(0, 191, 255, 0.10);
}

.gallery-tech-stage .gts-ring-1 {
  animation: gtsSpin 10s linear infinite;
}

.gallery-tech-stage .gts-ring-2 {
  inset: 26px;
  border-style: dashed;
  border-color: rgba(0, 191, 255, 0.22);
  animation: gtsSpinReverse 13s linear infinite;
}

.gallery-tech-stage .gts-ring-3 {
  inset: 56px;
  border-color: rgba(0, 191, 255, 0.18);
  box-shadow: 0 0 40px rgba(0, 191, 255, 0.12);
  animation: gtsPulse 2.4s ease-in-out infinite;
}

.gallery-tech-stage .gts-scan {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 4px;
  height: 46%;
  transform-origin: bottom center;
  transform: translate(-50%, -100%) rotate(0deg);
  background: linear-gradient(180deg, rgba(0, 191, 255, 0.0), rgba(0, 191, 255, 0.55), rgba(0, 191, 255, 0.0));
  filter: drop-shadow(0 0 8px rgba(0, 191, 255, 0.35));
  animation: gtsScan 2.1s linear infinite;
}

.gallery-tech-stage .gts-node {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(0, 191, 255, 0.85);
  box-shadow: 0 0 10px rgba(0, 191, 255, 0.35);
  animation: gtsFloat 2.6s ease-in-out infinite;
}

.gallery-tech-stage .gts-node::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: inherit;
  border: 1px solid rgba(0, 191, 255, 0.20);
  opacity: 0.7;
  animation: gtsPulse 2.4s ease-in-out infinite;
}

.gallery-tech-stage .gts-node-1 { left: 14%; top: 52%; animation-delay: -0.2s; }
.gallery-tech-stage .gts-node-2 { left: 26%; top: 25%; animation-delay: -1.1s; }
.gallery-tech-stage .gts-node-3 { left: 60%; top: 18%; animation-delay: -0.6s; }
.gallery-tech-stage .gts-node-4 { left: 78%; top: 38%; animation-delay: -1.6s; }
.gallery-tech-stage .gts-node-5 { left: 72%; top: 66%; animation-delay: -0.9s; }
.gallery-tech-stage .gts-node-6 { left: 34%; top: 72%; animation-delay: -1.9s; }

.gallery-tech-stage .gts-message {
  position: absolute;
  left: 50%;
  top: 52%;
  transform: translate(-50%, -50%);
  margin: 0;
  padding: 0 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.gallery-tech-stage .gts-line1 {
  font-size: 44px;
  line-height: 1.05;
  color: rgba(0, 191, 255, 0.92);
  text-shadow: 0 0 10px rgba(0, 191, 255, 0.22), 0 0 30px rgba(0, 191, 255, 0.12);
  animation: gtsGlow 2.1s ease-in-out infinite;
}

.gallery-tech-stage .gts-line2 {
  font-size: 18px;
  line-height: 1.1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(0, 191, 255, 0.78);
  text-shadow: 0 0 8px rgba(0, 191, 255, 0.14);
}

@keyframes gtsSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes gtsSpinReverse {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

@keyframes gtsPulse {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.03); opacity: 1; }
}

@keyframes gtsScan {
  from { transform: translate(-50%, -100%) rotate(0deg); }
  to { transform: translate(-50%, -100%) rotate(360deg); }
}

@keyframes gtsFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

@keyframes gtsGlow {
  0%, 100% {
    filter: brightness(1);
    text-shadow: 0 0 10px rgba(0, 191, 255, 0.20), 0 0 30px rgba(0, 191, 255, 0.10);
  }
  50% {
    filter: brightness(1.12);
    text-shadow: 0 0 14px rgba(0, 191, 255, 0.30), 0 0 40px rgba(0, 191, 255, 0.16);
  }
}

@keyframes gtsSweep {
  0% { transform: translateX(-35%) skewX(-16deg); opacity: 0; }
  8% { opacity: 1; }
  55% { opacity: 1; }
  100% { transform: translateX(35%) skewX(-16deg); opacity: 0; }
}

@media (max-width: 520px) {
  .gallery-tech-stage .gts-hud { height: 210px; }
  .gallery-tech-stage .gts-core { width: 250px; height: 250px; }
  .gallery-tech-stage .gts-line1 { font-size: 34px; }
  .gallery-tech-stage .gts-line2 { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-tech-stage .gts-hud::after,
  .gallery-tech-stage .gts-ring,
  .gallery-tech-stage .gts-scan,
  .gallery-tech-stage .gts-node,
  .gallery-tech-stage .gts-message {
    animation: none !important;
  }
}
