/* ==========================================================================
   Shoaib Portfolio - Style System & Pixel-Perfect Exact Layout
   ========================================================================== */

:root {
  --font-primary: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* Brand Colors */
  --bg-gradient-start: #FFF5F8;
  --bg-gradient-mid: #FFEBF1;
  --bg-gradient-end: #FEDCE6;
  
  --color-text-main: #111827;
  --color-text-muted: #4B5563;
  
  --color-primary: #FF385C;
  --color-primary-dark: #E21B43;
  --color-primary-light: #FF6685;

  --shadow-card: -18px 22px 42px rgba(0, 0, 0, 0.22), 0 5px 14px rgba(0, 0, 0, 0.08);
  --shadow-card-hover: -24px 28px 50px rgba(0, 0, 0, 0.32), 0 8px 20px rgba(0, 0, 0, 0.12);
  --shadow-btn: 0 10px 24px rgba(255, 56, 92, 0.38);
  --shadow-btn-hover: 0 14px 28px rgba(255, 56, 92, 0.5);

  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Base Setup */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
  font-family: var(--font-primary);
  color: var(--color-text-main);
  background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-mid) 45%, var(--bg-gradient-end) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Prevent image downloading and dragging globally */
img {
  user-select: none;
  -webkit-user-drag: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  pointer-events: none;
}

/* ==========================================================================
   3D Canvas & Background Decor
   ========================================================================== */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

/* Subtle Dot Grid Matrix */
.dot-grid {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  user-select: none;
  opacity: 0.24;
}

.grid-top-center {
  top: 85px;
  left: 48%;
  transform: translateX(-50%);
}

.grid-bottom-left {
  bottom: 80px;
  left: 6%;
}

.grid-bottom-right {
  bottom: 50px;
  right: 12%;
}

.dot-matrix {
  display: grid;
  grid-template-columns: repeat(5, 14px);
  grid-template-rows: repeat(4, 14px);
  gap: 6px;
  color: #FF7092;
  font-size: 13px;
  font-weight: 300;
  line-height: 1;
  text-align: center;
}

/* ==========================================================================
   Navigation Bar (Harmonious Centered Width)
   ========================================================================== */
.navbar-container {
  position: relative;
  z-index: 20;
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 30px 24px 10px;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
}

.nav-item {
  position: relative;
}

.nav-link {
  text-decoration: none;
  font-size: 1.02rem;
  font-weight: 600;
  color: #374151;
  padding: 6px 2px;
  display: inline-block;
  transition: var(--transition-fast);
}

.nav-item.active .nav-link {
  color: var(--color-primary);
  font-weight: 700;
}

.active-indicator {
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2.5px;
  background: var(--color-primary);
  border-radius: 4px;
}

/* Unclickable tabs styling as requested */
.unclickable-tab {
  color: #374151;
  cursor: default;
  user-select: none;
  pointer-events: none;
}

.nav-action {
  display: flex;
  align-items: center;
}

/* Connect & Next Action Buttons */
.btn-connect,
.btn-next {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #FFFFFF;
  font-family: var(--font-primary);
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none;
  border: none;
  outline: none;
  cursor: pointer;
  padding: 10px 14px 10px 24px;
  border-radius: 9999px;
  box-shadow: var(--shadow-btn);
  transition: var(--transition-smooth);
}

.btn-icon {
  width: 32px;
  height: 32px;
  background: #FFFFFF;
  color: var(--color-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.btn-connect:hover,
.btn-next:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow-btn-hover);
}

.btn-connect:hover .btn-icon,
.btn-next:hover .btn-icon {
  transform: translateX(3px);
  color: var(--color-primary-dark);
}

.btn-next {
  padding: 13px 18px 13px 30px;
  font-size: 1.15rem;
}

.btn-next .btn-icon {
  width: 36px;
  height: 36px;
}

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2.5px;
  background: #111827;
  border-radius: 2px;
}

/* ==========================================================================
   Hero Section Layout (Balanced Proximity)
   ========================================================================== */
.hero-section {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 1360px;
  min-height: calc(100vh - 110px);
  margin: 0 auto;
  padding: 20px 24px 40px;
  display: flex;
  align-items: center;
}

.hero-container {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

/* Left Content Column */
.hero-content {
  flex: 0 0 540px;
  min-width: 540px;
  padding-bottom: 20px;
}

.hero-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 20px;
}

.title-line-1 {
  font-size: clamp(2.7rem, 3.8vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--color-text-main);
  line-height: 1.12;
}

.title-line-2 {
  font-size: clamp(2.7rem, 3.8vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--color-primary);
  line-height: 1.12;
}

