/* ==========================================================
   MB DESIGN — MOBILE RESPONSIVENESS
   Consolidated Bootstrap Studio stylesheet
   Keep menu animations and hero styling in menu-fix.css.
   ========================================================== */

/* 1. General mobile layout */

@media (max-width: 576px) {
  html {
    overflow-x: hidden;
  }
}

@media (max-width: 576px) {
  body {
    max-width: 100%;
    overflow-x: clip;
  }
}

@media (max-width: 576px) {
  img, .container, .container-fluid {
    max-width: 100%;
  }
}

/* 2. Portfolio introduction and spacing */

@media (max-width: 576px) {
  .portfolio-intro-text {
    font-size: 19px !important;
    line-height: 1.55 !important;
    letter-spacing: normal !important;
    font-weight: 400 !important;
    max-width: 100% !important;
    min-height: 0 !important;
    margin: 0 0 24px !important;
    overflow-wrap: break-word;
  }
}

@media (max-width: 576px) {
  body.portfolio-page main.main {
    padding-top: 85px !important;
  }
}

@media (max-width: 576px) {
  body.portfolio-page main.main > div:first-child, body.portfolio-page main.main > div:first-child .container, body.portfolio-page main.main > div:first-child .row, body.portfolio-page main.main > div:first-child .col {
    min-height: 0 !important;
    height: auto !important;
  }
}

@media (max-width: 576px) {
  body.portfolio-page .page-title {
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
  }
}

@media (max-width: 576px) {
  body.portfolio-page .page-title > .heading {
    height: auto !important;
    min-height: 0 !important;
    padding: 25px 0 15px !important;
    margin: 0 !important;
  }
}

@media (max-width: 576px) {
  body.portfolio-page .portfolio-intro-text {
    font-size: 19px !important;
    line-height: 1.55 !important;
    margin: 0 !important;
  }
}

/* 3. Portfolio filters and project cards */

@media (max-width: 576px) {
  #portfolio {
    padding-top: 30px !important;
    padding-bottom: 45px !important;
    scroll-margin-top: 80px;
  }
}

@media (max-width: 576px) {
  body.portfolio-page #portfolio {
    padding-top: 20px !important;
  }
}

@media (max-width: 576px) {
  #portfolio .section-title h2 {
    font-size: 26px !important;
    line-height: 1.3 !important;
  }
}

@media (max-width: 576px) {
  #portfolio .section-title p {
    font-size: 17px !important;
    line-height: 1.5 !important;
  }
}

@media (max-width: 576px) {
  #portfolio .portfolio-filters {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center;
    align-items: center;
    gap: 10px 12px;
    width: 100%;
    padding: 0 8px !important;
    margin: 0 0 24px !important;
  }
}

@media (max-width: 576px) {
  #portfolio .portfolio-filters li {
    margin: 0 !important;
    padding: 4px 0 !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
    white-space: nowrap;
  }
}

@media (max-width: 576px) {
  #portfolio .portfolio-container, #portfolio .portfolio-item {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 576px) {
  #portfolio .portfolio-item {
    margin-bottom: 22px;
  }
}

@media (max-width: 576px) {
  #portfolio .portfolio-item, #portfolio .portfolio-item * {
    box-sizing: border-box;
  }
}

@media (max-width: 576px) {
  #portfolio .portfolio-item img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 6px;
  }
}

@media (max-width: 576px) {
  .holo-card, .holo-card-wrapper, .portfolio-holo-card {
    max-width: 100%;
  }
}

@media (max-width: 576px) {
  .holo-card, .portfolio-holo-card {
    border-radius: 8px;
  }
}

@media (max-width: 576px) {
  body.portfolio-page #header {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 576px) {
  body.portfolio-page #header .container-fluid {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }
}

/* 4. Individual project-detail pages */

@media (max-width: 576px) {
  .portfolio-details .container {
    padding-left: 16px;
    padding-right: 16px;
  }
}

@media (max-width: 576px) {
  .portfolio-details h1, .portfolio-details h2 {
    font-size: clamp(22px, 6vw, 28px);
    line-height: 1.25;
  }
}

@media (max-width: 576px) {
  .portfolio-details p {
    font-size: 15px;
    line-height: 1.6;
  }
}

@media (max-width: 576px) {
  .portfolio-details img {
    max-width: 100%;
    height: auto;
  }
}

@media (max-width: 576px) {
  .portfolio-details .back-button {
    width: fit-content;
    max-width: 100%;
  }
}

/* 5. About-page introduction
     The imported About introduction consists of five inline-sized
     spans inside .page-title .col-auto. */

@media (max-width: 576px) {
  .about-intro-text {
    font-size: clamp(19px, 5.5vw, 24px) !important;
    line-height: 1.5 !important;
    letter-spacing: normal !important;
    max-width: 100% !important;
    overflow-wrap: normal;
    word-break: normal;
  }
}

@media (max-width: 576px) {
  .about-intro-text span, .about-intro-text strong, .about-intro-text em {
    font-size: inherit !important;
    line-height: inherit !important;
  }
}

@media (max-width: 576px) {
  .page-title {
    min-height: 0 !important;
    height: auto !important;
  }
}

@media (max-width: 576px) {
  .page-title > .heading {
    min-height: 0 !important;
    height: auto !important;
    padding-top: 100px !important;
    padding-bottom: 24px !important;
  }
}

