/* ============================= */
/* PORTFOLIO UPDATES - CLEAN    */
/* ============================= */

/* ===== Navbar small polish ===== */
.navbar-nav {
  flex-wrap: nowrap !important;
}

.navbar {
  white-space: nowrap;
}

.navbar-nav .nav-item {
  margin-left: 8px;
  margin-right: 8px;
}

.navbar-nav .nav-link {
  font-size: 14px;
  padding-left: 8px !important;
  padding-right: 8px !important;
}

.navbar-social li {
  margin-left: 10px;
}

.navbar-collapse {
  justify-content: space-between;
}

#sound-toggle,
#theme-toggle {
  transition: transform 0.2s ease, color 0.2s ease;
}

#sound-toggle:hover,
#theme-toggle:hover {
  transform: scale(1.08);
}

/* ============================= */
/* CERTIFICATIONS SLIDER        */
/* ============================= */

.cert-slider-wrapper {
  position: relative;
  overflow: hidden;
  margin-top: 40px;
  width: 100%;
}

.cert-track {
  display: flex;
  width: 100%;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.cert-slide {
  flex: 0 0 33.333333%;
  max-width: 33.333333%;
  padding: 10px;
  box-sizing: border-box;
  display: flex;
}

.cert-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100%;
  background: rgba(20, 20, 20, 0.7);
  backdrop-filter: blur(12px);
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 204, 0, 0.32);
  text-decoration: none !important;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.cert-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 18px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255,204,0,0.9), transparent 35%, rgba(255,204,0,0.7));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.55;
  pointer-events: none;
}

.cert-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 18px 40px rgba(255, 204, 0, 0.14);
}

.cert-image {
  width: 100%;
  height: 210px;
  object-fit: contain;
  background: #000;
  padding: 12px;
  display: block;
  transition: transform 0.4s ease;
}

.cert-card:hover .cert-image {
  transform: scale(1.05);
}

.cert-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.cert-badge {
  display: inline-block;
  width: fit-content;
  background: linear-gradient(135deg, #ffcc00, #ffd84d);
  color: #000;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
}

.cert-title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  line-height: 1.35;
  margin: 0;
}

.cert-issuer {
  font-size: 14px;
  font-weight: 600;
  color: #ffcc00;
  margin: 0;
}

.cert-desc {
  font-size: 13px;
  line-height: 1.6;
  color: #aaaaaa;
  margin: 0;
}

.cert-nav {
  position: absolute;
  top: 38%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.72);
  border: none;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  padding: 10px 14px;
  cursor: pointer;
  z-index: 5;
  border-radius: 10px;
  transition: background 0.25s ease, transform 0.25s ease, color 0.25s ease;
}

.cert-prev {
  left: 10px;
}

.cert-next {
  right: 10px;
}

.cert-nav:hover {
  background: #ffcc00;
  color: #000;
  transform: translateY(-50%) scale(1.06);
}

/* ===== Tablet ===== */
@media (max-width: 991.98px) {
  .cert-slide {
    flex: 0 0 50%;
    max-width: 50%;
  }

  .cert-image {
    height: 200px;
  }
}

/* ===== Mobile ===== */
@media (max-width: 767.98px) {
  .cert-slide {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .cert-image {
    height: 180px;
  }

  .cert-body {
    padding: 18px;
  }

  .cert-title {
    font-size: 17px;
  }

  .cert-nav {
    top: 34%;
    font-size: 22px;
    padding: 8px 12px;
  }
}


/* ============================= */
/* 🔥 ABOUT INFO THEME FIX      */
/* ============================= */

/* Label (Name:, Address:) */
.about-info li span:first-child {
  font-weight: 600;
  min-width: 140px;
  color: var(--heading-color);
}

/* Value (Debjit, Mumbai...) */
.about-info li span:last-child {
  color: var(--text-color);
}

/* Spacing */
.about-info li {
  margin-bottom: 10px;
  transition: color 0.3s ease;
}

/* Light mode fix (force visibility) */
body.light-mode .about-info li span:first-child {
  color: #000 !important;
}

body.light-mode .about-info li span:last-child {
  color: #444 !important;
}

/* Dark mode fix */
body.dark-mode .about-info li span:first-child {
  color: #fff !important;
}

body.dark-mode .about-info li span:last-child {
  color: #ccc !important;
}

/* ============================= */
/* 🔥 PROJECT COUNT FIX         */
/* ============================= */

/* Number (12) */
.number {
  color: var(--primary-color);
  font-weight: 700;
}

/* Text (Project complete) */
.number + span {
  color: var(--text-color);
}

/* Light mode fix */
body.light-mode .number {
  color: #ffcc00 !important;
}

body.light-mode .number + span {
  color: #333 !important;
}

/* Dark mode fix */
body.dark-mode .number {
  color: #ffcc00 !important;
}

body.dark-mode .number + span {
  color: #aaa !important;
}

/* ============================= */
/* KARYASAARTHI AI MODALS FINAL */
/* ============================= */

.karya-project-card {
  cursor: pointer;
}

.karya-project-card .text h3 a {
  pointer-events: none;
}

.karya-modal .modal-dialog {
  max-width: 880px;
}

.karya-modal-content {
  position: relative;
  background: rgba(12, 12, 12, 0.97);
  border: 1px solid rgba(255, 204, 0, 0.28);
  border-radius: 24px;
  padding: 34px 30px 26px;
  color: #fff;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
}

.karya-modal-content::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 24px;
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(255, 204, 0, 0.8),
    rgba(255, 204, 0, 0.12),
    rgba(255, 204, 0, 0.5)
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.karya-modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  z-index: 5;
  transition: transform 0.2s ease, color 0.2s ease;
}

