/* =============================================
   PORTFOLIO RESPONSIVE OPTIMIZATIONS v3.0
   Covers: Mobile, Tablet, Laptop, Desktop
   ============================================= */

/* ===== BASE RESETS & PERFORMANCE ===== */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  width: 100%;
  max-width: 100vw;
  overflow-x: clip;
}

img, video {
  max-width: 100%;
  height: auto;
}

:focus-visible {
  outline: 2px solid rgba(255,255,255,0.5);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ===== PREMIUM SMOOTH MICRO-ANIMATIONS & REVEALS ===== */
.portfolio-card,
.tool-item,
.why-card,
.svc-card-h,
.exp-entry,
.partner-tile,
.faq-item,
.more-works-card {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.3s ease;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Scroll reveal initial states */
.reveal-init {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.9s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s ease !important;
}

.reveal-init.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered reveal delays for grid children (wave effect) */
.why-grid .reveal-init:nth-child(1) { transition-delay: 0ms; }
.why-grid .reveal-init:nth-child(2) { transition-delay: 80ms; }
.why-grid .reveal-init:nth-child(3) { transition-delay: 160ms; }
.why-grid .reveal-init:nth-child(4) { transition-delay: 240ms; }

.portfolio-grid .reveal-init:nth-child(1) { transition-delay: 0ms; }
.portfolio-grid .reveal-init:nth-child(2) { transition-delay: 100ms; }

.mw-cat-grid .reveal-init:nth-child(1) { transition-delay: 0ms; }
.mw-cat-grid .reveal-init:nth-child(2) { transition-delay: 65ms; }
.mw-cat-grid .reveal-init:nth-child(3) { transition-delay: 130ms; }
.mw-cat-grid .reveal-init:nth-child(4) { transition-delay: 195ms; }

.tool-items-row .reveal-init:nth-child(odd)  { transition-delay: 0ms; }
.tool-items-row .reveal-init:nth-child(even) { transition-delay: 60ms; }

/* GPU acceleration — only on the hero layers that animate every scroll frame.
   (will-change on dozens of cards wastes GPU memory and causes scroll jank) */
.hero-img-layer {
  will-change: transform, opacity;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  contain: paint;
}


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

.tool-item:hover {
  transform: translateY(-3px) scale(1.02);
  border-color: rgba(255, 255, 255, 0.28) !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.portfolio-img {
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.portfolio-card:hover .portfolio-img {
  transform: scale(1.04);
}

.portfolio-title {
  transition: color 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.portfolio-card:hover .portfolio-title {
  transform: translateX(4px);
  color: #ffffff;
}

.more-works-thumb img {
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.more-works-card:hover .more-works-thumb img {
  transform: scale(1.04);
}

/* ===== AMBIENT GLOW ===== */
.blur-effect {
  animation: ambientGlow 14s infinite alternate ease-in-out;
}
@keyframes ambientGlow {
  0%   { transform: scale(1) translate(0, 0); opacity: 0.35; }
  33%  { transform: scale(1.12) translate(4vw, 5vh); opacity: 0.55; }
  66%  { transform: scale(1.08) translate(-2vw, 8vh); opacity: 0.45; }
  100% { transform: scale(1) translate(-4vw, -2vh); opacity: 0.35; }
}

/* ===== BUTTON INTERACTIONS ===== */
.button-arrow:active,
.cv2-btn:active,
.form-submit-btn:active {
  transform: scale(0.97);
}

.form-input:focus {
  box-shadow: 0 0 0 3px rgba(255,255,255,0.08);
}

.hero-cap-pill:hover {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.35);
}

/* ===== HERO IMAGE LAYERS — OBJECT POSITION FIX ===== */
/* Layer 1: Hero-abhinav.png */
.hero-img-layer:nth-child(1) img {
  object-position: center 20% !important;
}

/* Layer 2: Hero2-abhinav.png — hidden before Framer Motion initializes */
/* This prevents both images flashing visible before JS loads */
.hero-img-layer:nth-child(2) {
  opacity: 0;
  /* Framer Motion inline style will override this once React loads */
}

/* Dark backdrop behind the hero so there is never a white/empty frame while images decode */
.hero-image-stage {
  background: #070707;
}
.hero-img-layer img {
  height: 100% !important;
  max-width: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* Smooth fade between lightbox images */
.img-modal-img {
  transition: opacity 0.18s ease;
}

/* Make hero scroll wrap taller for a slower, more cinematic cross-fade */
.hero-scroll-wrap {
  height: 220vh !important;
}

.hero-img-layer:nth-child(2) img {
  object-position: center 15% !important;
  object-fit: cover !important;
  width: 100% !important;
  height: 100% !important;
}

/* ===== SERVICES SECTION — HIGH-END AESTHETICS & POLISH ===== */
.svc-h-wrap {
  background: #f0f1f4 !important;
}

.svc-h-sticky {
  background: #f0f1f4 !important;
}

@media (min-width: 769px) {
  .svc-h-sticky {
    position: sticky !important;
    top: 0 !important;
    height: 100vh !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    overflow: hidden !important;
  }

  .svc-h-header {
    padding-top: clamp(85px, 9.5vh, 120px) !important;
    padding-left: clamp(2rem, 5vw, 5rem) !important;
    padding-right: clamp(2rem, 5vw, 5rem) !important;
    padding-bottom: 0.75rem !important;
  }

  .svc-h-viewport {
    position: relative;
    overflow: hidden;
    padding-top: 1rem !important;
    padding-bottom: 2.5rem !important;
  }

  .svc-h-track {
    gap: 28px !important;
    padding-left: clamp(2rem, 5vw, 5rem) !important;
    padding-right: clamp(2rem, 5vw, 5rem) !important;
  }

  /* Right fade hint — teases more cards to the right */
  .svc-h-viewport::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 120px;
    height: 100%;
    background: linear-gradient(to left, #f0f1f4 0%, rgba(240, 241, 244, 0) 100%);
    pointer-events: none;
    z-index: 10;
  }
}

/* Service Header Typography */
.svc-h-dot {
  color: #10b981 !important;
  font-size: 0.9rem !important;
}

.svc-h-label {
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
  color: #6b7280 !important;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
}

.svc-h-title {
  text-transform: uppercase !important;
  letter-spacing: -0.035em !important;
  color: #0f172a !important;
  font-size: clamp(2.4rem, 4.5vw, 3.8rem) !important;
  font-weight: 900 !important;
  line-height: 1 !important;
}

.svc-h-count {
  vertical-align: super !important;
  color: #94a3b8 !important;
  margin-left: 8px !important;
  font-size: 0.42em !important;
  font-weight: 600 !important;
}

.svc-h-sub {
  color: #475569 !important;
  max-width: 380px !important;
  font-size: 0.95rem !important;
  line-height: 1.6 !important;
  font-weight: 500 !important;
}

/* Service Card High-End Styling */
.svc-card-h {
  background: #ffffff !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  border-radius: 22px !important;
  flex-direction: column !important;
  flex-shrink: 0 !important;
  width: clamp(400px, 31vw, 540px) !important;
  box-shadow: 0 12px 36px -8px rgba(0, 0, 0, 0.08), 0 4px 12px -2px rgba(0, 0, 0, 0.04) !important;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
  overflow: hidden !important;
}

.svc-card-h:hover {
  transform: translateY(-8px) scale(1.01) !important;
  box-shadow: 0 24px 50px -12px rgba(0, 0, 0, 0.16), 0 8px 20px -4px rgba(0, 0, 0, 0.08) !important;
  border-color: rgba(15, 23, 42, 0.16) !important;
}

.svc-card-h-img {
  background: #090a0f !important;
  flex-shrink: 0 !important;
  height: 310px !important;
  position: relative !important;
  overflow: hidden !important;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06) !important;
}

.svc-card-h-img img {
  object-fit: cover !important;
  object-position: center top !important;
  width: 100% !important;
  height: 100% !important;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

.svc-card-h:hover .svc-card-h-img img {
  transform: scale(1.04) !important;
}

.svc-card-h-num {
  -webkit-backdrop-filter: blur(12px) !important;
  backdrop-filter: blur(12px) !important;
  color: #0f172a !important;
  background: rgba(255, 255, 255, 0.92) !important;
  border: 1px solid rgba(15, 23, 42, 0.1) !important;
  border-radius: 100px !important;
  padding: 6px 14px !important;
  font-size: 0.76rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.05em !important;
  position: absolute !important;
  top: 16px !important;
  left: 16px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.svc-card-h-body {
  flex-direction: column !important;
  flex: 1 !important;
  gap: 0.85rem !important;
  padding: 1.6rem 1.8rem 1.8rem !important;
  display: flex !important;
}

.svc-card-h-title {
  letter-spacing: -0.02em !important;
  text-transform: uppercase !important;
  color: #0f172a !important;
  font-size: 1.18rem !important;
  font-weight: 800 !important;
  line-height: 1.3 !important;
}

.svc-card-h-desc {
  color: #475569 !important;
  flex: 1 !important;
  font-size: 0.92rem !important;
  line-height: 1.65 !important;
  font-weight: 400 !important;
}

.svc-card-h-tags {
  flex-wrap: wrap !important;
  gap: 7px !important;
  margin-top: 0.4rem !important;
  display: flex !important;
}

.svc-card-h-tag {
  color: #334155 !important;
  background: #f1f5f9 !important;
  white-space: nowrap !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 100px !important;
  padding: 5px 13px !important;
  font-size: 0.74rem !important;
  font-weight: 600 !important;
  transition: all 0.25s ease !important;
}

.svc-card-h:hover .svc-card-h-tag {
  background: #e2e8f0 !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}


/* SECTION CLEARANCE & PADDING UNDER FIXED NAVBAR */
.portfolio-section,
.brands-section,
.about-section-v2,
.experience-section,
.why-section,
.more-works-section,
.faq-section {
  scroll-margin-top: 80px;
}

.portfolio-section {
  padding-top: clamp(75px, 7vw, 110px) !important;
}
.about-section-v2 {
  padding-top: clamp(75px, 7vw, 100px) !important;
}
.why-section {
  padding-top: clamp(75px, 7vw, 100px) !important;
}
.more-works-section {
  padding-top: clamp(75px, 7vw, 100px) !important;
}

/* FLOATING ACTIONS & WHATSAPP POSITION */
.whatsapp-float {
  position: fixed !important;
  bottom: 24px !important;
  right: 24px !important;
  width: 48px !important;
  height: 48px !important;
  border-radius: 50% !important;
  background: #25d366 !important;
  color: #ffffff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4) !important;
  z-index: 9999 !important;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease !important;
  touch-action: manipulation !important;
  animation: waFloatPulse 4s infinite ease-in-out !important;
}
@keyframes waFloatPulse {
  0%, 100% { box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4); }
  50% { box-shadow: 0 8px 28px rgba(37, 211, 102, 0.65), 0 0 15px rgba(37, 211, 102, 0.3); }
}
.whatsapp-float:hover {
  transform: scale(1.1) translateY(-3px) !important;
  box-shadow: 0 12px 30px rgba(37, 211, 102, 0.7) !important;
}
.whatsapp-float svg {
  width: 26px !important;
  height: 26px !important;
}

.back-to-top-btn {
  position: fixed !important;
  bottom: 82px !important;
  right: 24px !important;
  width: 46px !important;
  height: 46px !important;
  border-radius: 50% !important;
  background: rgba(18, 18, 22, 0.92) !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  color: #c5f135 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  z-index: 9999 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateY(14px) scale(0.92) !important;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              background 0.3s ease,
              color 0.3s ease,
              box-shadow 0.3s ease !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5) !important;
  touch-action: manipulation !important;
}
.back-to-top-btn.visible {
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: translateY(0) scale(1) !important;
}
.back-to-top-btn:hover {
  background: #c5f135 !important;
  color: #000000 !important;
  border-color: #c5f135 !important;
  transform: translateY(-3px) scale(1.06) !important;
  box-shadow: 0 10px 28px rgba(197, 241, 53, 0.5) !important;
}
.back-to-top-btn svg {
  width: 20px !important;
  height: 20px !important;
}

.navbar-search-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.85);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.25s ease;
}
.navbar-search-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.4);
  color: #ffffff;
}
.navbar-search-kbd {
  background: rgba(255, 255, 255, 0.14);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-family: monospace;
}


/* ===== LARGE DESKTOP (1400px+) ===== */
@media (min-width: 1400px) {
  .container {
    padding-left: 2.5rem;
    padding-right: 2.5rem;
  }
  .portfolio-grid { gap: 3.5rem; }
  .why-grid { gap: 2.5rem; }
}

/* ===== SMALL LAPTOP (max 1199px) ===== */
@media (max-width: 1199px) {
  .svc-split { grid-template-columns: 1fr 300px; gap: 2rem; }
  .about-v3-grid { grid-template-columns: 1fr 420px; gap: 3rem; }
  .mw-cat-grid { grid-template-columns: repeat(3, 1fr); }
  .exp-ghost-year { font-size: clamp(5rem, 12vw, 9rem); }
}

/* ===== TABLET PORTRAIT (max 1023px) ===== */
@media (max-width: 1023px) {
  .about-sticky-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .about-sticky-left { height: 320px; position: relative; top: 0; }
  .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .faq-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .svc-split { grid-template-columns: 1fr; }
  .svc-panel-wrap { order: -1; position: static; }
  .svc-panel-img-wrap { aspect-ratio: 16/9; }
  .exp-entry { grid-template-columns: 100px 1fr; gap: 0 2rem; }
  .exp-thread { left: 70px; }
  .about-v3-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .about-v3-right { flex-direction: row; gap: 1.5rem; }
  .about-img-box { width: 200px; }
}

/* ===== MOBILE & SMALL TABLET (max 768px) ===== */
@media (max-width: 768px) {
  html, body {
    overflow-x: clip !important;
    -webkit-overflow-scrolling: touch;
  }
  .container {
    padding-left: 1.15rem !important;
    padding-right: 1.15rem !important;
  }

  /* Navigation */
  .navigation-top {
    width: calc(100% - 24px) !important;
    top: 10px !important;
    border-radius: 16px !important;
  }
  .navigation-top.nav-scrolled {
    width: calc(100% - 32px) !important;
    top: 8px !important;
  }
  .navbar {
    height: 54px !important;
  }

  /* Hero */
  .hero-overlay {
    padding: 78px 1.15rem 1.5rem !important;
  }
  .hero-name-word {
    font-size: clamp(2.4rem, 10.5vw, 4.2rem) !important;
    line-height: 0.94 !important;
  }
  .hero-bottom-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 1rem !important;
  }
  .hero-bottom-right {
    align-items: flex-start !important;
    max-width: 100% !important;
  }
  .hero-rotating-wrap {
    text-align: left !important;
  }
  .hero-rotating-text {
    border-left: 2px solid rgba(255,255,255,0.18) !important;
    border-right: none !important;
    padding-left: 0.85rem !important;
    padding-right: 0 !important;
    font-size: 0.88rem !important;
  }
  .hero-caps-row {
    gap: 6px !important;
  }
  .hero-cap-pill {
    font-size: 0.68rem !important;
    padding: 4px 10px !important;
  }
  .hero-scroll-cta {
    display: none !important;
  }

  /* Experience */
  .experience-section {
    padding: 40px 0 50px !important;
  }
  .exp-page-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 1rem !important;
    margin-bottom: 3rem !important;
  }
  .exp-thread {
    left: 14px !important;
  }
  .exp-entry {
    grid-template-columns: 1fr !important;
    gap: 0.6rem !important;
    padding-left: 2rem !important;
    padding-bottom: 3.5rem !important;
  }
  .exp-year-col {
    justify-content: flex-start !important;
    padding-right: 0 !important;
  }
  .exp-year-block {
    flex-direction: row !important;
    align-items: baseline !important;
    gap: 10px !important;
  }
  .exp-dot-wrap {
    position: static !important;
  }
  .exp-ghost-year {
    display: none !important;
  }
  .exp-company-row {
    flex-direction: column !important;
    gap: 0.6rem !important;
  }
  .exp-right-meta {
    align-items: flex-start !important;
  }

  /* Tool Stack */
  .tool-stack-section {
    padding: 30px 0 40px !important;
    margin-top: 0 !important;
  }
  .tool-stack-card {
    padding: 0 1rem !important;
    border-radius: 16px !important;
  }
  .tool-category-row {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
    padding: 1.4rem 0 !important;
  }
  .tool-category-label {
    font-size: 0.72rem !important;
    border-bottom: 1px solid rgba(255,255,255,0.1) !important;
    padding-bottom: 0.5rem !important;
  }
  .tool-items-row {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
  .tool-item {
    width: 100% !important;
    flex: unset !important;
    padding: 0.7rem 0.85rem !important;
    border-radius: 12px !important;
    gap: 8px !important;
  }
  .tool-name {
    font-size: 0.82rem !important;
    white-space: normal !important;
    word-break: break-word !important;
  }
  .tool-desc {
    font-size: 0.68rem !important;
    white-space: normal !important;
  }

  /* Partners */
  .partner-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
  .partner-tile-inner {
    min-height: 70px !important;
    padding: 1rem 0.85rem !important;
    gap: 8px !important;
  }
  .partners-header {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
    margin-bottom: 2rem !important;
  }

  /* About */
  .about-sticky-section {
    padding: 60px 0 !important;
  }
  .about-sticky-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }
  .about-sticky-left {
    height: 280px !important;
    position: relative !important;
    top: 0 !important;
  }
  .about-v3-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }
  .about-v3-right {
    flex-direction: column !important;
    gap: 1.25rem !important;
  }
  .about-img-box {
    width: 100% !important;
    max-height: 340px !important;
    aspect-ratio: 3/2 !important;
  }
  .about-meta-grid {
    border-left: none !important;
    border-top: 1px solid rgba(255,255,255,0.1) !important;
    grid-template-columns: 1fr 1fr !important;
    padding-top: 1.25rem !important;
    padding-left: 0 !important;
    gap: 1rem !important;
  }
  .about-expertise-body {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
    padding-left: 0 !important;
  }
  .about-headline {
    font-size: clamp(1.9rem, 7vw, 3rem) !important;
  }

  /* ===== SERVICES HORIZONTAL SCROLL — MOBILE FIX ===== */
  .svc-h-wrap {
    height: auto !important;
    min-height: unset !important;
    position: relative !important;
    padding-top: 1.5rem !important;
    padding-bottom: 2rem !important;
    scroll-margin-top: 70px !important;
  }

  .svc-h-sticky {
    position: relative !important;
    top: auto !important;
    height: auto !important;
    min-height: unset !important;
    display: block !important;
  }

  .svc-h-header {
    padding: 3rem 1.15rem 1rem !important;
  }
  .svc-h-title {
    font-size: clamp(2rem, 8vw, 3rem) !important;
  }
  .svc-h-sub {
    font-size: 0.9rem !important;
    margin-top: 0.5rem !important;
  }

  .svc-h-viewport {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    scroll-snap-type: x mandatory !important;
    padding: 0.5rem 1.15rem 1.5rem !important;
    scrollbar-width: none !important;
  }
  .svc-h-viewport::-webkit-scrollbar {
    display: none !important;
  }

  .svc-h-track {
    transform: none !important;
    display: flex !important;
    flex-direction: row !important;
    gap: 16px !important;
    padding: 0 !important;
    width: max-content !important;
    will-change: auto !important;
  }

  .svc-card-h {
    scroll-snap-align: start !important;
    flex-shrink: 0 !important;
    width: calc(85vw - 10px) !important;
    max-width: 320px !important;
    border-radius: 18px !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .svc-card-h-img {
    height: 190px !important;
    width: 100% !important;
  }

  .svc-card-h-body {
    padding: 1.25rem !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.6rem !important;
  }

  .svc-card-h-title {
    font-size: 1.1rem !important;
    line-height: 1.3 !important;
    white-space: normal !important;
    word-break: break-word !important;
  }

  .svc-card-h-desc {
    font-size: 0.82rem !important;
    line-height: 1.5 !important;
    color: #555 !important;
  }

  .svc-card-h-tags {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    margin-top: 0.5rem !important;
  }

  .svc-card-h-tag {
    font-size: 0.68rem !important;
    padding: 3px 8px !important;
  }

  /* Portfolio */
  .portfolio-section {
    padding: 50px 0 60px !important;
  }
  .portfolio-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }
  .portfolio-title {
    font-size: 1.3rem !important;
  }

  /* Why Me */
  .why-section {
    padding: 50px 0 60px !important;
  }
  .why-grid {
    grid-template-columns: 1fr !important;
    gap: 1.2rem !important;
  }
  .why-card {
    padding: 1.5rem !important;
    gap: 1rem !important;
  }
  .stats-row {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.5rem !important;
    padding: 2rem 0 !important;
  }

  /* Services list */
  .services-section {
    padding: 60px 0 !important;
  }
  .svc-split {
    grid-template-columns: 1fr !important;
  }
  .svc-panel-wrap {
    order: -1 !important;
    position: static !important;
  }
  .svc-row-inner {
    grid-template-columns: 36px 1fr auto !important;
    gap: 1rem !important;
    padding: 1.5rem 0 !important;
  }
  .svc-row-category {
    display: none !important;
  }
  .svc-row-title {
    font-size: clamp(1.2rem, 5vw, 1.7rem) !important;
  }

  /* Showreel */
  .showreel-section {
    height: 45vh !important;
    margin: 30px 0 !important;
    border-radius: 16px !important;
  }
  .showreel-play-btn {
    width: 72px !important;
    height: 72px !important;
  }

  /* FAQ */
  .faq-section {
    padding: 50px 0 !important;
  }
  .faq-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }
  .faq-item {
    padding: 1.25rem 0 !important;
  }

  /* Contact & Footer */
  .contact-section {
    padding: 50px 0 30px !important;
  }
  .contact-grid {
    grid-template-columns: 1fr !important;
    gap: 2.5rem !important;
  }
  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
    margin-top: 3rem !important;
  }
  .footer-big-brand {
    font-size: clamp(3rem, 14vw, 6rem) !important;
  }

  /* Works detail modal / pages */
  .wd-topbar {
    padding: 0 1rem !important;
    gap: 1rem !important;
    height: 56px !important;
  }
  .wd-hero {
    min-height: 40vh !important;
  }
  .wd-hero-inner {
    padding: 2.5rem 0 2rem !important;
  }
  .wd-hero-title {
    font-size: clamp(2rem, 9vw, 3.5rem) !important;
  }
  .wd-content {
    padding: 2.5rem 0 4rem !important;
  }
  .wd-footer-nav {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.75rem !important;
    margin-top: 2rem !important;
    padding-top: 1.5rem !important;
  }
}

