/* ==========================================================================
   Google Stitch - Facebook-Style Portfolio Theme
   Jakaria Saikat Dhrobo
   ========================================================================== */

:root {
  --fb-blue: #0866ff;
  --fb-hover: #1877f2;
  --fb-bg: #f0f2f5;
  --surface-white: #ffffff;
  --text-main: #050505;
  --text-sub: #65676b;
  --divider: #e4e6eb;
  --divider-dark: #d8dadf;
  --badge-bg: #e7f3ff;
  --badge-text: #1877f2;
  --card-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  --card-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.12);
  --modal-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
  --font-sans: 'Noto Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Dark Mode Tokens Override */
html.dark {
  --fb-blue: #2d88ff;
  --fb-hover: #4599ff;
  --fb-bg: #18191a;
  --surface-white: #242526;
  --text-main: #e4e6eb;
  --text-sub: #b0b3b8;
  --divider: #393a3b;
  --divider-dark: #4e4f50;
  --badge-bg: #263951;
  --badge-text: #4599ff;
  --card-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  --card-shadow-hover: 0 4px 14px rgba(0, 0, 0, 0.6);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 70px;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--fb-bg);
  color: var(--text-main);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* Dark Mode Comprehensive Overrides */
html.dark body {
  background-color: #18191a !important;
  color: #e4e6eb !important;
}

html.dark header,
html.dark footer,
html.dark section,
html.dark article,
html.dark #mobileMenu,
html.dark .bg-white {
  background-color: #242526 !important;
  border-color: #393a3b !important;
  color: #e4e6eb !important;
}

html.dark .bg-\[\#f0f2f5\],
html.dark .bg-\[\#f8f9fa\] {
  background-color: #1c1e21 !important;
  border-color: #393a3b !important;
  color: #e4e6eb !important;
}

html.dark .bg-\[\#e4e6eb\] {
  background-color: #3a3b3c !important;
  border-color: #4e4f50 !important;
  color: #e4e6eb !important;
}

html.dark .text-\[\#050505\] {
  color: #e4e6eb !important;
}

html.dark .text-\[\#65676b\] {
  color: #b0b3b8 !important;
}

html.dark .border-\[\#e4e6eb\],
html.dark .border-\[\#d8dadf\] {
  border-color: #393a3b !important;
}

html.dark .hover\:bg-\[\#f0f2f5\]:hover {
  background-color: #3a3b3c !important;
}

html.dark .hover\:bg-\[\#e4e6eb\]:hover,
html.dark .hover\:bg-\[\#d8dadf\]:hover {
  background-color: #4e4f50 !important;
}

html.dark .top-nav-link.active {
  background-color: #3a3b3c !important;
  color: #2d88ff !important;
}

html.dark .nav-tab.active {
  color: #2d88ff !important;
  border-color: #2d88ff !important;
}

/* Scrollbar Utility */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Lightbox Modal strictly hidden when inactive */
.lightbox-modal {
  display: none !important;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 0.25s ease-in-out;
}

.lightbox-modal.active {
  display: flex !important;
  opacity: 1;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: var(--modal-shadow);
}

.lightbox-caption {
  margin-top: 1rem;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  background: rgba(0, 0, 0, 0.6);
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.4);
}

/* Image Zoom Cursor */
.zoomable-image {
  cursor: zoom-in;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.zoomable-image:hover {
  opacity: 0.95;
}

/* Card Hover Micro-animations */
.fb-card {
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.fb-card:hover {
  box-shadow: var(--card-shadow-hover);
}

/* Active Nav & Tab Styles */
.nav-tab.active {
  color: var(--fb-blue);
  border-bottom: 3px solid var(--fb-blue);
  font-weight: 700;
}

.top-nav-link.active {
  background-color: var(--fb-bg);
  color: var(--text-main);
  font-weight: 700;
}

/* Mobile Drawer */
#mobile-menu {
  transition: max-height 0.3s ease-in-out, opacity 0.2s ease-in-out;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
}

#mobile-menu.open {
  max-height: 400px;
  opacity: 1;
}

/* Pulse open indicator */
.pulse-green {
  box-shadow: 0 0 0 0 rgba(49, 162, 76, 0.7);
  animation: pulse-green-anim 2s infinite;
}

@keyframes pulse-green-anim {
  0% {
    box-shadow: 0 0 0 0 rgba(49, 162, 76, 0.7);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(49, 162, 76, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(49, 162, 76, 0);
  }
}
