/* =====================================================
   THEME COLORS  (সব রঙ এখান থেকে নিয়ন্ত্রণ হয়)
===================================================== */

/* Dark mode (default) */
body {
  --bg: #0b0f14;            /* সব সেকশন + Hero + Footer-এর একই background */
  --card: #0f172a;          /* কার্ডের background */
  --card-alt: #111827;      /* Project কার্ড */
  --text: #ffffff;
  --heading: #ffffff;
  --muted: #cbd5e1;
  --muted-soft: #94a3b8;
  --chip: #1e293b;
  --skill: #15191e;
  --input: #3f3f3f;
  --placeholder: #d1d5db;
  --shadow: 0 0 0 1px rgba(255, 255, 255, 0.05);
  --shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.5);
  --line: rgba(255, 255, 255, 0.08);
}

/* Light mode */
body.light-mode {
  --bg: #f8fafc;
  --card: #ffffff;
  --card-alt: #ffffff;
  --text: #0f172a;
  --heading: #0f172a;
  --muted: #475569;
  --muted-soft: #64748b;
  --chip: #e2e8f0;
  --skill: #e2e8f0;
  --input: #ffffff;
  --placeholder: #64748b;
  --shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.15);
  --line: rgba(0, 0, 0, 0.08);
}

/* =========================
   GLOBAL
========================= */
html {
  scroll-behavior: smooth;
}

body {
  padding-top: var(--nav-h, 115px); /* navbar-এর আসল উচ্চতা (JS থেকে আসে) */
  font-family: 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  animation: pageFade 0.6s ease;
}

@keyframes pageFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

body,
section,
.custom-nav,
.custom-footer,
.info-box,
.project-box,
.certificate-card,
.education-card,
.contact-form,
.follow-box {
  transition: background-color 0.3s ease, color 0.3s ease;
}

a {
  text-decoration: none;
}

/* =========================
   NAVBAR
========================= */
.custom-nav {
  background: rgba(0, 0, 0, 0.9);
}

.custom-logo {
  text-align: center;
  font-size: xx-small;
  font-style: italic;
}

/* স্ক্রল করলে যে সেকশনে আছেন, মেনুতে সেটা লাল */
.custom-nav .nav-link.active {
  color: #dc3545 !important;
}

body.light-mode .custom-nav {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --bs-navbar-color: rgba(0, 0, 0, 0.65);
  --bs-navbar-hover-color: #000;
  --bs-navbar-active-color: #000;
  --bs-navbar-toggler-border-color: rgba(0, 0, 0, 0.25);
}

body.light-mode .custom-nav .navbar-toggler-icon {
  filter: invert(1);
}

body.light-mode .custom-logo h3 {
  color: #000;
}

/* Dark / Light থিম বাটন: বর্ডার ছাড়া, গোল */
#themeToggle {
  width: 40px;
  height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  font-size: 1.1rem;
  line-height: 1;
  transition: background 0.3s ease, transform 0.3s ease;
}

#themeToggle:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: rotate(20deg);
}

body.light-mode #themeToggle {
  background: rgba(0, 0, 0, 0.07);
}

body.light-mode #themeToggle:hover {
  background: rgba(0, 0, 0, 0.14);
}

/* =========================
   সব সেকশনে একই gap + একই background
========================= */
section {
  padding: 30px 0;
  min-height: auto;
  background: var(--bg);
  color: var(--text);
  scroll-margin-top: var(--nav-h, 115px); /* fixed navbar-এর নিচে হেডিং ঢাকা পড়বে না */
}

/* Skills সেকশনে HTML-এ bg-dark / text-white আছে, সেটা এখানে থিমের সাথে মেলানো হলো */
#skills {
  background: var(--bg) !important;
  color: var(--text) !important;
}

#skills .section-title {
  color: var(--heading) !important;
}

/* Bootstrap-এর g-4 / g-5 gutter-এর সাথে mt-2 / mt-4 মিলে যে বাড়তি gap হতো, সেটা বন্ধ */
section > .container > .row {
  margin-top: calc(-1 * var(--bs-gutter-y)) !important;
}

/* সব সেকশন টাইটেল একই সাইজ, নিচে একই gap */
.section-title,
.contact-title {
  text-align: center;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 3rem;
}

/* =========================
   HERO SECTION
========================= */
.hero-section {
  display: flex;
  align-items: flex-start;
  padding-top: 30px;
}

.hero-section h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-top: 0;
}

/* =========================
   HERO BUTTONS
========================= */
.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.hero-buttons .btn {
  padding: 14px 32px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 30px;
  transition: all 0.3s ease;
}

