@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* Keep complex custom animations */
@keyframes orbFloat {

  0%,
  100% {
    transform: translate(0, 0);
  }

  25% {
    transform: translate(30px, -24px);
  }

  50% {
    transform: translate(-18px, 28px);
  }

  75% {
    transform: translate(22px, 10px);
  }
}

@keyframes pulseDot {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
  }
}

@keyframes borderGlow {

  0%,
  100% {
    border-color: rgba(168, 85, 247, 0.3);
  }

  50% {
    border-color: rgba(168, 85, 247, 0.85);
    box-shadow: 0 0 24px rgba(168, 85, 247, 0.2);
  }
}

@keyframes spinSlow {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-14px);
  }
}

/* Scrollbar configuration */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #0d0d1a;
}

::-webkit-scrollbar-thumb {
  background: #7c3aed;
  border-radius: 3px;
}

/* Text Selection */
::selection {
  background: #a855f7;
  color: #fff;
}

/* Body base */
html {
  scroll-behavior: smooth;
}

/* Navbar scroll effect toggled by JS */
#mainNav.scrolled {
  padding: 10px 0;
  box-shadow: 0 4px 30px rgba(124, 58, 237, 0.18);
}

/* Base custom classes where Tailwind utilities are too verbose or conflict */
.avatar-ring-outer {
  position: absolute;
  inset: -18px;
  border: 1px solid rgba(168, 85, 247, .3);
  border-radius: 30px 8px 30px 8px;
  animation: borderGlow 3s ease infinite;
}

.avatar-ring-spin {
  position: absolute;
  inset: -36px;
  border: 1px dashed rgba(168, 85, 247, .12);
  border-radius: 40px 12px 40px 12px;
  animation: spinSlow 22s linear infinite;
}

/* Scroll Reveal Classes modified by JS */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}


.exp-card:hover::before {
  opacity: 1;
}

.exp-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #7c3aed, #a855f7, #c084fc);
  opacity: 0;
  transition: opacity .3s;
}

/* ── SECTION SNAP CONTAINER ── */
.portfolio-section {
  position: relative;
}

/* Slider wrapper */
.slider-track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding: 12px 4px 24px;
  scrollbar-width: none;
}

.slider-track::-webkit-scrollbar {
  display: none;
}

.slide-card {
  flex: 0 0 calc(33.333% - 16px);
  scroll-snap-align: start;
  min-width: 300px;
}

@media (max-width: 1024px) {
  .slide-card {
    flex: 0 0 calc(50% - 12px);
  }
}

@media (max-width: 640px) {
  .slide-card {
    flex: 0 0 88%;
  }
}

/* ── CARD ── */
.project-card {
  background: #0d0d1a;
  border: 1px solid rgba(168, 85, 247, 0.12);
  border-radius: 24px;
  overflow: hidden;
  cursor: pointer;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  position: relative;
}

.project-card::before {
  content: '';
  position: absolute;
  inset-x: 0;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, #7c3aed, #a855f7, #c084fc);
  opacity: 0;
  transition: opacity 0.3s;
}

.project-card:hover {
  border-color: rgba(168, 85, 247, 0.5);
  transform: translateY(-6px);
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.22);
}

.project-card:hover::before {
  opacity: 1;
}

.card-thumb {
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  will-change: transform;
}

.project-card:hover .card-thumb img {
  transform: scale(1.06) translateZ(0);
}

.card-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(6, 6, 17, 0.55);
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 20;
}

.project-card:hover .card-overlay {
  opacity: 1;
}

.overlay-btn {
  background: rgba(168, 85, 247, 0.9);
  backdrop-filter: blur(8px);
  color: white;
  border: none;
  border-radius: 50px;
  padding: 8px 18px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: background 0.2s, transform 0.2s;
}

.overlay-btn:hover {
  background: #7c3aed;
  transform: scale(1.05);
}