/* ===== SMALL MOBILE (max 480px) ===== */
@media (max-width: 480px) {
  .hero-name-word { font-size: clamp(2.2rem, 9.5vw, 3.8rem) !important; }
  .tool-items-row { grid-template-columns: 1fr !important; }
  .partner-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 6px !important; }
  .why-grid { grid-template-columns: 1fr !important; gap: 1rem !important; }
  .stats-row { grid-template-columns: repeat(2, 1fr) !important; gap: 1.25rem !important; }
  .more-works-grid { grid-template-columns: 1fr !important; }
  .exp-year { font-size: clamp(1.4rem, 6vw, 2rem) !important; }
  .exp-company-name { font-size: clamp(1.3rem, 6vw, 1.9rem) !important; }
  .about-meta-grid { grid-template-columns: 1fr !important; }
  .svc-card-h { width: 80vw !important; max-width: 280px !important; }
  .cv2-footer-nav { grid-template-columns: 1fr !important; gap: 1rem !important; }
  .showreel-section { height: 38vh !important; border-radius: 12px !important; margin: 20px 0 !important; }
  .faq-question { font-size: 0.95rem !important; }
  .wd-topbar-title { max-width: 120px !important; font-size: 0.82rem !important; }
  .wd-hero-title { font-size: clamp(1.8rem, 8.5vw, 3rem) !important; }
  .footer-bottom { padding: 1.5rem 0 !important; }
}