.hire-btn {
  background: linear-gradient(135deg, #f43f5e, #ec4899);
  color: #ffffff;
  box-shadow: 0 8px 25px rgba(244, 63, 94, 0.4);
}

.hire-btn:hover {
  transform: translateY(-4px);
  background: #0d6efd;
  color: #ffffff;
}

.cv-btn {
  background: linear-gradient(135deg, #f43f5e, #ec4899);
  color: #ffffff;
  border: 2px solid #f43f5e;
}

.cv-btn:hover {
  background: #0d6efd;
  color: #ffffff;
  transform: translateY(-4px);
}

/* =========================
   TYPING CURSOR
========================= */
.cursor {
  font-weight: bold;
  animation: blink 1s infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* =========================
   INFO BOX (About + Contact)
========================= */
.info-box {
  background: var(--card);
  box-shadow: var(--shadow);
  padding: 18px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 18px;
}

.info-icon {
  width: 60px;
  height: 60px;
  background: #ffffff;
  color: #000;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.info-box h6 {
  margin: 0;
  font-weight: 600;
  color: var(--heading);
}

.info-box p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

/* =========================
   SKILLS
========================= */
.skill-card {
  background: var(--skill);
  color: var(--text);
  padding: 20px;
  border-radius: 8px;
  transition: 0.3s;
}

.skill-card:hover {
  background: #0d6efd;
  color: #ffffff;
}

/* =========================
   EDUCATION
========================= */
.education-card {
  background: var(--card);
  box-shadow: var(--shadow);
  padding: 28px;
  border-radius: 14px;
  display: flex;
  gap: 18px;
  align-items: flex-start;
  transition: 0.4s ease;
  height: 100%;
}

.education-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.edu-icon {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, #f43f5e, #ec4899);
  color: #ffffff;
  font-size: 22px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.edu-content h5 {
  margin-bottom: 6px;
  font-weight: 700;
  color: var(--heading);
}

.edu-institute {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.edu-date {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.85rem;
  color: var(--muted-soft);
}

/* =========================
   PROJECTS
========================= */
.project-box {
  background: var(--card-alt);
  box-shadow: var(--shadow);
  border-radius: 14px;
  overflow: hidden;
  transition: 0.4s ease;
  height: 100%;
}

.project-box img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.project-content {
  padding: 20px;
  color: var(--text);
}

.project-content h5 {
  font-weight: 700;
  margin-bottom: 10px;
}

.project-content p {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 18px;
}

.project-btn {
  background: linear-gradient(135deg, #f43f5e, #ec4899);
  color: #fff;
  font-size: 0.85rem;
  padding: 8px 18px;
  border-radius: 20px;
  transition: 0.3s;
}

.project-btn:hover {
  background: #0d6efd;
  color: #fff;
}

.project-box:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

/* =========================
   CERTIFICATES
========================= */
.certificate-card {
  background: var(--card);
  box-shadow: var(--shadow);
  padding: 28px 22px 35px;
  border-radius: 16px;
  text-align: center;
  position: relative;
  transition: 0.4s ease;
  height: 100%;
}

.certificate-card::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  height: 4px;
  width: 100%;
  background: linear-gradient(135deg, #f43f5e, #ec4899);
  border-radius: 0 0 16px 16px;
}

.certificate-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-hover);
}

.cert-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 15px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f43f5e, #ec4899);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #ffffff;
}

.certificate-card h5 {
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--heading);
}

.cert-title {
  color: #f43f5e;
  font-weight: 600;
  font-size: 0.95rem;
}

.cert-desc {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 14px 0;
}

.cert-tags {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.cert-tags span {
  padding: 4px 10px;
  font-size: 0.75rem;
  border-radius: 12px;
  background: var(--chip);
  color: var(--text);
}

.cert-btn {
  display: inline-block;
  padding: 10px 24px;
  background: linear-gradient(135deg, #f43f5e, #ec4899);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 22px;
  transition: 0.3s;
}

.cert-btn:hover {
  background: #0d6efd;
  color: #ffffff;
}

/* =========================
   CONTACT
========================= */
.follow-box {
  background: var(--card);
  box-shadow: var(--shadow);
  padding: 18px;
  border-radius: 10px;
}

.follow-box h6 {
  margin-bottom: 10px;
  color: var(--heading);
}

.follow-icons {
  display: flex;
  gap: 12px;
}

.follow-icons a {
  width: 38px;
  height: 38px;
  background: #ffffff;
  color: #000;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.3s;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.follow-icons a:hover {
  background: #0d6efd;
  color: #fff;
}

.contact-form {
  background: var(--card);
  box-shadow: var(--shadow);
  padding: 30px;
  border-radius: 12px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  background: var(--input);
  border: 1px solid transparent;
  padding: 12px;
  margin-bottom: 15px;
  color: var(--text);
  border-radius: 5px;
}

body.light-mode .contact-form input,
body.light-mode .contact-form textarea {
  border-color: #cbd5e1;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--placeholder);
}

.contact-form button {
  width: 100%;
  background: #f43f5e;
  border: none;
  padding: 12px;
  color: #ffffff;
  font-weight: 600;
  border-radius: 6px;
  transition: 0.3s;
}

.contact-form button:hover {
  background: #e11d48;
}

/* =========================
   FOOTER
========================= */
.custom-footer {
  background: var(--bg);
  border-top: 1px solid var(--line);
  padding: 60px 0 40px;
  text-align: center;
  color: var(--text);
}

.footer-title {
  font-size: 1.1rem;
  margin-bottom: 25px;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-bottom: 25px;
}

.social-icons a {
  width: 48px;
  height: 48px;
  background: #ffffff;
  color: #000000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: 0.3s ease;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.social-icons a:hover {
  transform: translateY(-5px);
  background: #0d6efd;
  color: #ffffff;
}

.footer-copy {
  font-size: 0.9rem;
  color: var(--muted);
}

/* =========================
   PAGE LOADER
========================= */
#page-loader {
  position: fixed;
  inset: 0;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

#page-loader.active {
  opacity: 1;
  pointer-events: all;
}

.loader-content {
  text-align: center;
  animation: pageFade 0.6s ease;
}

/* <!-- Page Loader (শুধু প্রথমবার splash) --> */
/* .loader-logo {
  width: 70px;
  height: 70px;
  background: #ec3155;
  color: #fff;
  font-size: 32px;
  font-weight: 700;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  animation: rotateLogo 1.5s linear infinite;
}

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

.loader-name {
  font-size: 3.6rem;
  font-weight: 700;
  color: #ec3155;
  margin-bottom: 6px;
}

.loader-title {
  font-size: 3.6rem;
  font-weight: 700;
  color: #fff;
}

.loader-title span {
  color: #ec3155;
} */

/* 
body.light-mode .loader-title {
  color: #000;
} */


.loader-dots span {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin: 0 4px;
  background: #f87171;
  border-radius: 50%;
  animation: dotBlink 1.2s infinite both;
}

.loader-dots span:nth-child(2) { animation-delay: .15s; }
.loader-dots span:nth-child(3) { animation-delay: .3s; }

@keyframes dotBlink {
  0% { opacity: .2; }
  20% { opacity: 1; }
  100% { opacity: .2; }
}

body.light-mode #page-loader {
  background: #fff;
}


/* লোডারের লোগো: সাইজ + হালকা পালস অ্যানিমেশন */
.loader-img {
  width: min(420px, 80vw);
  height: auto;
  margin-bottom: 28px;
  animation: logoPulse 1.8s ease-in-out infinite;
}

@keyframes logoPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.04);
    opacity: 0.85;
  }
}