.karya-modal-close:hover {
  color: var(--primary-color);
  transform: scale(1.08);
}

.karya-modal-header {
  text-align: center;
  margin-bottom: 20px;
}

.karya-modal-header h2 {
  color: #fff;
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 8px;
  line-height: 1.15;
}

.karya-modal-subtitle {
  color: var(--primary-color);
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 0;
}

.karya-modal-body {
  text-align: center;
}

.karya-modal-desc {
  color: #d0d0d0;
  font-size: 16px;
  line-height: 1.9;
  max-width: 700px;
  margin: 0 auto 26px;
}

.karya-modal-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 8px;
}

.karya-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 14px 18px;
  border-radius: 16px;
  text-decoration: none !important;
  font-weight: 700;
  font-size: 15px;
  color: #fff !important;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 204, 0, 0.18);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  cursor: pointer;
}

button.karya-btn {
  appearance: none;
  outline: none;
}

.karya-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(255, 204, 0, 0.12);
  background: rgba(255, 204, 0, 0.08);
}

.karya-btn-primary {
  background: linear-gradient(135deg, #ffcc00, #ffd84d);
  color: #000 !important;
  border-color: transparent;
}

.karya-btn-primary:hover {
  background: linear-gradient(135deg, #ffd84d, #ffcc00);
  color: #000 !important;
}

.karya-tech-modal-content .karya-modal-body {
  text-align: left;
}

.karya-tech-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 8px;
}

.karya-tech-card {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 204, 0, 0.14);
  border-radius: 18px;
  padding: 18px 18px 16px;
}

.karya-tech-card-wide {
  grid-column: 1 / -1;
}

.karya-tech-card h4 {
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 14px;
}

.karya-tech-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.karya-tech-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 204, 0, 0.08);
  border: 1px solid rgba(255, 204, 0, 0.18);
  color: #f3f3f3;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 999px;
  line-height: 1.2;
}

.karya-tech-summary {
  margin-top: 18px;
  padding: 18px 18px 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.karya-tech-summary p {
  color: #c2c2c2;
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 0;
  text-align: left;
}

.karya-tech-back-wrap {
  display: flex;
  justify-content: center;
  margin-top: 22px;
}

.karya-back-btn {
  min-width: 190px;
}

@media (max-width: 991.98px) {
  .karya-modal .modal-dialog {
    max-width: calc(100% - 32px);
  }

  .karya-tech-layout {
    grid-template-columns: 1fr;
  }

  .karya-tech-card-wide {
    grid-column: auto;
  }
}

@media (max-width: 767.98px) {
  .karya-modal .modal-dialog {
    max-width: calc(100% - 18px);
    margin: 14px auto;
  }

  .karya-modal-content {
    padding: 26px 16px 18px;
    border-radius: 18px;
  }

  .karya-modal-header {
    margin-bottom: 16px;
  }

  .karya-modal-header h2 {
    font-size: 28px;
  }

  .karya-modal-subtitle {
    font-size: 14px;
    line-height: 1.5;
  }

  .karya-modal-desc {
    font-size: 14px;
    line-height: 1.75;
    margin-bottom: 18px;
  }

  .karya-modal-buttons {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .karya-btn {
    min-height: 50px;
    font-size: 14px;
    padding: 12px 14px;
    border-radius: 14px;
  }

  .karya-tech-layout {
    gap: 12px;
  }

  .karya-tech-card {
    padding: 14px 14px 12px;
    border-radius: 14px;
  }

  .karya-tech-card h4 {
    font-size: 18px;
    margin-bottom: 10px;
  }

  .karya-tech-chip {
    font-size: 12px;
    padding: 7px 10px;
  }

  .karya-tech-summary {
    margin-top: 14px;
    padding: 14px 4px 2px;
  }

  .karya-tech-summary p {
    font-size: 13px;
    line-height: 1.7;
  }

  .karya-modal-close {
    top: 10px;
    right: 12px;
    font-size: 28px;
  }
}

/* ===== Karya Tech Modal Smaller + Scrollable ===== */

#karyaTechStackModal .modal-dialog {
  max-width: 760px !important;
  width: calc(100% - 40px) !important;
  margin: 20px auto !important;
}

#karyaTechStackModal .karya-modal-content {
  max-height: 88vh !important;
  overflow: hidden !important;
  border-radius: 20px !important;
}