@media (max-width: 576px) {
  .page-title .col-auto {
    width: 100% !important;
    max-width: 100% !important;
    overflow-wrap: break-word;
  }
}

@media (max-width: 576px) {
  .page-title .col-auto > span {
    font-family: 'PT Mono', monospace !important;
    font-size: clamp(18px, 5vw, 22px) !important;
    line-height: 1.6 !important;
    letter-spacing: normal !important;
  }
}

@media (max-width: 576px) {
  .page-title .col-auto > span.d-inline-block {
    max-width: 100%;
  }
}

/* 6. Swiper testimonials — preserve JS-calculated slide widths */

@media (max-width: 576px) {
  #testimonials {
    padding-top: 95px !important;
    padding-bottom: 40px !important;
    scroll-margin-top: 75px;
  }
}

@media (max-width: 576px) {
  #testimonials .section-title {
    padding-bottom: 24px !important;
    text-align: center;
  }
}

@media (max-width: 576px) {
  #testimonials .section-title h2 {
    font-size: 26px !important;
    line-height: 1.3 !important;
    margin-bottom: 12px !important;
  }
}

@media (max-width: 576px) {
  #testimonials .swiper {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }
}

@media (max-width: 576px) {
  #testimonials .swiper-wrapper {
    align-items: stretch;
  }
}

@media (max-width: 576px) {
  #testimonials .swiper-slide {
    box-sizing: border-box;
    height: auto;
    padding: 0 8px 30px;
  }
}

@media (max-width: 576px) {
  #testimonials .testimonial-item {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    height: 100%;
    min-height: 0 !important;
    padding: 22px 20px !important;
    margin: 0 !important;
    border-radius: 12px !important;
  }
}

@media (max-width: 576px) {
  #testimonials .testimonial-item p {
    font-size: 15px !important;
    line-height: 1.6 !important;
    margin-bottom: 18px !important;
  }
}

@media (max-width: 576px) {
  #testimonials .testimonial-item h3 {
    font-size: 17px !important;
    line-height: 1.3 !important;
    margin: 16px 0 4px !important;
  }
}

@media (max-width: 576px) {
  #testimonials .testimonial-item h4 {
    font-size: 13px !important;
    line-height: 1.4 !important;
    margin: 0 !important;
  }
}

@media (max-width: 576px) {
  #testimonials .swiper-pagination {
    position: relative;
    margin-top: 14px;
  }
}

/* 7. Resume introduction */

@media (max-width: 576px) {
  body.resume-page .page-title .heading, body.resume-page .page-title .heading span, body.resume-page .page-title .heading p {
    font-size: clamp(19px, 5.5vw, 23px) !important;
    line-height: 1.5 !important;
    letter-spacing: normal !important;
  }
}

@media (max-width: 576px) {
  body.resume-page .page-title, body.resume-page .page-title .heading {
    height: auto !important;
    min-height: 0 !important;
  }
}

@media (max-width: 576px) {
  body.resume-page .page-title .heading {
    padding-top: 95px !important;
    padding-bottom: 24px !important;
  }
}

@media (max-width: 576px) {
  body.resume-page .page-title .container {
    width: 100%;
    max-width: 100%;
  }
}

/* 8. Contact icons — retain original lime circle backgrounds.
   The actual imported classes are ion-ios-telephone and
   ion-ios-email-outline, NOT ion-ios-mail or ion-ios-email. */

#contact .info-item i.ion-ios-telephone, #contact .info-item i.ion-ios-email-outline {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

#contact .info-item i.ion-ios-telephone {
  font-size: 0 !important;
}

#contact .info-item i.ion-ios-telephone::before {
  content: "\f5c1";
  font-family: "bootstrap-icons" !important;
  font-size: 24px !important;
}

#contact .info-item i.ion-ios-email-outline::before {
  content: "" !important;
  display: block !important;
  width: 24px !important;
  height: 24px !important;
  background-color: #151515 !important;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M3 5h18v14H3V5zm2 2v.4l7 5.25 7-5.25V7H5zm14 3-7 5.25L5 10v7h14v-7z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M3 5h18v14H3V5zm2 2v.4l7 5.25 7-5.25V7H5zm14 3-7 5.25L5 10v7h14v-7z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* 9. Breakpoint refinements */

@media (max-width: 360px) {
  .portfolio-intro-text {
    font-size: 17px !important;
    line-height: 1.55 !important;
  }
}

@media (max-width: 360px) {
  #portfolio .portfolio-filters {
    gap: 8px !important;
  }
}

@media (max-width: 360px) {
  #portfolio .portfolio-filters li {
    font-size: 12px !important;
  }
}

@media (min-width: 390px) and (max-width: 576px) {
  .portfolio-intro-text {
    font-size: 20px !important;
  }
}

@media (min-width: 390px) and (max-width: 576px) {
  body.portfolio-page .portfolio-intro-text {
    font-size: 19px !important;
  }
}

@media (min-width: 390px) and (max-width: 576px) {
  #portfolio .portfolio-item {
    margin-bottom: 26px;
  }
}

@media (hover: none) and (pointer: coarse) {
  .holo-card, .portfolio-holo-card {
    transition: transform 0.25s ease;
  }
}

@media (prefers-reduced-motion: reduce) {
  .holo-card, .portfolio-holo-card {
    transition: none !important;
  }
}