/* ===== VERY SMALL MOBILE (max 360px) ===== */
@media (max-width: 360px) {
  .hero-name-word { font-size: clamp(1.9rem, 8.5vw, 2.8rem) !important; }
  .container { padding-left: 1rem !important; padding-right: 1rem !important; }
  .partner-grid { grid-template-columns: 1fr 1fr !important; gap: 5px !important; }
  .partner-tile-inner { min-height: 60px !important; padding: 0.75rem !important; }
  .tool-item { padding: 0.6rem 0.75rem !important; }
  .why-card { padding: 1.25rem !important; }
  .svc-card-h { width: 78vw !important; max-width: 260px !important; }
}

/* ===== TOUCH DEVICES ===== */
@media (hover: none) and (pointer: coarse) {
  .button-arrow, .button-link, .wd-back-btn, .nav-menu .button-link {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  .tool-item:hover { transform: none; }
  .tool-item:active { transform: scale(0.97); background: rgba(255,255,255,0.1); }
  .portfolio-card:active .portfolio-image-wrap { transform: scale(0.99); }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .blur-effect { animation: none !important; }
}

/* ===== PRINT ===== */
@media print {
  .navigation-top, .whatsapp-float, .hero-scroll-cta, .blur-effect, .menu-overlay-fullscreen, .scroll-progress-bar, .cmd-palette-backdrop, .quick-action-dock, #cursor-dot, #cursor-ring { display: none !important; }
  body { background: white !important; color: black !important; }
}

/* =============================================
   AWARD-WINNING SENIOR UI/UX SYSTEM v4.0
   ============================================= */

/* 1. TOP GLOWING SCROLL PROGRESS BAR */
.scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3.5px;
  width: 0%;
  background: linear-gradient(90deg, #c5f135 0%, #00f2fe 50%, #4facfe 100%);
  z-index: 1000000;
  box-shadow: 0 0 14px rgba(197, 241, 53, 0.8), 0 0 4px #00f2fe;
  transition: width 0.08s ease-out;
  pointer-events: none;
}

/* 2. CARD PERSPECTIVE & POLISH */

/* 3. HERO INTERACTIVE NEURAL MATRIX CANVAS */
.hero-neural-canvas-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
  opacity: 0.7;
}

