html {
  scroll-behavior: smooth;
}

.section {
  min-height: 100vh;
  padding-top: 100px; /* navbar offset */
  display: flex;
  align-items: center;
  position: relative;
}

.hero-title {
  font-size: clamp(1.6rem, 1rem + 2vw, 2.35rem);
  font-weight: 500;
}

/* ── Home – technology badges ────────────────────────────────────── */
.tech-badge {
  display: inline-block;
  background: rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 100px;
  padding: 0.25rem 0.8rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: #374151;
}

.bubbles-container {
  pointer-events: none;
}

@keyframes bounce-down {
  0%, 100% { transform: translateY(0);    }
  50%       { transform: translateY(8px); }
}

.btn-cta {
  position: relative;
  z-index: 2;
  padding: 0.44rem 1.4rem;
  animation: bounce-down 1.6s ease-in-out infinite;
}

.pointer-bubble {
  position: absolute;
  background-color: #212529; /* matches portfolio bg-dark */
  padding: 6px 12px;
  border-radius: 12px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.35);
  z-index: 1; /* under navbar */
  display: inline-block;
  text-align: center;
  width: auto;
  min-width: 0;
}

/* Arrow pointing down */
.pointer-bubble::after {
  content: '';
  position: absolute;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 8px 8px 0 8px;
  border-color: #212529 transparent transparent transparent;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
}

.pointer-bubble.arrow-up::after {
  content: '';
  position: absolute;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 8px 8px 8px;
  border-color: transparent transparent #212529 transparent;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
}

.pointer-bubble code {
  display: inline-block;
  background-color: transparent;
  color: #d4d4d4;
  padding: 4px 8px;
  border-radius: 6px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.85rem;
  white-space: nowrap; /* keep single line */
  max-width: none;
  overflow: visible;
  text-overflow: initial;
}

/* Navbar on top */
.navbar { z-index: 1030; }


.vertical-separator {
  width: 2px;
  height: 100%;
  min-height: 200px;
  background-color: rgba(255, 255, 255, 0.3);
}

/* ── Portfolio image stack ──────────────────────────────────────── */
.img-stack {
  position: relative;
  width: 370px;
  height: 260px;
  margin: 0 auto;
  isolation: isolate; /* keep z-index inside the stack */
}

.stack-img {
  position: absolute;
  width: 155px;
  height: 115px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.55);
  /* All cards share a single bottom-center pivot – fan like a card hand */
  bottom: 60px;        /* pivot sits 60px above container bottom */
  left: 50%;
  margin-left: -77px;  /* -(width/2) */
  transform-origin: bottom center;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

/* bottom card – tilted left (front), shifted 70px left */
.stack-bottom {
  transform: rotate(-20deg);
  z-index: 3;
  margin-left: -147px; /* -(77 + 70) */
}

/* middle card – horizontal, centered */
.stack-middle {
  transform: rotate(0deg);
  z-index: 2;
  /* uses base margin-left: -77px */
}

/* top card – tilted right (back), shifted 70px right */
.stack-top {
  transform: rotate(20deg);
  z-index: 1;
  margin-left: -7px;   /* -(77 - 70) */
}

/* hover: scale up while keeping rotation */
.stack-img:hover {
  z-index: 10;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.8);
}
.stack-bottom:hover { transform: rotate(-20deg) scale(1.35); }
.stack-middle:hover { transform: rotate(0deg)   scale(1.35); }
.stack-top:hover    { transform: rotate(20deg)  scale(1.35); }

/* ── 6-card fan (Custom Tooling) ────────────────────────────────── */
/* Container is wider to fit six evenly-spaced cards              */
.img-stack-5 { width: 540px; }

/* card positions: 55 px between adjacent cards, pivot at bottom center */
.stack-c1 { transform: rotate(-35deg); z-index: 6; margin-left: -214.5px; } /* -(77+137.5) */
.stack-c2 { transform: rotate(-21deg); z-index: 5; margin-left: -159.5px; } /* -(77+82.5)  */
.stack-c3 { transform: rotate(-7deg);  z-index: 4; margin-left: -104.5px; } /* -(77+27.5)  */
.stack-c4 { transform: rotate(7deg);   z-index: 3; margin-left:  -49.5px; } /* -(77-27.5)  */
.stack-c5 { transform: rotate(21deg);  z-index: 2; margin-left:    5.5px; } /* -(77-82.5)  */
.stack-c6 { transform: rotate(35deg);  z-index: 1; margin-left:   60.5px; } /* -(77-137.5) */

.stack-c1:hover { transform: rotate(-35deg) scale(1.35); }
.stack-c2:hover { transform: rotate(-21deg) scale(1.35); }
.stack-c3:hover { transform: rotate(-7deg)  scale(1.35); }
.stack-c4:hover { transform: rotate(7deg)   scale(1.35); }
.stack-c5:hover { transform: rotate(21deg)  scale(1.35); }
.stack-c6:hover { transform: rotate(35deg)  scale(1.35); }

