/* ============================================
   CUSTOM STYLES FOR ANIMATED SKILL BARS
   ============================================ */

/* Custom smooth transition for skill bars */
.skill-bar-fill {
    transition: width 1.1s cubic-bezier(0.22, 0.97, 0.36, 1.02);
}

/* Smooth scrolling for the entire page */
body {
    scroll-behavior: smooth;
}

/* Card gradient background utility */
.skills-card-bg {
    background: radial-gradient(circle at 10% 20%, rgba(255, 245, 235, 0.4) 0%, rgba(245, 240, 255, 0.3) 100%);
}

/* Optional: Add hover effect for skill items */
.skill-item {
    transition: transform 0.2s ease, opacity 0.3s ease;
}

.skill-item:hover {
    transform: translateX(4px);
}

/* Custom scrollbar (optional) */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #818cf8, #c084fc);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #6366f1, #a855f7);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .skill-item:hover {
        transform: translateX(2px);
    }
}

/* Print styles (optional) */
@media print {
    .skill-bar-fill {
        transition: none;
        width: attr(data-target-width '%');
    }
    
    .skill-item:hover {
        transform: none;
    }
}
/* Tailwind CSS CDN */
@import url('https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css');

* {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
  background: #0A0C10;
}

/* Default text color on the site's dark background */
body {
  color: #e2e8f0; /* pale gray for general text on dark pages */
}

/* Ensure elements that use clear/light backgrounds keep dark readable text
   (many pages use Tailwind utility classes like 'bg-white' or 'bg-gray-50').
   We scope by matching class name substrings so we don't need to edit HTML. */
[class*="bg-white"],
[class*="bg-white/"],
[class*="bg-gray-50"],
[class*="from-gray-50"],
[class*="bg-amber-50"],
[class*="bg-green-50"],
[class*="bg-blue-50"],
[class*="bg-sky-50"],
[class*="bg-indigo-50"],
[class*="bg-purple-50"],
[class*="bg-pink-50"],
[class*="from-amber-50"],
[class*="from-blue-50"] {
  color: #1f2937; /* Tailwind text-gray-800 */
}

/* Links and direct text inside those light containers should inherit the dark color */
[class*="bg-white"] a,
[class*="bg-white/"] a,
[class*="bg-gray-50"] a,
[class*="from-gray-50"] a,
[class*="bg-amber-50"] a {
  color: inherit;
}

/* Keep the chatbot panel explicit colors (already defined) to avoid inheritance issues */
/* No changes below this line */

/* Ensure native <dialog> is hidden unless opened (prevents non-supported browsers showing dialog content) */
dialog:not([open]) {
  display: none;
}

/* When dialog is opened, ensure it displays as a block element */
dialog[open] {
  display: block;
}

/* Keep header above overlays so links remain clickable */
header {
  position: relative;
  z-index: 60;
}

/* Normalize header logo size to avoid jumps (targets logo image by alt text) */
nav img[alt="Md Rubel Al Mamun"] {
  height: 36px; /* aligns with Tailwind h-9 ~ 36px */
  width: auto;
  display: block;
}

/* Ensure the logo anchor centers the image vertically (fixes jumping/alignment) */
header nav > .flex > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Fix: force header/nav text to remain light when page body uses light bg classes
   (some pages use `body.bg-gray-50` which previously caused inherited dark text). */