/* 4. SENIOR UI/UX HARDWARE-ACCELERATED CARD HOVER */
.portfolio-card,
.more-works-card,
.wd-feature-card,
.why-card {
  position: relative;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s ease;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.portfolio-card:hover,
.more-works-card:hover {
  transform: translateY(-7px) !important;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.6), 0 0 25px rgba(197, 241, 53, 0.14) !important;
  border-color: rgba(197, 241, 53, 0.35) !important;
}

.why-card:hover,
.wd-feature-card:hover {
  transform: translateY(-5px) !important;
  box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
}

/* SECTION PERFORMANCE OPTIMIZATION */
@media (min-width: 769px) {
  .about-section-v2,
  .why-section,
  .more-works-section,
  .faq-section,
  .contact-section {
    content-visibility: auto;
    contain-intrinsic-size: 800px;
  }
}

/* 5. ENHANCED LIGHTBOX NAVIGATION */
.lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(20, 20, 24, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  cursor: pointer;
  transition: all 0.25s ease;
  backdrop-filter: blur(10px);
  z-index: 1000001;
}

.lightbox-nav-btn:hover {
  background: #c5f135;
  color: #000000;
  border-color: #c5f135;
  transform: translateY(-50%) scale(1.12);
  box-shadow: 0 0 25px rgba(197, 241, 53, 0.5);
}