/* ── Portfolio modal ────────────────────────────────────────────── */
#portfolioModal .modal-content {
  background: #111;
  border: 1px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

#portfolioModal .modal-body img {
  max-height: 82vh;
  object-fit: contain;
}

.modal-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  border: none;
  font-size: 2rem;
  padding: 0.5rem 0.3rem;
  cursor: pointer;
  z-index: 10;
  transition: background 0.15s ease;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-nav-btn:hover { background: rgba(0, 0, 0, 0.78); }
.modal-nav-prev { left: 0;  border-radius: 0 6px 6px 0; }
.modal-nav-next { right: 0; border-radius: 6px 0 0 6px; }

/* ── How do I work – horizontal process flow ─────────────────────── */
.focus-callout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  max-width: 640px;
  margin: 0 auto 3rem;
  padding: 1.25rem 1.5rem;
  border-radius: 12px;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
}

.focus-callout .focus-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
}

.focus-callout .focus-icon {
  font-size: 1.4rem;
  line-height: 1;
  flex-shrink: 0;
}

.focus-callout .focus-title {
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.focus-callout .focus-hint {
  font-size: 0.8rem;
  color: #64748b;
  margin: 0;
}

.how-steps {
  display: flex;
  align-items: flex-start;
  position: relative;
  padding-top: 10px;
  padding-bottom: 1rem;
}

/* gradient connector line behind all circles */
.how-steps::before {
  content: '';
  position: absolute;
  top: 38px;          /* circle center: 10px padding + 56px/2 */
  left: 10%;
  right: 10%;
  height: 2px;
  background: linear-gradient(
    to right,
    #1e4d8c  0%,
    #166534 25%,
    #4c0a7d 50%,
    #9a3412 75%,
    #334155 100%
  );
  z-index: 0;
}

.how-step {
  flex: 1;
  text-align: center;
  padding: 0 0.75rem;
}

.step-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  border: 3px solid #f8f9fa;  /* matches bg-light – cuts circle off the line */
  position: relative;
  z-index: 1;
}

.step-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.45rem;
  line-height: 1.3;
}

.step-text {
  font-size: 1rem;
  color: #6b7280;
  line-height: 1.5;
  margin: 0;
}

/* ── Mobile: vertical timeline ───────────────────────────────────── */
@media (max-width: 767px) {
  .how-steps {
    flex-direction: column;
    padding-top: 0;
  }

  /* vertical gradient line along left edge */
  .how-steps::before {
    top: 0;
    bottom: 0;
    left: 27px;          /* center of 56px circle */
    right: auto;
    width: 2px;
    height: auto;
    background: linear-gradient(
      to bottom,
      #1e4d8c  0%,
      #166534 25%,
      #4c0a7d 50%,
      #9a3412 75%,
      #334155 100%
    );
  }

  .how-step {
    display: flex;
    align-items: flex-start;
    text-align: left;
    gap: 1.25rem;
    padding: 0 0 2.5rem;
  }

  .step-circle {
    flex-shrink: 0;
    margin: 0;
  }

  .step-title { font-size: 1.05rem; margin-top: 0.3rem; }
}

/* ── Contact section ─────────────────────────────────────────────── */
.contact-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 11px;
  padding: 1.4rem 1rem;
  text-align: center;
  height: 100%;
  cursor: pointer;
  transition: background 0.22s ease, border-color 0.22s ease;
}

.contact-card:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.22);
}

.contact-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.85rem;
}

.contact-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.4rem;
}

.contact-value {
  color: #fff;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  word-break: break-all;
}

.contact-value:hover {
  color: #fff;
  text-decoration: underline;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 1.1rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-badge.status-open {
  background: rgba(74, 222, 128, 0.12);
  border-color: rgba(74, 222, 128, 0.35);
  color: #4ade80;
}

.status-badge.status-open .status-dot {
  background: #4ade80;
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.25);
}

.status-badge.status-busy {
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.35);
  color: #f87171;
}

.status-badge.status-busy .status-dot {
  background: #f87171;
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.25);
}

.status-badge-floating {
  position: fixed;
  right: 20px;
  top: 96px;
  z-index: 1020; /* below navbar (1030), above page content */
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  transition: opacity 0.25s ease, transform 0.25s ease, box-shadow 0.2s ease;
}

/* High-contrast white pill so it reads clearly over both light and dark sections;
   status color still comes through via the dot, not the fill. */
.status-badge-floating.status-open,
.status-badge-floating.status-busy {
  background-color: #ffffff;
  color: #1e293b;
  border-color: rgba(0, 0, 0, 0.08);
}

.status-badge-floating:hover {
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  transform: translateY(-2px);
  color: #1e293b;
}

.status-badge-floating.is-hidden {
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
}

@media (max-width: 767px) {
  .status-badge-floating {
    right: 12px;
    top: 84px;
    font-size: 0.72rem;
    padding: 0.35rem 0.85rem;
  }
}

.expectation-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 100px;
  padding: 0.45rem 1.1rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.9);
  white-space: nowrap;
}