header, header a, header button, header nav, header nav a {
  color: #ffffff !important;
}
header .text-gray-400 { color: #cbd5e1 !important; }

/* Mobile-friendly base layout improvements */
html {
  scroll-behavior: smooth;
}

img, video {
  max-width: 100%;
  height: auto;
}

button, input, textarea, select {
  font: inherit;
}

main, section, article, nav, footer, header {
  display: block;
}

.container {
  width: min(100%, 1200px);
  margin: 0 auto;
  padding: 0 1rem;
}

@media (max-width: 768px) {
  body {
    min-width: 0;
  }

  .mx-auto {
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .p-6 {
    padding: 1rem !important;
  }

  .text-4xl {
    font-size: 2rem !important;
  }

  .max-w-7xl {
    max-width: 100% !important;
  }
}

.glass-card {
  background: rgba(18, 22, 28, 0.75);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.3s ease;
}

.glass-card:hover {
  border-color: rgba(249, 115, 22, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 20px 35px -12px rgba(0, 0, 0, 0.5);
}

.gradient-text {
  background: linear-gradient(135deg, #F97316, #FB923C, #FBBF24);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 3s ease infinite;
}

@keyframes shimmer {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.timeline-dot {
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.3);
}

.timeline-item:hover .timeline-dot {
  box-shadow: 0 0 0 6px rgba(249, 115, 22, 0.5);
  background-color: #F97316;
}

.skill-badge {
  background: rgba(249, 115, 22, 0.08);
  border-left: 3px solid #F97316;
  transition: all 0.2s;
}

.skill-badge:hover {
  background: rgba(249, 115, 22, 0.15);
  transform: translateX(5px);
}

.animate-float {
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
}

/* Custom animation delays */
.delay-1000 {
  animation-delay: 1s;
}

/* Ensure smooth transitions for timeline items */
.timeline-item {
  transition: all 0.3s ease;
}

.portfolio-card {
        transition: opacity 0.3s ease, transform 0.3s ease;
        opacity: 1;
        transform: scale(1);
    }
    .filter-btn {
        transition: all 0.3s ease;
        cursor: pointer;
    }
    .filter-btn.active {
        box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    }
    /* Carousel Styles */
    .carousel-container {
        position: relative;
        min-height: 320px;
    }
    
    .carousel-slide {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.5s ease, visibility 0.5s ease;
    }
    
    .carousel-slide.active {
        position: relative;
        opacity: 1;
        visibility: visible;
    }
    
    .carousel-slide img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .dot-active {
        background: linear-gradient(135deg, #3b82f6, #06b6d4) !important;
        width: 24px !important;
        border-radius: 9999px !important;
    }
    
    /* Responsive adjustments */
    @media (max-width: 768px) {
        .carousel-container {
            min-height: 280px;
        }
        
        .carousel-prev,
        .carousel-next {
            width: 32px;
            height: 32px;
        }
    }

    /* Lightbox Animation */
    #lightboxModal {
        transition: opacity 0.3s ease;
    }
    #lightboxModal .relative {
        animation: zoomIn 0.2s ease;
    }
    @keyframes zoomIn {
        from {
            transform: scale(0.95);
            opacity: 0;
        }
        to {
            transform: scale(1);
            opacity: 1;
        }
    }
    /* Custom carousel styling with right-to-left slide transition */
        .carousel-container {
            position: relative;
            width: 100%;
            overflow: hidden;
            background-color: #1f2937; /* fallback dark for loading */
            border-radius: 1rem;
        }

        .carousel-track {
            display: flex;
            transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
            will-change: transform;
        }

        .carousel-slide {
            flex: 0 0 100%;
            position: relative;
            scroll-snap-align: start;
        }

        /* For smooth image handling */
        .carousel-slide img {
            display: block;
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

/* Chatbot widget styles */
#site-chatbot-widget {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9999;
  font-family: 'Inter', system-ui, sans-serif;
}

#site-chatbot-button {
  width: 60px;
  height: 60px;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, #f59e0b, #ec4899);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 20px 35px rgba(15, 23, 42, 0.35);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

#site-chatbot-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 45px rgba(15, 23, 42, 0.45);
}

#site-chatbot-panel {
  width: min(380px, calc(100vw - 32px));
  max-height: 76vh;
  display: none;
  flex-direction: column;
  background: rgba(8, 11, 20, 0.96);
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 34px 70px rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(18px);
  margin-bottom: 14px;
}

#site-chatbot-panel.active {
  display: flex;
}

#site-chatbot-panel .chatbot-header {
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

#site-chatbot-panel .chatbot-title {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.01em;
}

#site-chatbot-panel .chatbot-status {
  font-size: 0.82rem;
  color: #94a3b8;
}

