.work-container {
  flex-grow: 1;
  overflow-y: auto;
  position: relative;
  z-index: 5;
  padding: 18px 9% 34px;
  scrollbar-width: thin;
  scrollbar-color: rgba(188, 19, 254, 0.45) transparent;
}

.work-container::-webkit-scrollbar { width: 6px; }
.work-container::-webkit-scrollbar-thumb {
  background: rgba(188, 19, 254, 0.45);
  border-radius: 20px;
}

.work-section {
  width: 100%;
  max-width: 980px;
  margin: 0 auto 52px;
}

.work-section h2 {
  width: max-content;
  margin: 0 auto 24px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: 1px solid rgba(188, 19, 254, 0.65);
  border-radius: 999px;
  padding: 8px 26px;
  background: rgba(20, 0, 38, 0.58);
  box-shadow: 0 0 18px rgba(188, 19, 254, 0.18);
}

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

.work-item {
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: 34px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
  text-decoration: none;
  position: relative;
  transition: transform 0.38s ease, border-color 0.38s ease, box-shadow 0.38s ease;
}

.work-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 45%, rgba(5, 0, 10, 0.42));
  opacity: 0.65;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.work-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease, filter 0.6s ease;
}

.work-item:hover {
  transform: translateY(-7px);
  border-color: rgba(0, 229, 255, 0.55);
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.52), 0 0 22px rgba(0, 229, 255, 0.12);
}

.work-item:hover::after { opacity: 0.25; }
.work-item:hover img { transform: scale(1.055); filter: saturate(1.08); }

.last-section { margin-bottom: 12px; }

@media (max-width: 768px) {
  .work-container { padding: 28px 22px 46px; }
  .soft-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .work-item { border-radius: 26px; aspect-ratio: 4 / 3.2; }
}

@media (max-width: 480px) {
  .soft-grid { grid-template-columns: 1fr; }
}

.section-note {
  max-width: 720px;
  margin: -10px auto 24px;
  text-align: center;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.88rem;
  line-height: 1.65;
}

.small-note {
  margin-top: 18px;
  margin-bottom: 0;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.44);
}

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

.process-item {
  margin: 0;
}

.process-item .work-item {
  aspect-ratio: 3 / 4;
  border-radius: 30px;
}

.process-item figcaption {
  margin-top: 12px;
  text-align: center;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.76rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

@media (max-width: 768px) {
  .analog-grid {
    grid-template-columns: 1fr;
    max-width: 390px;
    margin: 0 auto;
    gap: 22px;
  }

  .section-note {
    font-size: 0.84rem;
    margin-bottom: 22px;
  }
}


/* Photography masonry section */
.photography-grid {
  columns: 3 240px;
  column-gap: 22px;
  max-width: 980px;
  margin: 0 auto;
}

.photo-item {
  display: block;
  break-inside: avoid;
  margin: 0 0 22px;
  border-radius: 28px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.30);
  transition: transform 0.38s ease, border-color 0.38s ease, box-shadow 0.38s ease;
}

.photo-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s ease, filter 0.6s ease;
}

.photo-item:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 229, 255, 0.55);
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.50), 0 0 22px rgba(0, 229, 255, 0.12);
}

.photo-item:hover img {
  transform: scale(1.035);
  filter: saturate(1.06);
}

@media (max-width: 768px) {
  .photography-grid {
    columns: 2 180px;
    column-gap: 16px;
  }

  .photo-item {
    margin-bottom: 16px;
    border-radius: 24px;
  }
}

@media (max-width: 480px) {
  .photography-grid {
    columns: 1;
  }
}


/* Local lightbox / Fancybox-style image viewer */
body.lightbox-open {
  overflow: hidden;
}

.site-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 54px 72px;
  background: rgba(3, 0, 8, 0.92);
  backdrop-filter: blur(8px);
}

.site-lightbox.active {
  display: flex;
}