#karyaTechStackModal .karya-modal-scroll {
  max-height: 88vh !important;
  overflow-y: auto !important;
  padding: 24px 22px 20px !important;
}

#karyaTechStackModal .karya-modal-header h2 {
  font-size: 30px !important;
  line-height: 1.2 !important;
}

#karyaTechStackModal .karya-modal-subtitle {
  font-size: 15px !important;
}

#karyaTechStackModal .karya-tech-summary-top {
  padding: 14px 14px 6px !important;
  margin-bottom: 14px !important;
}

#karyaTechStackModal .karya-tech-summary-top p {
  font-size: 14px !important;
  line-height: 1.7 !important;
}

#karyaTechStackModal .karya-tech-layout {
  gap: 12px !important;
}

#karyaTechStackModal .karya-tech-card {
  padding: 14px 14px 12px !important;
  border-radius: 14px !important;
}

#karyaTechStackModal .karya-tech-card h4 {
  font-size: 18px !important;
  margin-bottom: 10px !important;
}

#karyaTechStackModal .karya-tech-chip {
  font-size: 12px !important;
  padding: 7px 10px !important;
}

#karyaTechStackModal .karya-tech-back-wrap {
  margin-top: 16px !important;
}

#karyaTechStackModal .karya-back-btn {
  min-width: 160px !important;
}

/* Tablet */
@media (max-width: 991.98px) {
  #karyaTechStackModal .modal-dialog {
    max-width: 700px !important;
    width: calc(100% - 24px) !important;
  }

  #karyaTechStackModal .karya-tech-layout {
    grid-template-columns: 1fr !important;
  }
}

/* Mobile / iPhone */
@media (max-width: 767.98px) {
  #karyaTechStackModal .modal-dialog {
    width: calc(100% - 12px) !important;
    margin: 8px auto !important;
  }

  #karyaTechStackModal .karya-modal-content {
    max-height: 92vh !important;
    border-radius: 16px !important;
  }

  #karyaTechStackModal .karya-modal-scroll {
    max-height: 92vh !important;
    padding: 18px 12px 14px !important;
  }

  #karyaTechStackModal .karya-modal-header h2 {
    font-size: 24px !important;
  }

  #karyaTechStackModal .karya-modal-subtitle {
    font-size: 13px !important;
  }

  #karyaTechStackModal .karya-tech-summary-top p {
    font-size: 13px !important;
    line-height: 1.65 !important;
  }

  #karyaTechStackModal .karya-tech-card {
    padding: 12px 12px 10px !important;
  }

  #karyaTechStackModal .karya-tech-card h4 {
    font-size: 16px !important;
  }

  #karyaTechStackModal .karya-tech-chip {
    font-size: 11px !important;
    padding: 6px 9px !important;
  }
}

/* ===== Custom Scrollbar (Karya Modal) ===== */

/* Chrome, Edge, Safari */
#karyaTechStackModal .karya-modal-scroll::-webkit-scrollbar {
  width: 6px;
}

#karyaTechStackModal .karya-modal-scroll::-webkit-scrollbar-track {
  background: transparent;
}

#karyaTechStackModal .karya-modal-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 204, 0, 0.6);
  border-radius: 10px;
}

#karyaTechStackModal .karya-modal-scroll::-webkit-scrollbar-thumb:hover {
  background: #ffcc00;
}

/* Firefox */
#karyaTechStackModal .karya-modal-scroll {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 204, 0, 0.6) transparent;
}