/* ==========================================================================
   Custom overrides for Md. Nafiz Ahmed's portfolio.
   Loaded after main.css so these win without editing the vendor stylesheet.
   ========================================================================== */

/* --- Hero cutout ---------------------------------------------------------
   A transparent-background portrait cutout, same asset type the template's
   .banner-three-man slot expects. The source is 433x576 (the template's own
   was 1122x1402), so it needs an explicit width to sit at a comparable scale,
   stepping down with the heavily-scaled banner headline behind it. */
.banner-three-man img {
  width: 100%;
  max-width: 430px;
  height: auto;
}

@media screen and (max-width: 1399px) {
  .banner-three-man img {
    max-width: 360px;
  }
}

@media screen and (max-width: 1199px) {
  .banner-three-man img {
    max-width: 300px;
  }
}

@media screen and (max-width: 991px) {
  .banner-three-man img {
    max-width: 240px;
  }
}

@media screen and (max-width: 767px) {
  .banner-three-man img {
    max-width: 180px;
  }
}

@media screen and (max-width: 575px) {
  .banner-three-man img {
    max-width: 135px;
  }
}

/* --- Portraits elsewhere ------------------------------------------------- */
.about-portrait {
  aspect-ratio: 4/5;
  object-fit: cover;
}

.footer-portrait {
  aspect-ratio: 1/1;
  object-fit: cover;
}

/* --- Project cards -------------------------------------------------------
   Cards now carry up to three action buttons (live / client / server), so the
   row must wrap instead of overflowing on narrow screens. */
.portfolio-three-button {
  display: flex;
  flex-wrap: wrap;
  gap: var(--size-2);
}

.portfolio-thumb img {
  aspect-ratio: 16/9;
  object-fit: cover;
}

/* Tag chips are plain labels now (not links), so restore the bordered look
   the template gave the anchor version. */
.portfolio-three-list ul li span {
  display: inline-block;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 100px;
  padding: 6px 18px;
  font-size: 0.85rem;
  transition: 0.3s;
}

.portfolio-three-item:hover .portfolio-three-list ul li span {
  border-color: var(--main-two-600);
  color: var(--main-two-600);
}

/* --- Skill thumbs --------------------------------------------------------
   Custom SVGs are authored at the template's 552x257 pill ratio; keep them
   from stretching and let them scale down cleanly on small screens. */
.service-three-thumb img {
  width: 100%;
  max-width: 552px;
  height: auto;
  aspect-ratio: 552/257;
  object-fit: cover;
  border-radius: 200px;
}

@media screen and (max-width: 767px) {
  .service-three-thumb img {
    border-radius: 100px;
  }
}

/* --- Header --------------------------------------------------------------
   Let the CTA row wrap rather than push into a horizontal scroll on mid sizes. */
.header-right {
  flex-wrap: wrap;
  row-gap: var(--size-2);
  justify-content: flex-end;
}

@media screen and (max-width: 1199px) {
  .header-three-button a,
  .header-right .tw-hover-btn {
    padding-inline: var(--size-6);
  }
}

/* --- Global safety net ---------------------------------------------------
   Nothing should be able to force a horizontal scrollbar on small screens. */
html,
body {
  overflow-x: hidden;
}

img {
  max-width: 100%;
}

/* ==========================================================================
   Visual polish
   ========================================================================== */

/* --- Scroll progress bar -------------------------------------------------
   Thin accent bar across the top that fills as the page scrolls. Width is
   driven by JS (--scroll-progress). */
.scroll-progress {
  position: fixed;
  inset-block-start: 0;
  inset-inline-start: 0;
  height: 3px;
  width: var(--scroll-progress, 0%);
  background: linear-gradient(90deg, var(--main-two-600), #ffb347);
  z-index: 9999;
  transition: width 0.1s linear;
  pointer-events: none;
}

/* --- Available-for-work pulse -------------------------------------------- */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(6px);
}

.status-badge .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #16a34a;
  position: relative;
  flex: none;
}

.status-badge .dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #16a34a;
  animation: statusPulse 2s ease-out infinite;
}

@keyframes statusPulse {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  100% {
    transform: scale(3);
    opacity: 0;
  }
}

/* --- Gradient text accent ------------------------------------------------ */
.accent-gradient {
  background: linear-gradient(100deg, var(--main-two-600), #ff9a3c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* --- Hero headline: subtle animated sheen -------------------------------- */
.banner-three-title {
  background: linear-gradient(
    100deg,
    #0a0a0a 0%,
    #0a0a0a 40%,
    var(--main-two-600) 50%,
    #0a0a0a 60%,
    #0a0a0a 100%
  );
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: headlineSheen 9s ease-in-out infinite;
}

@keyframes headlineSheen {
  0%,
  100% {
    background-position: 130% 50%;
  }
  50% {
    background-position: -30% 50%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .banner-three-title {
    animation: none;
    background: none;
    color: #0a0a0a;
  }

  .status-badge .dot::after {
    animation: none;
  }
}

/* --- Skill rows: lift + accent glow on hover ----------------------------- */
.service-three-single {
  position: relative;
  overflow: hidden;
}

.service-three-single::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    600px circle at var(--mx, 50%) var(--my, 50%),
    rgba(255, 74, 15, 0.14),
    transparent 45%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.service-three-single:hover::before {
  opacity: 1;
}

.service-three-single:hover {
  transform: translateY(-4px);
}

.service-three-thumb img {
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.service-three-single:hover .service-three-thumb img {
  transform: scale(1.05);
}

/* --- Project cards: image zoom + accent frame ---------------------------- */
.portfolio-thumb {
  overflow: hidden;
  position: relative;
}

.portfolio-thumb img {
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.portfolio-three-item:hover .portfolio-thumb img {
  transform: scale(1.06);
}

.portfolio-three-item {
  transition: transform 0.4s ease;
}

.portfolio-three-item:hover {
  transform: translateY(-6px);
}

/* --- Counters: accent the numerals --------------------------------------- */
.banner-three-counter-title .purecounter {
  background: linear-gradient(120deg, var(--main-two-600), #ff9a3c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.banner-three-counter-item.bg-black .banner-three-counter-title .purecounter {
  background: linear-gradient(120deg, #ffb347, #fff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* --- Section heading: small accent rule ----------------------------------
   Only on the About intro heading. The "works" watermark behind the portfolio
   grid is 642px decorative type and must stay unadorned. */
.about-three-title::after {
  content: "";
  display: block;
  width: 72px;
  height: 4px;
  margin: 28px auto 0;
  border-radius: 4px;
  background: var(--main-two-600);
}

/* --- Footer: nicer focus + link affordance ------------------------------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--main-two-600);
  outline-offset: 3px;
  border-radius: 4px;
}
