* {
  box-sizing: border-box;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 50% 50%, rgba(255,255,255,0.03), transparent 60%),
    repeating-linear-gradient(
      0deg,
      rgba(255,255,255,0.015),
      rgba(255,255,255,0.015) 1px,
      transparent 1px,
      transparent 2px
    );
    pointer-events: none;
    z-index: 0;
}

body {
  margin: 0;
  font-family: system-ui, sans-serif;
  background: linear-gradient(
    180deg,
    #0b0f1a,
    #121826,
    #0b0f1a
  );
  color: #e6e6e6;
}

.bg-parallax {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(106,47,207,0.12), transparent 40%),
    radial-gradient(circle at 80% 60%, rgba(0,255,255,0.08), transparent 45%),
    linear-gradient(180deg, #0b0f1a, #121826, #0b0f1a);
  z-index: -1;
  will-change: transform;
}

.portfolio-header {
  padding: 9rem 2rem 3rem;
  text-align: center;
}

.portfolio-header h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-family: "Orbitron", system-ui, sans-serif;
}

.portfolio-header p {
  margin-top: 1rem;
  font-size: 0.9rem;
  opacity: 0.7;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.portfolio-intro{
  max-width: 720px;
  margin: 3rem auto 2rem;
  padding: 0 2rem;
  text-align: center;
}

.portfolio-intro p {
  font-size: 0.95rem;
  line-height: 1.8;
  opacity: 0.75;
  letter-spacing: 0.05em;
}

.portfolio-footer {
  margin-top: 6rem;
  padding: 4rem 2rem 3rem;
  text-align: center;
  position: relative;
}

.portfolio-footer::before {
  content: "";
  display: block;
  width: 140px;
  height: 1px;
  margin: 0 auto 3rem;
  background: linear-gradient(90deg, transparent, rgba(245,211,0,0.6), transparent);
  box-shadow: 0 0 12px rgba(245,211,0,0.35);
}

.signature {
  max-width: 640px;
  margin: 0 auto 2.5rem;
  font-size: 0.95rem;
  line-height: 1.8;
  opacity: 0.75;
  letter-spacing: 0.05em;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
}

.social-links a {
  font-size: 1.25rem;
  color: #e6e6e6;
  transition:
    color 0.25s ease,
    transform 0.25s ease,
    text-shadow 0.25s ease;
    animation: iconPulse 6s ease-in-out infinite;
}

@keyframes iconPulse {
  0%, 100% {
    text-shadow: none;
  }
  50% {
    text-shadow: 0 0 10px rgba(245, 211, 0, 0.25);
  }
}

.social-links a:hover {
  color: #f5d300;
  transform: translateY(-3px);
  text-shadow:
    0 0 6px rgba(245, 211, 0, 0.6),
    0 0 18px rgba(245, 211, 0, 0.35);
}

.copyright {
  margin-top: 2rem;
  font-size: 0.75rem;
  opacity: 0.4;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-align: center;
}

.header-accent {
  width: 120px;
  height: 2px;
  margin: 2rem auto 0;
  background: linear-gradient(90deg, transparent, #6a2fcf, transparent);
  box-shadow: 0 0 12px rgba(106, 47, 207, 0.35);
  animation: accentPulse 6s ease-in-out infinite;
}

@keyframes accentPulse {
  0%, 100% {
    box-shadow: 0 0 8px rgba(106, 47, 207, 0.25);
    opacity: 0.6;
  }
  50% {
    box-shadow: 0 0 22px rgba(106, 47, 207, 0.6);
    opacity: 1;
  }
}

.masonry {
  column-count: 4;
  column-gap: 1.5rem;
  padding: 2rem;
}

.masonry img {
  width: 100%;
  display: block;
  margin-bottom: 1.5rem;
  border-radius: 6px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: zoom-in;
  break-inside: avoid;
  background: #111;
}

.masonry img:hover {
  transform: translateY(-3px);
  box-shadow: 
    0 20px 40px rgba(0,0,0,0.35),
    0 0 0 1px rgba(106, 47, 207, 0.4),
    0 0 18px rgba(106, 47, 207, 0.35);
  filter: drop-shadow(0 0 12px rgba(106,47,207,0.25));
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 20, 0.85);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 999;
}

.lightbox.active {
  opacity: 1;
  pointer-events: auto;
  animation: lightboxGlow 8s ease-in-out infinite;
}

@keyframes lightboxGlow {
  0%, 100% {
    background: rgba(5, 8, 20, 0.85);
  }
  50% {
    background: rgba(10, 15, 35, 0.92);
  }
}

.lightbox-content {
  transform: scale(0.95);
  opacity: 0;
  transition: transform 0.5s cubic-bezier(.22,.61,.36,1), opacity 0.35s ease;
  max-width: 90vw;
  max-height: 90vh;
}

.lightbox.active .lightbox-content {
  transform: scale(1);
  opacity: 1;
}

.lightbox img {
  max-width: 100%;
  max-height: 75vh;
  border-radius: 6px;
  box-shadow: 0 40px 100px rgba(0,0,0,0.6);
}

.lightbox-meta {
  margin-top: 1.5rem;
  text-align: center;
}

.lightbox-meta h2 {
  margin: 0;
  font-size: 1.5rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-family: "Orbitron", system-ui, sans-serif;
}

.lightbox-meta p {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  opacity: 0.7;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

@media (max-width: 1200px) {
  .masonry {
    column-count: 3;
  }
}

@media (max-width: 800px) {
  .masonry {
    column-count: 2;
  }
}

@media (max-width: 500px) {
  .masonry {
    column-count: 1;
  }
}