.site-lightbox img {
  max-width: min(100%, 1180px);
  max-height: calc(100vh - 150px);
  object-fit: contain;
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.65), 0 0 32px rgba(188, 19, 254, 0.16);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: fixed;
  border: none;
  background: rgba(10, 0, 20, 0.74);
  color: white;
  cursor: pointer;
  transition: transform 0.25s ease, background 0.25s ease, opacity 0.25s ease;
  font-family: inherit;
}

.lightbox-close {
  top: 24px;
  right: 28px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 32px;
  line-height: 1;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 68px;
  border-radius: 999px;
  font-size: 48px;
  line-height: 1;
}

.lightbox-prev {
  left: 24px;
}

.lightbox-next {
  right: 24px;
}

.lightbox-close:hover {
  transform: scale(1.08);
  background: rgba(188, 19, 254, 0.55);
}

.lightbox-prev:hover,
.lightbox-next:hover {
  transform: translateY(-50%) scale(1.08);
  background: rgba(188, 19, 254, 0.55);
}

#lightboxCaption {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  margin: 0;
  max-width: 80%;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.84rem;
  letter-spacing: 0.04em;
  text-align: center;
}

@media (max-width: 700px) {
  .site-lightbox {
    padding: 54px 18px;
  }

  .site-lightbox img {
    max-height: calc(100vh - 150px);
    border-radius: 12px;
  }

  .lightbox-prev,
  .lightbox-next {
    width: 42px;
    height: 56px;
    font-size: 38px;
  }

  .lightbox-prev {
    left: 10px;
  }

  .lightbox-next {
    right: 10px;
  }

  .lightbox-close {
    right: 14px;
    top: 14px;
  }
}


/* Back to top button for the Work section */
.back-to-top {
  position: absolute;
  right: 34px;
  bottom: 34px;
  z-index: 40;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(0, 229, 255, 0.38);
  border-radius: 50%;
  background: rgba(13, 0, 26, 0.76);
  color: #ffffff;
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px) scale(0.92);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45), 0 0 18px rgba(188, 19, 254, 0.14);
  backdrop-filter: blur(8px);
  transition: opacity 0.28s ease, transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.back-to-top:hover {
  border-color: rgba(188, 19, 254, 0.8);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55), 0 0 26px rgba(188, 19, 254, 0.32);
  transform: translateY(-3px) scale(1.04);
}

@media (max-width: 768px) {
  .back-to-top {
    right: 20px;
    bottom: 22px;
    width: 44px;
    height: 44px;
    font-size: 1.3rem;
  }
}


/* Graphic design section */
.graphic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
  width: min(980px, 100%);
  margin: 0 auto;
}

.design-item {
  margin: 0;
}

.design-item a {
  display: block;
  overflow: hidden;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.30);
  transition: transform 0.38s ease, border-color 0.38s ease, box-shadow 0.38s ease;
}

.design-item a:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 229, 255, 0.55);
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.50), 0 0 22px rgba(0, 229, 255, 0.12);
}

.design-item img {
  width: 100%;
  aspect-ratio: 1 / 1.18;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease, filter 0.6s ease;
}

.design-item.wide {
  grid-column: span 2;
}

.design-item.wide img {
  aspect-ratio: 16 / 9;
}

.design-item a:hover img {
  transform: scale(1.035);
  filter: saturate(1.04);
}

.design-item figcaption {
  margin-top: 12px;
  padding: 0 4px;
}

.design-item figcaption strong {
  display: block;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.86rem;
  line-height: 1.25;
}

.design-item figcaption span {
  display: block;
  max-width: 310px;
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.76rem;
  line-height: 1.45;
}

@media (max-width: 860px) {
  .graphic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
  }

  .design-item.wide {
    grid-column: span 2;
  }
}

@media (max-width: 560px) {
  .graphic-grid {
    grid-template-columns: 1fr;
  }

  .design-item.wide {
    grid-column: span 1;
  }

  .design-item img,
  .design-item.wide img {
    aspect-ratio: auto;
  }
}