/* ── PROGRESS DOTS ── */
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(168, 85, 247, 0.25);
  cursor: pointer;
  transition: all 0.3s;
}

.dot.active {
  background: #a855f7;
  width: 24px;
  border-radius: 3px;
}

/* ── NAV ARROWS ── */
.arrow-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(168, 85, 247, 0.3);
  background: #0d0d1a;
  color: #c084fc;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
}

.arrow-btn:hover {
  background: rgba(168, 85, 247, 0.15);
  border-color: #a855f7;
  transform: scale(1.1);
}

.arrow-btn:disabled {
  opacity: 0.3;
  cursor: default;
  transform: none;
}

/* ── MODAL ── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 6, 17, 0.88);
  backdrop-filter: blur(16px);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 20px;
  overflow-y: auto;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

.modal-box {
  background: #0d0d1a;
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 28px;
  width: 100%;
  max-width: 860px;
  margin: auto;
  transform: translateY(32px) scale(0.97);
  transition: transform 0.35s cubic-bezier(.22, 1, .36, 1);
  position: relative;
}

.modal-backdrop.open .modal-box {
  transform: translateY(0) scale(1);
}

.modal-hero {
  height: 350px;
  position: relative;
  overflow: hidden;
  border-radius: 28px 28px 0 0;
}

.modal-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-hero-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
}

.modal-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(13, 13, 26, 0.9));
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(13, 13, 26, 0.8);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(168, 85, 247, 0.3);
  color: #c084fc;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

.modal-close:hover {
  background: rgba(168, 85, 247, 0.2);
  transform: scale(1.1);
}

/* Image gallery in modal */
.img-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.img-gallery .img-thumb {
  position: relative;
  aspect-ratio: 16/9;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgba(168, 85, 247, 0.15);
  transition: border-color 0.2s, transform 0.2s;
}

.img-gallery .img-thumb:hover {
  border-color: rgba(168, 85, 247, 0.5);
  transform: scale(1.02);
}

.img-gallery .img-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img-gallery .img-thumb.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

/* tag badge */
.tag {
  font-size: 10px;
  padding: 4px 10px;
  border-radius: 50px;
  background: rgba(168, 85, 247, 0.08);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.2);
}

/* reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .65s ease, transform .65s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ── LIGHTBOX ── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(3, 3, 10, 0.97);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.lightbox.zoomed {
  align-items: flex-start;
  overflow-y: auto;
  padding: 80px 0 100px;
}

.lightbox.open {
  opacity: 1;
  pointer-events: all;
}

.lightbox-img-wrap {
  position: relative;
  max-width: calc(100vw - 120px);
  max-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-img-wrap.zoomed {
  max-width: 100%;
  max-height: none;
  display: block;
  text-align: center;
  width: 100%;
}

.lightbox-img-wrap img {
  max-width: 100%;
  max-height: calc(100vh - 80px);
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.8);
  transform: scale(0.92);
  transition: transform 0.3s cubic-bezier(.22, 1, .36, 1);
  user-select: none;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='%23c084fc' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M6.5 12a5.5 5.5 0 1 0 0-11 5.5 5.5 0 0 0 0 11zM13 6.5a6.5 6.5 0 1 1-13 0 6.5 6.5 0 0 1 13 0z'/%3E%3Cpath d='M10.344 11.758a.5.5 0 0 0 .707 0l3.85 3.85a.5.5 0 0 0 .708-.708l-3.85-3.85a.5.5 0 0 0-.707.707z'/%3E%3Cpath fill-rule='evenodd' d='M6.5 3a.5.5 0 0 1 .5.5V6h2.5a.5.5 0 0 1 0 1H7v2.5a.5.5 0 0 1-1 0V7H3.5a.5.5 0 0 1 0-1H6V3.5a.5.5 0 0 1 .5-.5z'/%3E%3C/svg%3E") 16 16, zoom-in;
}

.lightbox.open .lightbox-img-wrap img {
  transform: scale(1);
}

.lightbox-img-wrap.zoomed img {
  max-height: none;
  width: auto;
  max-width: calc(100vw - 120px);
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='%23c084fc' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M6.5 12a5.5 5.5 0 1 0 0-11 5.5 5.5 0 0 0 0 11zM13 6.5a6.5 6.5 0 1 1-13 0 6.5 6.5 0 0 1 13 0z'/%3E%3Cpath d='M10.344 11.758a.5.5 0 0 0 .707 0l3.85 3.85a.5.5 0 0 0 .708-.708l-3.85-3.85a.5.5 0 0 0-.707.707z'/%3E%3Cpath fill-rule='evenodd' d='M3 6.5a.5.5 0 0 1 .5-.5h6a.5.5 0 0 1 0 1h-6a.5.5 0 0 1-.5-.5z'/%3E%3C/svg%3E") 16 16, zoom-out;
  transform: scale(1);
}

/* placeholder full view */
.lightbox-placeholder {
  width: min(700px, calc(100vw - 120px));
  height: min(420px, calc(100vh - 120px));
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 5rem;
  border: 1px solid rgba(168, 85, 247, 0.2);
  transform: scale(0.92);
  transition: transform 0.3s cubic-bezier(.22, 1, .36, 1);
}

