/* global styles */

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: "Montserrat", sans-serif;
  background: linear-gradient(to bottom, #fffaf7, #ffffff);
}

a {
  text-decoration: none;
  color: inherit;
}

b {
  font-weight: 600;
}

/* Addtional styles */

.expand {
  cursor: pointer;
}

.highlight {
  opacity: 1;
  animation: highlight-pulse 1.5s ease-in-out;
}

@keyframes highlight-pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 #bf4803;
  }
  70% {
    transform: scale(1.05);
    box-shadow: 0 0 50px 10px #bf480380;
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 #bf48032d;
  }
}

.other-skills {
  opacity: 0.7;
}

.skills-grid:hover .other-skills {
  opacity: 1;
}

.subtle-hover {
  border: 1px solid transparent;
  transition: all 0.2s ease-in-out !important;
  border-radius: 0.8rem;
}

.subtle-hover:hover, .subtle-hover.is-hovered {
  border-color: rgba(130, 124, 116, 0.3);
  background: rgba(130, 124, 116, 0.1);
}

.flag-icon {
  display: inline-block;
  width: 1rem;
  height: 1rem;
}

.flag-icon.Bangladesh {
  background: url("../images/flags/bd.png") no-repeat center center / contain;
}

.skill-item {
  cursor: pointer;
}

.skill-logo {
  width: 3rem;
  /* border-radius: 50%; */
  object-fit: cover;
  transition: all 0.3s ease-in-out;
}

.bi.bi-circle {
  animation: pulse 2s infinite;
  display: inline-block;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }

  40% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.5);
  }

  60% {
    transform: scale(1);
  }

  100% {
    transform: scale(1);
  }
}