.lightbox-nav-prev {
  left: 24px;
}

.lightbox-nav-next {
  right: 24px;
}

.lightbox-counter-badge {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 15, 18, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  padding: 8px 18px;
  border-radius: 30px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  z-index: 1000001;
  pointer-events: none;
}



/* =============================================
   v5 additions — form status, 404, cookie banner
   ============================================= */

/* Contact form: hidden spam trap (bots fill it, people never see it) */
.cv2-hp {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.cv2-status {
  margin: 0 0 0.9rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.45;
}
.cv2-status--ok {
  background: rgba(197, 241, 53, 0.14);
  border: 1px solid rgba(197, 241, 53, 0.45);
  color: #e9ffb0;
}
.cv2-status--err {
  background: rgba(255, 92, 92, 0.12);
  border: 1px solid rgba(255, 92, 92, 0.5);
  color: #ffd0d0;
}

/* 404 page */
.nf404 {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 1rem;
  padding: 6rem clamp(1.25rem, 8vw, 8rem);
  background: #070707;
  color: #fff;
}
.nf404-code {
  font-size: clamp(5rem, 18vw, 12rem);
  line-height: 0.9;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: #c5f135;
  margin: 0;
}
.nf404-title {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  margin: 0;
}
.nf404-text {
  color: rgba(255, 255, 255, 0.72);
  margin: 0 0 0.5rem;
}
.nf404-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.nf404-btn {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 1.4rem;
  border-radius: 2.2rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s ease, transform 0.2s ease;
}
.nf404-btn:hover { background: rgba(255, 255, 255, 0.1); transform: translateY(-2px); }
.nf404-btn--primary { background: #c5f135; border-color: #c5f135; color: #0a0a0a; }
.nf404-btn--primary:hover { background: #d4ff40; }

/* Cookie consent banner */
.cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translate(-50%, 20px);
  width: min(560px, calc(100vw - 24px));
  z-index: 10000000;
  background: rgba(14, 14, 14, 0.96);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  padding: 1.1rem 1.2rem;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  font-size: 0.9rem;
  line-height: 1.5;
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.cookie-banner.is-visible { opacity: 1; transform: translate(-50%, 0); }
.cookie-banner p { margin: 0 0 0.85rem; color: rgba(255, 255, 255, 0.85); }
.cookie-banner a { color: #c5f135; }
.cookie-banner-actions { display: flex; gap: 0.6rem; justify-content: flex-end; flex-wrap: wrap; }
.cookie-banner button {
  min-height: 42px;
  padding: 0 1.2rem;
  border-radius: 2rem;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: transparent;
  color: #fff;
}
.cookie-banner button.cookie-accept { background: #c5f135; border-color: #c5f135; color: #0a0a0a; }
@media (max-width: 600px) {
  .cookie-banner { bottom: 12px; }
  .cookie-banner-actions button { flex: 1; }
}

/* =============================================
   COLOR CONTRAST FIXES (WCAG AA, 4.5:1 for text)
   ============================================= */
/* Light sections (#e8e8e8 background): grey labels were #909090 (2.6:1) */
.section-light .top-text.gray,
.top-text.gray,
.about-meta-label,
.exp-index,
.exp-location-tag,
.exp-type-tag,
.mw-cat-label,
.more-works-cat,
.more-works-year,
.portfolio-meta > div {
  color: #595959 !important;
}
/* About paragraph was 28% black (2:1) */
.about-bio {
  color: rgba(0, 0, 0, 0.74) !important;
}
/* Muted paragraphs that were faded with opacity on light backgrounds */
.section-light .card-text.rl,
.card-text.rl {
  opacity: 1 !important;
  color: #555555 !important;
}
.why-text { color: #4d4d4d !important; }
.svc-h-label { color: #4b5563 !important; }
.svc-h-count { color: #4b5563 !important; }
/* Green "live" badge on light background */
.exp-live-badge { color: #14532d !important; }
/* Tools section (dark): descriptions were #707070 on #191919 (3.5:1) */
.tool-desc { color: #a3a3a3 !important; }
.tool-category-label { color: #9a9a9a !important; }

/* Hero skill tags: wrap before they reach the centred "Scroll to explore" button */
@media (min-width: 769px) {
  .hero-caps-row {
    flex-wrap: wrap !important;
    max-width: calc(50vw - 200px) !important;
    row-gap: 8px !important;
  }
}

/* Generated title cards: keep the project name visible when cropped into smaller tiles */
img[src*="/DevMind/cover"],
img[src*="/ThreatWatch/cover"],
img[src*="/HousePriceX/cover"],
img[src*="/Stock ANN/cover"] {
  object-position: left center !important;
}

/* =============================================
   CASE STUDY BLOCK (project pages)
   ============================================= */
.cs-block {
  margin: 0 0 3.5rem;
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.025);
}
.cs-label {
  display: flex; align-items: center; gap: 8px;
  text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.75); margin-bottom: 1.25rem;
}
.cs-results {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 1.5rem;
}
.cs-metric {
  padding: 1rem 1.1rem; border-radius: 16px;
  background: rgba(197, 241, 53, 0.08); border: 1px solid rgba(197, 241, 53, 0.25);
}
.cs-metric-v { font-size: clamp(1.4rem, 2.6vw, 2rem); font-weight: 700; color: #c5f135; line-height: 1.1; letter-spacing: -0.02em; }
.cs-metric-l { margin-top: 6px; font-size: 0.85rem; color: rgba(255, 255, 255, 0.78); line-height: 1.35; }
.cs-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.cs-card {
  padding: 1.4rem 1.5rem; border-radius: 18px;
  background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.08);
}
.cs-card h3 { margin: 0 0 0.5rem; font-size: 1.05rem; color: #fff; }
.cs-card p { margin: 0; color: rgba(255, 255, 255, 0.8); line-height: 1.65; font-size: 0.95rem; }
@media (max-width: 800px) {
  .cs-block { padding: 1.25rem; border-radius: 18px; }
  .cs-results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs-grid { grid-template-columns: 1fr; }
}

/* =============================================
   HOMEPAGE BLOG SECTION
   ============================================= */
.blog-home { padding: clamp(4rem, 8vw, 7rem) 0; background: #e8e8e8; }
.blog-home-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 2.2rem; }
.blog-home-all { color: #111; font-weight: 600; text-decoration: none; border: 1px solid rgba(0,0,0,0.2); padding: 0.6rem 1.2rem; border-radius: 2rem; }
.blog-home-all:hover { background: #111; color: #fff; }
.blog-home-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.blog-home-card { display: flex; flex-direction: column; background: #fff; border-radius: 20px; overflow: hidden; text-decoration: none; color: #111; border: 1px solid rgba(0,0,0,0.06); transition: transform 0.3s cubic-bezier(0.16,1,0.3,1), box-shadow 0.3s; }
.blog-home-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0,0,0,0.1); }
.blog-home-img { aspect-ratio: 16 / 8; overflow: hidden; background: #f3f3f3; }
.blog-home-img img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.blog-home-body { padding: 1.3rem 1.4rem 1.5rem; display: flex; flex-direction: column; gap: 0.5rem; }
.blog-home-tag { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; color: #4b5563; font-weight: 600; }
.blog-home-title { margin: 0; font-size: 1.2rem; line-height: 1.3; color: #111; }
.blog-home-desc { margin: 0; color: #4d4d4d; font-size: 0.95rem; line-height: 1.6; }
.blog-home-meta { margin-top: 0.3rem; font-size: 0.85rem; color: #111; font-weight: 600; }
@media (max-width: 768px) { .blog-home-grid { grid-template-columns: 1fr; } }

/* =============================================
   CERTIFICATIONS SECTION
   ============================================= */
.cert-section { padding: clamp(3.5rem, 7vw, 6rem) 0; background: #e8e8e8; }
.cert-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.cert-card { display: flex; flex-direction: column; background: #fff; border-radius: 20px; overflow: hidden; text-decoration: none; color: #111; border: 1px solid rgba(0,0,0,0.06); transition: transform 0.3s cubic-bezier(0.16,1,0.3,1), box-shadow 0.3s; }
.cert-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0,0,0,0.1); }
.cert-img { aspect-ratio: 3 / 2; background: #f6f6f6; display: flex; align-items: center; justify-content: center; padding: 12px; border-bottom: 1px solid rgba(0,0,0,0.06); }
.cert-img img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.cert-body { padding: 1.1rem 1.25rem 1.3rem; display: flex; flex-direction: column; gap: 0.3rem; }
.cert-title { margin: 0; font-size: 1.08rem; line-height: 1.3; color: #111; }
.cert-org { margin: 0; font-size: 0.92rem; color: #4d4d4d; }
.cert-meta { margin: 0; font-size: 0.85rem; color: #595959; }
.cert-view { margin-top: 0.4rem; font-size: 0.85rem; font-weight: 600; color: #111; }
@media (max-width: 900px) { .cert-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .cert-grid { grid-template-columns: 1fr; } }