/* =========================
   MOBILE
========================= */
@media (max-width: 576px) {
  .hero-section h1 {
    font-size: 2rem;
  }

  .loader-name,
  .loader-title {
    font-size: 2.4rem;
  }
}

.site-logo {
  height: 50px;
  width: auto;
  display: block;
}

/* Dark mode (ডিফল্ট): dark লোগো দেখাবে, light লোগো লুকানো */
.logo-light {
  display: none;
}

/* Light mode: dark লোগো লুকাবে, light লোগো দেখাবে */
body.light-mode .logo-dark {
  display: none;
}

body.light-mode .logo-light {
  display: block;
}


/* ===== মোবাইল ফিক্স ===== */

/* ১) পেজ ডানে-বামে নড়া বন্ধ */
html {
  overflow-x: hidden;
}

body {
  overflow-x: clip;
}

/* g-5 row মোবাইলে container-এর বাইরে বেরোত, সেটার মূল কারণ ঠিক করা */
@media (max-width: 991.98px) {
  .row.g-5 {
    --bs-gutter-x: 1.5rem;
  }
}

/* ২) আইকন চ্যাপ্টা না হয়ে গোল থাকবে, জায়গা কম হলে পরের লাইনে যাবে */
.social-icons,
.follow-icons {
  flex-wrap: wrap;
}

.social-icons a,
.follow-icons a {
  flex-shrink: 0;
}

/* ছোট মোবাইলে আইকন একটু ছোট, যাতে ছয়টা এক লাইনে ধরে */
@media (max-width: 400px) {
  .social-icons {
    gap: 12px;
  }

  .social-icons a {
    width: 42px;
    height: 42px;
    font-size: 18px;
  }

  .follow-icons {
    gap: 10px;
  }
}

/* ৩) Contact-এর লম্বা ইমেইল বক্সের বাইরে না যায় */
.info-box > div {
  min-width: 0;
}

.info-box p {
  overflow-wrap: anywhere;
}