.lightbox.open .lightbox-placeholder {
  transform: scale(1);
}

/* nav arrows */
.lb-arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(13, 13, 26, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(168, 85, 247, 0.3);
  color: #c084fc;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s;
  z-index: 2;
}

.lb-arrow:hover {
  background: rgba(168, 85, 247, 0.25);
  border-color: #a855f7;
  transform: translateY(-50%) scale(1.1);
}

.lb-arrow.disabled {
  opacity: 0.25;
  cursor: default;
}

.lb-arrow.disabled:hover {
  background: rgba(13, 13, 26, 0.85);
  transform: translateY(-50%) scale(1);
}

#lbPrev {
  left: 16px;
}

#lbNext {
  right: 16px;
}

/* top bar */
.lb-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: linear-gradient(to bottom, rgba(3, 3, 10, 0.9), transparent);
  z-index: 3;
}

.lb-counter {
  font-size: 12px;
  color: rgba(168, 85, 247, 0.8);
  font-weight: 600;
  letter-spacing: 0.08em;
  background: rgba(13, 13, 26, 0.7);
  backdrop-filter: blur(8px);
  padding: 4px 14px;
  border-radius: 50px;
  border: 1px solid rgba(168, 85, 247, 0.2);
}

.lb-close-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(13, 13, 26, 0.8);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(168, 85, 247, 0.3);
  color: #c084fc;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

.lb-close-btn:hover {
  background: rgba(168, 85, 247, 0.2);
  transform: scale(1.1);
}

/* thumbnail strip */
.lb-strip {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 20px;
  background: linear-gradient(to top, rgba(3, 3, 10, 0.92), transparent);
  z-index: 3;
  overflow-x: auto;
  scrollbar-width: none;
}

.lb-strip::-webkit-scrollbar {
  display: none;
}

.lb-thumb {
  flex-shrink: 0;
  width: 52px;
  height: 36px;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
  opacity: 0.5;
}

.lb-thumb:hover {
  opacity: 0.85;
}

.lb-thumb.active {
  border-color: #a855f7;
  opacity: 1;
}

.lb-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lb-thumb.ph {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

/* gradient orb */
@keyframes orbFloat {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(20px, -25px) scale(1.06);
  }
}

.blob {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 200px;
  height: 200px;
  border-radius: 100%;
  background-image: linear-gradient(#7c3aed 10%, #a855f7);
  filter: blur(120px);
  transition: all 300ms ease-out;
  position: fixed;
  pointer-events: none;
  left: 0;
  top: 0;
  transform: translate(calc(-50% + 15px), -50%);
  z-index: -1;
}

/* Hide scrollbar for elements with .no-scrollbar */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}