/* Exact Line-to-line matching typography */
.hero-description {
  font-size: 1.04rem;
  line-height: 1.62;
  color: var(--color-text-muted);
  margin-bottom: 34px;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.desc-line {
  display: block;
  white-space: nowrap;
}

.hero-description strong {
  color: #111827;
  font-weight: 700;
}

.hero-action {
  display: flex;
  align-items: center;
}

/* ==========================================================================
   Hero Right: Rotated Overlapping Rectangular Cards (Closer to Text, Elevated)
   ========================================================================== */
.hero-cards-wrapper {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 0;
  margin-top: -60px; /* Elevated */
}

.cards-diagonal-stage {
  display: flex;
  align-items: center;
  position: relative;
}

/* Base Tilted Card Structure */
.tilted-card {
  position: relative;
  cursor: pointer;
  user-select: none;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-frame {
  width: 345px;
  height: 148px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  background: #FFFFFF;
  position: relative;
  transition: var(--transition-smooth);
}

.card-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Exact Diagonal Slope & Positioning */
.card-step-1 {
  z-index: 1;
  transform: translate(0px, 0px) rotate(-34deg);
}

.card-step-2 {
  z-index: 2;
  margin-left: -148px;
  transform: translate(0px, -55px) rotate(-34deg);
}

.card-step-3 {
  z-index: 3;
  margin-left: -148px;
  transform: translate(0px, -110px) rotate(-34deg);
}

.card-step-4 {
  z-index: 4;
  margin-left: -148px;
  transform: translate(0px, -165px) rotate(-34deg);
}

/* Hover Dynamics */
.tilted-card:hover {
  z-index: 15 !important;
}

.card-step-1:hover {
  transform: translate(0px, -18px) rotate(-34deg) scale(1.06);
}
.card-step-2:hover {
  transform: translate(0px, -73px) rotate(-34deg) scale(1.06);
}
.card-step-3:hover {
  transform: translate(0px, -128px) rotate(-34deg) scale(1.06);
}
.card-step-4:hover {
  transform: translate(0px, -183px) rotate(-34deg) scale(1.06);
}

.tilted-card:hover .card-frame {
  box-shadow: var(--shadow-card-hover);
}

/* Active Highlight Focus state */
.tilted-card.active-focus {
  z-index: 20 !important;
}
.card-step-1.active-focus {
  transform: translate(0px, -22px) rotate(-34deg) scale(1.08);
}
.card-step-2.active-focus {
  transform: translate(0px, -77px) rotate(-34deg) scale(1.08);
}
.card-step-3.active-focus {
  transform: translate(0px, -132px) rotate(-34deg) scale(1.08);
}
.card-step-4.active-focus {
  transform: translate(0px, -187px) rotate(-34deg) scale(1.08);
}

.tilted-card.active-focus .card-frame {
  box-shadow: -26px 30px 50px rgba(0, 0, 0, 0.35), 0 0 0 3px #FFFFFF;
}

/* ==========================================================================
   Modals & Lightboxes
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 12, 22, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  position: relative;
  width: 100%;
  max-width: 540px;
  background: #FFFFFF;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
  transform: scale(0.9) translateY(20px);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-backdrop.is-open .modal-card {
  transform: scale(1) translateY(0);
}

.modal-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: #1F2937;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transition: var(--transition-fast);
}

.modal-close-btn:hover {
  background: #111827;
  color: #FFFFFF;
  transform: rotate(90deg);
}

/* Connect Dialog */
.connect-dialog {
  padding: 40px;
  text-align: center;
}

.connect-icon-badge {
  font-size: 3rem;
  margin-bottom: 16px;
}

.connect-dialog h2 {
  font-size: 1.8rem;
  font-weight: 800;
  color: #111827;
  margin-bottom: 12px;
}

.connect-dialog p {
  font-size: 1.02rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: 30px;
}

.connect-links-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.connect-pill-link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 18px;
  background: #F9FAFB;
  border: 1px solid #E5E7EB;
  border-radius: 16px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  color: #1F2937;
  transition: var(--transition-smooth);
}

.connect-pill-link:hover {
  background: #111827;
  color: #FFFFFF;
  border-color: #111827;
  transform: translateY(-2px);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1280px) {
  .hero-container {
    gap: 20px;
  }
  
  .hero-content {
    flex: 0 0 500px;
    min-width: 500px;
  }

  .card-frame {
    width: 300px;
    height: 128px;
  }
  
  .card-step-2, .card-step-3, .card-step-4 {
    margin-left: -128px;
  }
}

@media (max-width: 1080px) {
  .navbar-container {
    padding: 24px 20px 10px;
  }

  .nav-links {
    gap: 20px;
  }

  .hero-section {
    padding: 20px 20px 60px;
    min-height: auto;
  }

  .hero-container {
    flex-direction: column;
    text-align: center;
    gap: 50px;
  }

  .hero-content {
    min-width: auto;
    max-width: 100%;
    margin: 0 auto;
  }

  .desc-line {
    white-space: normal;
  }

  .hero-action {
    justify-content: center;
  }

  .hero-cards-wrapper {
    justify-content: center;
    padding: 40px 0 20px;
    margin-top: 0;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .hero-title .title-line-1,
  .hero-title .title-line-2 {
    font-size: 2.3rem;
  }

  .hero-cards-wrapper {
    overflow-x: auto;
    padding: 40px 10px;
    justify-content: center;
  }

  .card-frame {
    width: 240px;
    height: 102px;
    border-radius: 16px;
  }

  .card-step-2, .card-step-3, .card-step-4 {
    margin-left: -100px;
  }

  .connect-links-grid {
    grid-template-columns: 1fr;
  }
}