#site-chatbot-panel .chatbot-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chatbot-message {
  max-width: 100%;
  display: inline-flex;
  gap: 10px;
}

.chatbot-message.bot {
  justify-content: flex-start;
}

.chatbot-message.user {
  justify-content: flex-end;
}

.chatbot-message-content {
  padding: 12px 14px;
  border-radius: 20px;
  line-height: 1.5;
  color: #e2e8f0;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.18);
}

.chatbot-message.bot .chatbot-message-content {
  background: rgba(30, 41, 59, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.chatbot-message.user .chatbot-message-content {
  background: linear-gradient(135deg, #fb923c, #f43f5e);
  color: white;
}

#site-chatbot-panel .chatbot-suggestions {
  padding: 12px 16px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

#site-chatbot-panel .chatbot-suggestion {
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #f8fafc;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

#site-chatbot-panel .chatbot-suggestion:hover {
  background: rgba(249, 115, 22, 0.18);
  transform: translateY(-1px);
}

#site-chatbot-panel .chatbot-form {
  border-top: 1px solid rgba(148, 163, 184, 0.15);
  display: flex;
  gap: 10px;
  padding: 14px 16px;
  align-items: center;
}

#site-chatbot-panel .chatbot-input {
  flex: 1;
  min-width: 0;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.9);
  color: #e2e8f0;
  padding: 12px 16px;
  outline: none;
  font-size: 0.95rem;
}

#site-chatbot-panel .chatbot-input::placeholder {
  color: rgba(226, 232, 240, 0.6);
}

#site-chatbot-panel .chatbot-send {
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #f97316, #fb7185);
  color: white;
  font-weight: 700;
  padding: 12px 16px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

#site-chatbot-panel .chatbot-send:hover {
  transform: translateY(-1px);
}

#site-chatbot-panel .chatbot-close {
  border: none;
  background: transparent;
  color: #cbd5e1;
  cursor: pointer;
  font-size: 1.1rem;
}

#site-chatbot-panel .chatbot-close:hover {
  color: #ffffff;
}

@media (max-width: 640px) {
  #site-chatbot-widget {
    right: 12px;
    bottom: 12px;
  }
  #site-chatbot-panel {
    width: calc(100vw - 24px);
    max-height: 72vh;
    border-radius: 20px;
  }
}

        /* Gradient overlays for text readability */
        .slide-caption {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 60%, transparent 100%);
            padding: 1.5rem 1.5rem 1.25rem 1.5rem;
        }

        /* Dots active style */
        .dot-active {
            background: #10b981 !important;
            width: 1.5rem !important;
            border-radius: 9999px !important;
        }

        /* Navigation buttons hover effect */
        .carousel-btn {
            transition: all 0.2s ease;
            backdrop-filter: blur(2px);
        }

        .carousel-btn:hover {
            background: white;
            transform: scale(1.05);
            box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
        }

        /* Responsive height adjustments */
        @media (max-width: 768px) {
            .slide-caption {
                padding: 1rem;
            }
            .carousel-btn {
                width: 2rem;
                height: 2rem;
            }
        }


        
    /* Accessibility fixes: ensure footer text is readable on both light and dark pages */
    footer {
      color: #6b7280; /* Tailwind text-gray-500 */
    }
    footer a {
      color: #f59e0b; /* accent for links (orange) */
    }

    /* Testimonial readability: keep quote background/foreground consistent */
    .testimonial-quote {
      background: rgba(250,249,255,0.95); /* near-white card background for quotes */
      color: #374151; /* text-gray-700 for good contrast */
      border-left-color: #f59e0b !important;
    }
    .testimonial-quote p, .testimonial-quote span, .testimonial-quote a {
      color: inherit;
    }

    /* If a footer uses a dark theme class, ensure links remain readable */
    .footer-dark, footer.footer-dark {
      color: #cbd5e1; /* lighter text on dark footers */
    }
    .footer-dark a, footer.footer-dark a {
      color: #f8fafc;
    }

    .footer-note {
      color: #4b5563; /* muted gray for small footer notes */
    }