.blob {
  position: fixed;
  z-index: -1;
  right: -15px;
  top: -15px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(to bottom, #2b2623, rgb(0, 0, 0));
  transition: all 0.5s ease-in-out;
  pointer-events: none;
}

.slow-transition {
  transition: all 0.5s ease-in-out !important;
}
.slow-transition-group > * {
  transition: all 0.5s ease-in-out !important;
}

/* Dark mode blob */
.dark .blob {
  right: 0;
  top: 0;
  width: 100%;
  height: 100%;
  border-radius: 0;
  transform: scale(2);
}

.heading-font {
  font-family: "Open Sans", sans-serif;
}


.gradient-follow {
  position: fixed;
  top: 0;
  left: 0;
  width: 800px;
  height: 800px;
  margin-left: -400px;
  margin-top: -400px;
  pointer-events: none;
  z-index: 9999;

  background: radial-gradient(circle closest-side,
      rgba(255, 115, 0, 0.05),
      rgba(255, 115, 0, 0));

  opacity: 0;
  /* Initially hidden until JS kicks in to prevent flash at top-left */
  transition: opacity 0.5s ease;
  /* Fade in */
  will-change: transform;
}

/* animations */

.zoom-in {
  opacity: 0;
  animation: zoom-in 0.5s ease-in-out forwards;
}

@keyframes zoom-in {
  from {
    opacity: 0;
    transform: scale(0.7);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.fade-up {
  opacity: 0;
  animation: fade-up 0.5s ease-in-out forwards;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

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

.fade-right {
  opacity: 0;
  animation: fade-right 0.5s ease-in-out forwards;
}

@keyframes fade-right {
  from {
    opacity: 0;
    transform: translateX(20px);
  }

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

.fade-left {
  opacity: 0;
  animation: fade-left 0.5s ease-in-out forwards;
}

@keyframes fade-left {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }

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

/* custom classes */

.smaller {
  font-size: 0.75rem;
}

.mini {
  font-size: 0.65rem;
}

.micro {
  font-size: 0.5rem;
}

.reset-input {
  border: none;
  outline: none;
  background-color: transparent;
  padding: 0;
  color: inherit;
}

.reset-input::placeholder {
  color: inherit;
  opacity: 0.5;
}

/* Tooltip Styles */
.custom-tooltip {
  position: absolute;
  z-index: 10000;
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: 0.5rem;
  pointer-events: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  white-space: normal;
  max-width: 250px;
  line-height: 1.4;
  text-align: center;
}

/* Light mode tooltip (default) */
.custom-tooltip {
  background-color: #1f2937;
  /* gray-800 */
  color: #ffffff;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Dark mode overrides (applied via body class if available or media query) */
.dark .custom-tooltip {
  background-color: #f3f4f6;
  /* gray-100 */
  color: #111827;
  /* gray-900 */
}

/* Tooltip Arrow */
.custom-tooltip::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 100%;
  /* Bottom arrow */
  transform: translateX(-50%);
  border-width: 4px;
  border-style: solid;
  border-color: #1f2937 transparent transparent transparent;
}

.dark .custom-tooltip::after {
  border-color: #f3f4f6 transparent transparent transparent;
}

.custom-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

.no-transition {
  transition: none !important;
}

/* @media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }

  .fade-up,
  .fade-right,
  .fade-left,
  .zoom-in {
    opacity: 1;
    transform: translateY(0);
  }
} */

/* Project Popup Styles */
#project-modal {
  display: flex; /* Always flex but hidden */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  padding: 2rem;
  background: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

#project-modal.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.glass-card {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 2rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.2);
  max-width: 1000px;
  height: 570px;
  width: 100%;
  position: relative;
  /* Animation Start State */
  transform: scale(0.9) translateY(30px);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#project-modal.active .glass-card {
  transform: scale(1) translateY(0);
}

.dark .glass-card {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Modal Controls */
.modal-close, .nav-btn {
  cursor: pointer;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transition: all 0.3s ease;
  flex-shrink: 0;
  color: black;
}

.dark .modal-close, .dark .nav-btn {
  background: rgba(0, 0, 0, 0.4);
  color: white;
}

.modal-close:hover {
  background: rgba(255, 0, 0, 0.4);
  transform: rotate(90deg);
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: scale(1.1);
}

.dark .nav-btn:hover {
  background: rgba(87, 60, 60, 0.2);
}

.nav-btn:active {
  transform: scale(0.95);
}

.no-scrollbar {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}

.masked-down {
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    black 0%,
    black 80%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    black 0%,
    black 80%,
    transparent 100%
  );
  padding-bottom: 5rem;
}

.collage-container {
  display: block;
  padding: 1rem;
  position: relative;
  height: 100%;
  overflow: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    black 5%,
    black 80%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    black 5%,
    black 80%,
    transparent 100%
  );
  padding-bottom: 5rem;
}

.collage-container::-webkit-scrollbar {
  display: none;
}

.collage-item {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  transition: transform 0.3s ease;
  margin-bottom: 1rem;
}

/* .collage-item:first-child {
  grid-column: span 2;
  height: 250px;
} */

/* .collage-item:not(:first-child) {
  height: 150px;
} */

.collage-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.collage-item:hover img {
  transform: scale(1.1);
}

.project-details-pane {
  padding: 3rem 2rem 3rem 1rem;
}

.project-pill {
  padding: 0.25rem 0.75rem;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 1rem;
  font-size: 0.8rem;
  display: inline-block;
  margin-bottom: 1rem;
}

.dark .project-pill {
  background: rgba(0, 0, 0, 0.4);
}

.spin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  vertical-align: middle;
  animation: spin 1s linear infinite;
  transform-origin: center;   
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Skeleton Loading Animation */
.skeleton-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 0.75rem;
}

.skeleton-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  background: linear-gradient(90deg, 
    rgba(200, 200, 200, 0.3) 0%, 
    rgba(200, 200, 200, 0.6) 50%, 
    rgba(200, 200, 200, 0.3) 100%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: 0.75rem;
}

.dark .skeleton-wrapper::before {
  background: linear-gradient(90deg, 
    rgba(80, 80, 80, 0.4) 0%, 
    rgba(100, 100, 100, 0.6) 50%, 
    rgba(80, 80, 80, 0.4) 100%);
  background-size: 200% 100%;
}

@keyframes skeleton-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.skeleton-wrapper img,
.skeleton-wrapper video {
  position: relative;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
}

.skeleton-wrapper.loaded::before {
  opacity: 0;
  animation: none;
}

.skeleton-wrapper.loaded img,
.skeleton-wrapper.loaded video {
  opacity: 1;
}

/* mobile animation */
@media (max-width: 768px) {
  #project-modal {
    padding: 1rem;
    justify-content: flex-start;
    align-items: flex-start;
  }
  .glass-card {
    flex-direction: column;
    height: 100%;
    overflow: auto;
  }
  .collage-pane {
    height: 300px;
    padding: 1rem !important; /* Override p-12 */
  }
  .social-icons > * {
    padding: 1rem;
  }
  .collage-container {
    height: auto;
    -webkit-mask-image: none;
    mask-image: none;
  }
  .masked-down {
    -webkit-mask-image: none;
    mask-image: none;
    padding-bottom: 0;
  }
  .project-details-pane {
    padding: 1rem;
  }
  /* Mobile Lightbox Adjustments */
  .lightbox-close {
    top: 15px;
    right: 20px;
  }
}

/* Lightbox Styles */
#lightbox {
  position: fixed;
  z-index: 10001; /* Higher than project modal */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
}

#lightbox.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.lightbox-content {
  max-width: 1300px;
  max-height: 90%;
  object-fit: contain;
  object-fit: contain;
  touch-action: none;
}

@media (max-width: 768px) {
  .lightbox-content {
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: cover;
  }
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10002;
  transition: color 0.3s;
}

.lightbox-close:hover {
  color: #bbb;
}

/* Hide scrollbar when lightbox is open */
body.lightbox-open {
  overflow: hidden;
}

.glance-card {
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    black 10%,
    black 95%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    black 10%,
    black 95%,
    transparent 100%
  );
}