/* ============================================
   OPTIMIZED COLOR PALETTE FOR KASHIF IBRAR
   Conversion-focused | Neil Patel approved
   ============================================ */

:root {
  /* CORE BRAND COLORS */
  --brand-black: #353535;
  --brand-black-pure: #000000;
  --brand-gray-dark: #555555;
  --brand-gray-mid: #a3a3a3;
  --brand-gray-light: #e6e6e6;
  --brand-white: #ffffff;

  /* ACCENT COLORS (High Conversion) */
  --accent-primary: #0066ff;
  /* Electric Blue - CTAs */
  --accent-hover: #0052cc;
  /* Darker Blue - Hover */
  --accent-light: rgba(0, 102, 255, 0.1);
  /* 10% opacity - highlights */

  /* SUCCESS/METRICS COLORS */
  --success-green: #10b981;
  --success-green-dark: #059669;

  /* BACKGROUNDS */
  --bg-white: #ffffff;
  --bg-light: #f8f9fc;
  /* Cool light gray */
  --bg-warm: #fafaf8;
  /* Very subtle warm (if needed) */
  --bg-dark: #353535;

  /* BORDERS & DIVIDERS */
  --border-light: #e6e6e6;
  --border-mid: #a3a3a3;

  /* SHADOWS */
  --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 15px 40px rgba(0, 0, 0, 0.12);

  /* GRADIENTS */
  --gradient-dark: linear-gradient(135deg, #353535 0%, #505050 100%);
  --gradient-accent: linear-gradient(135deg, #0066ff 0%, #0052cc 100%);
}

/* GENERAL */

/* Google Fonts loaded in HTML head for non-blocking render */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--brand-gray-dark);
  font-size: clamp(14px, 2.5vw, 16px);
  line-height: 1.6;
}

/* Main content landmark */
main {
  display: block;
  width: 100%;
}

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

p {
  color: var(--brand-gray-dark);
}

/* TRANSITION - GPU accelerated for smoother animations */

a,
.btn {
  transition: all 300ms ease;
  touch-action: manipulation;
  will-change: transform, color;
}

/* DESKTOP NAV */

nav,
.nav-links {
  display: flex;
}

nav {
  justify-content: space-around;
  align-items: center;
  height: 17vh;
  background: var(--bg-white);
}

.nav-links {
  gap: 2rem;
  list-style: none;
  font-size: 1rem;
}

a {
  color: var(--brand-black);
  text-decoration: none;
}

a:hover {
  color: var(--accent-primary);
  text-decoration: underline;
  text-underline-offset: 1rem;
}

.logo {
  font-size: 3rem;
  color: var(--brand-black);
}

.logo:hover {
  cursor: default;
}

.logo-icon {
  height: 0.8em;
  width: auto;
  vertical-align: middle;
  margin-right: 0.2rem;
  margin-bottom: 0.1em;
}

/* HAMBURGER MENU */

#hamburger-nav {
  display: none;
}

.hamburger-menu {
  position: relative;
  display: inline-block;
}

.hamburger-icon {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  height: 16px;
  width: 22px;
  cursor: pointer;
  z-index: 2000;
  position: relative;
  padding: 2px 0;
  /* Reset button styles */
  background: transparent;
  border: none;
  outline: none;
}

.hamburger-icon span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--brand-black);
  border-radius: 2px;
  transition: all 0.3s ease-in-out;
}

.hamburger-icon.open {
  justify-content: center;
}

.hamburger-icon.open span {
  position: absolute;
  top: 50%;
  left: 0;
}

.hamburger-icon.open span:first-child {
  transform: translateY(-50%) rotate(45deg);
}

.hamburger-icon.open span:nth-child(2) {
  opacity: 0;
}

.hamburger-icon.open span:last-child {
  transform: translateY(-50%) rotate(-45deg);
}

/* MOBILE MENU LINKS */
.menu-links {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: var(--bg-white);
  width: fit-content;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease-in-out;
  border-radius: 1rem;
  box-shadow: var(--shadow-lg);
  z-index: 1999;
}

.menu-links.open {
  max-height: 500px;
  padding: 1rem;
  overflow-y: auto;
}

.menu-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.menu-links li {
  padding: 0.75rem 1.5rem;
}

.menu-links li a {
  color: var(--brand-black);
  font-size: 1rem;
  text-decoration: none;
  display: block;
  transition: all 0.2s ease;
}

.menu-links li a:hover {
  color: var(--accent-primary);
}

/* SECTIONS */

section {
  padding-top: 4vh;
  height: 96vh;
  margin: 0 10rem;
  box-sizing: border-box;
  min-height: fit-content;
  contain: layout style;
  content-visibility: auto;
  contain-intrinsic-size: auto 500px;
}

.section-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 5rem;
  max-width: 1050px;
  margin: 0 auto;
  padding: 2rem;
}

/* PROFILE SECTION */

#profile {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 5rem;
  height: 80vh;
}

#profile .title {
  margin-bottom: 1rem;
}

.section__pic-container {
  display: flex;
  height: 400px;
  width: 400px;
  margin: auto 0;
  flex-shrink: 0;
  aspect-ratio: 1;
}

.section__text {
  align-self: center;
  text-align: center;
}

.section__text p {
  font-weight: 600;
  color: var(--brand-gray-dark);
}

.section__text__p1 {
  text-align: center;
  color: var(--brand-black);
}

.section__text__p2 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  color: var(--brand-black);
}

.title {
  font-size: clamp(1.75rem, 8vw, 3rem);
  text-align: center;
  color: var(--brand-black);
  margin-bottom: 4rem;
  line-height: 1.2;
}

#socials-container {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
  gap: 1rem;
}

/* ICONS */

.icon {
  cursor: pointer;
  height: 2rem;
  color: var(--brand-black);
  transition: all 300ms ease;
}

.icon:hover {
  color: var(--accent-primary);
  transform: scale(1.1);
}

/* BUTTONS - OPTIMIZED FOR CONVERSION */

.btn-container {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.btn {
  font-weight: 600;
  transition: all 300ms ease;
  padding: 1rem 1.5rem;
  width: auto;
  min-height: 48px;
  min-width: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 2rem;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  white-space: nowrap;
}

/* PRIMARY CTA - Electric Blue (High Conversion) */
.btn-color-1 {
  background: var(--accent-primary);
  color: var(--bg-white);
  border: var(--accent-primary) 0.1rem solid;
}

.btn-color-1:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 102, 255, 0.3);
}

/* SECONDARY CTA - Outline Style */
.btn-color-2 {
  background: transparent;
  color: var(--brand-black);
  border: var(--brand-black) 0.1rem solid;
}

.btn-color-2:hover {
  background: var(--brand-black);
  color: var(--bg-white);
  transform: translateY(-2px);
}

/* ABOUT SECTION */

#about {
  position: relative;
}

#about .text-container p {
  margin-bottom: 1.5rem;
  line-height: 1.7;
  text-align: left;
  font-size: 1rem;
}

.about-containers {
  gap: 2rem;
  margin-bottom: 2rem;
  margin-top: 2rem;
}

.about-details-container {
  justify-content: center;
  flex-direction: column;
}

.about-containers,
.about-details-container {
  display: flex;
}

.about-pic {
  border-radius: 50%;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  border: 4px solid var(--bg-white);
  transition: all 400ms ease;
}

.about-pic:hover {
  transform: scale(1.03);
  box-shadow: 0 15px 40px rgba(0, 102, 255, 0.2);
}

.arrow {
  position: absolute;
  right: -5rem;
  bottom: 2.5rem;
}

.details-container {
  padding: 1.5rem;
  flex: 1;
  background: var(--bg-white);
  border-radius: 2rem;
  border: var(--border-light) 0.1rem solid;
  text-align: center;
  transition: all 300ms ease;
}

.details-container:hover {
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-5px);
}

.section-container {
  gap: 5rem;
  height: auto;
  min-height: fit-content;
}

#about .text-container {
  max-width: 600px;
}


/* TRUST METRICS */
.trust-metrics {
  padding: 4rem 1rem;
  background: var(--bg-light);
  text-align: center;
  font-family: 'Inter', sans-serif;
}

.trust-metrics .container {
  max-width: 700px;
  margin: auto;
}

.trust-metrics h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
  color: var(--brand-black);
}

.sub-heading {
  font-size: 1.05rem;
  color: var(--brand-gray-dark);
  margin-bottom: 3.5rem;
}

.metrics {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 3rem;
}

.metric {
  flex: 1 1 120px;
}

.metric .num {
  display: block;
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 700;
  color: var(--success-green);
}

.metric .label {
  font-size: clamp(0.75rem, 2.5vw, 0.9rem);
  color: var(--brand-black);
  line-height: 1.2;
}

.partners {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.partner-icon {
  font-size: 2rem;
  color: var(--brand-black);
  opacity: .85;
  transition: opacity .2s;
}

.partner-icon:hover {
  opacity: 1;
  color: var(--accent-primary);
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--accent-primary);
  color: var(--bg-white);
  padding: 1rem 2rem;
  min-height: 48px;
  border-radius: 2rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all 300ms ease;
  white-space: nowrap;
}

.cta-btn:hover {
  background: var(--accent-hover);
  color: var(--bg-white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 102, 255, 0.3);
}

/* EXPERIENCE SECTION */

#experience {
  position: relative;
  background: var(--bg-light);
  padding: 4rem 10rem;
  margin: 0;
  height: auto;
}

#ideal-clients {
  position: relative;
  background: var(--bg-light);
  padding: 4rem 10rem;
  margin: 0;
  height: auto;
}

.experience-sub-title {
  color: var(--brand-black);
  font-weight: 700;
  font-size: 1.5rem;
  margin-bottom: 3rem;
  text-align: center;
  position: relative;
  padding-bottom: 0.75rem;
}

.experience-sub-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--gradient-accent);
  border-radius: 2px;
}

.experience-details-container {
  display: flex;
  justify-content: center;
  flex-direction: column;
  max-width: 1100px;
  margin: 0 auto;
}

.about-containers {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

.details-container {
  padding: 2rem;
  background: var(--bg-white);
  border-radius: 1.5rem;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.details-container:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-primary);
}

.article-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

article {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--bg-light);
  border-radius: 0.75rem;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

article:hover {
  background: var(--bg-white);
  border-color: var(--accent-primary);
  transform: scale(1.02);
}

article .icon {
  cursor: default;
  flex-shrink: 0;
}

.skill-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent-primary) 0%, #0052cc 100%);
  border-radius: 10px;
  flex-shrink: 0;
}

.skill-icon i {
  color: var(--bg-white);
  font-size: 1.1rem;
}

article h3 {
  color: var(--brand-black);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

article p {
  color: var(--accent-primary);
  font-size: 0.8rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

article p::before {
  content: '●';
  font-size: 0.5rem;
  color: var(--success-green);
}

/* CAROUSEL STYLES */

.carousel-container {
  position: relative;
  height: 600px;
  width: 90%;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

.carousel-track-container {
  height: 100%;
  width: 100%;
  position: relative;
  overflow: hidden;
  border-radius: 2rem;
}

.carousel-track {
  padding: 1rem;
  margin: 0;
  list-style: none;
  position: absolute;
  top: 0;
  bottom: 0;
  width: 100%;
  display: flex;
  transition: transform 0.5s ease-in-out;
  box-sizing: border-box;
}

/* PROJECTS SECTION */

#projects {
  position: relative;
}

.project-card {
  width: calc((100% - 4rem) / 3);
  margin-right: 2rem;
  height: 95%;
  margin-top: 1%;
  box-sizing: border-box;
  padding: 1rem;
  text-align: center;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: 2rem;
  transition: all 0.3s ease;
}

.project-card:nth-child(3n) {
  margin-right: 0;
}

.project-card:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-primary);
}

.carousel-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  cursor: pointer;
  z-index: 10;
}

.carousel-button img {
  width: 30px;
  height: 30px;
  filter: opacity(0.7);
  transition: all 300ms ease;
}

.carousel-button:hover img {
  filter: opacity(1);
  transform: scale(1.1);
}

.carousel-button-left {
  left: -40px;
}

.carousel-button-right {
  right: -40px;
}

.is-hidden {
  display: none;
}

.carousel-nav {
  display: flex;
  justify-content: center;
  padding: 10px 0;
  position: absolute;
  bottom: -30px;
  width: 100%;
}

.carousel-indicator {
  border: 0;
  border-radius: 50%;
  width: 15px;
  height: 15px;
  background: var(--brand-gray-light);
  margin: 0 12px;
  cursor: pointer;
  transition: all 300ms ease;
}

.carousel-indicator:hover {
  background: var(--brand-gray-mid);
}

.carousel-indicator.current-slide {
  background: var(--accent-primary);
}

/* MODAL STYLES */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background-color: var(--bg-white);
  margin: auto;
  padding: 2rem;
  border: 1px solid var(--border-light);
  width: 80%;
  max-width: 600px;
  border-radius: 2rem;
  position: relative;
  text-align: left;
}

.modal-content h2 {
  color: var(--brand-black);
}

.modal-content p {
  color: var(--brand-gray-dark);
}

.close-modal {
  color: var(--brand-gray-mid);
  float: right;
  font-size: 28px;
  font-weight: bold;
  position: absolute;
  top: 10px;
  right: 20px;
  cursor: pointer;
  transition: all 300ms ease;
}

.close-modal:hover,
.close-modal:focus {
  color: var(--brand-black);
  text-decoration: none;
}

.project-img {
  border-radius: 2rem;
  width: 100%;
  height: 100%;
  object-fit: cover;
  margin-bottom: 1rem;
}

/* Modal image styles for responsive display */
.modal-img {
  height: auto;
  max-height: 200px;
  width: auto;
  max-width: 100%;
  margin: 0 auto 1rem;
  display: block;
  object-fit: contain;
}

/* Ensure picture elements are responsive */
picture {
  display: block;
}

.modal-content picture {
  display: block;
  width: 100%;
  text-align: center;
}

.modal-content picture img {
  max-width: 100%;
  height: auto;
}

.project-title {
  margin: 1rem 0;
  color: var(--brand-black);
}

/* SERVICES SECTION */

#services {
  position: relative;
  height: fit-content;
  margin-bottom: 2rem;
  padding-top: 0;
}

#services .carousel-container {
  height: 450px;
}

.service-card-carousel {
  background: var(--bg-white);
}

.service-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--accent-primary);
}

.service-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--brand-black);
}

.service-card p {
  color: var(--brand-gray-dark);
  line-height: 1.6;
}

/* PORTFOLIO SECTION */

#portfolio {
  position: relative;
}

#portfolio .carousel-container {
  height: 450px;
}

.portfolio-item {
  height: 100%;
  background: var(--bg-white);
  display: flex;
  flex-direction: column;
  border-radius: 2rem;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 300ms ease;
  border: 1px solid var(--border-light);
}

.portfolio-item:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-xl);
  border-color: var(--accent-primary);
}

.portfolio-img-wrapper {
  position: relative;
  overflow: hidden;
  height: 100%;
  flex-grow: 1;
}

.portfolio-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 300ms ease;
}

.portfolio-item:hover .portfolio-img,
.project-card:hover .portfolio-img {
  transform: scale(1.1);
}

.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(53, 53, 53, 0.95);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: all 300ms ease;
  padding: 1.25rem;
  box-sizing: border-box;
  overflow: hidden;
}

.portfolio-item:hover .portfolio-overlay,
.project-card:hover .portfolio-overlay {
  opacity: 1;
}

.portfolio-overlay h3 {
  color: var(--bg-white);
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
  text-align: center;
  line-height: 1.3;
}

.portfolio-overlay p {
  color: rgb(200, 200, 200);
  text-align: center;
  margin-bottom: 0.75rem;
  font-size: 0.8rem;
  line-height: 1.4;
}

.portfolio-links {
  display: flex;
  gap: 1rem;
}

.portfolio-link {
  padding: 0.5rem 1.5rem;
  background: var(--accent-primary);
  color: var(--bg-white);
  border-radius: 2rem;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 300ms ease;
  border: none;
  cursor: pointer;
}

.portfolio-link:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 102, 255, 0.3);
}

/* SOCIAL LINKS */

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 300ms ease;
}

.social-link:hover {
  transform: translateY(-3px);
}

.social-icon {
  font-size: 1.8rem;
  cursor: pointer;
  transition: all 300ms ease;
  color: var(--brand-black);
}

.social-icon:hover {
  transform: scale(1.1);
  color: var(--accent-primary);
}

/* STATS BANNER */

#stats-banner {
  background: var(--bg-white);
  padding: 3rem 2rem;
  margin: 0;
  height: auto;
  min-height: auto;
  border-bottom: 1px solid var(--border-light);
}

.stats-container {
  display: flex;
  justify-content: center;
  gap: 4rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.stat-item {
  text-align: center;
  color: var(--brand-black);
}

.stat-number {
  font-size: 3rem;
  font-weight: 700;
  color: var(--accent-primary);
  line-height: 1;
}

.stat-label {
  font-size: 1rem;
  color: var(--brand-gray-dark);
  margin-top: 0.5rem;
}

.platforms-container {
  text-align: center;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
}

.platforms-label {
  color: var(--brand-gray-dark);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.platforms-logos {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.platform-logo {
  background: var(--bg-white);
  padding: 0.75rem 1.5rem;
  border-radius: 2rem;
  color: var(--brand-black);
  font-size: 0.9rem;
  transition: all 300ms ease;
  text-decoration: none;
  display: inline-block;
  border: 1px solid var(--border-light);
}

.platform-logo:hover {
  background: var(--accent-light);
  transform: translateY(-3px);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

/* CAROUSEL ARROWS */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--brand-black);
  color: var(--bg-white);
  border: none;
  font-size: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 2;
  transition: all 300ms ease;
}

.carousel-arrow:hover {
  background: var(--accent-primary);
  transform: translateY(-50%) scale(1.1);
}

.carousel-arrow.prev {
  left: 20px;
}

.carousel-arrow.next {
  right: 20px;
}

/* CASE STUDIES SECTION */

#case-studies {
  position: relative;
  background: var(--bg-white);
}

#case-studies .carousel-container {
  height: 500px;
}

.case-studies-wrapper {
  display: flex;
  gap: 1.5rem;
  overflow: hidden;
  scroll-behavior: smooth;
  padding: 1rem 0;
}

.case-study-card {
  flex: 0 0 calc(50% - 0.75rem);
  height: 100%;
  background: var(--bg-white);
  border-radius: 2rem;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all 300ms ease;
  border: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
}

.case-study-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-xl);
  border-color: var(--accent-primary);
}

.case-study-header {
  background: var(--gradient-dark);
  padding: 1.5rem;
  color: var(--bg-white);
}

.case-study-tag {
  background: var(--accent-light);
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-primary);
  font-weight: 600;
}

.case-study-header h3 {
  margin-top: 1rem;
  font-size: 1.3rem;
  color: var(--bg-white);
}

.case-study-content {
  padding: 1.5rem;
}

.case-study-stats {
  display: flex;
  gap: 2rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-light);
}

.case-stat {
  display: flex;
  flex-direction: column;
}

.case-stat-number {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--success-green);
}

.case-stat-label {
  font-size: 0.8rem;
  color: var(--brand-gray-dark);
}

.case-study-content p {
  margin-bottom: 1rem;
  line-height: 1.6;
  color: var(--brand-gray-dark);
}

.case-study-link {
  color: var(--accent-primary);
  font-weight: 600;
  display: inline-block;
  transition: all 300ms ease;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
}

.case-study-link:hover {
  color: var(--accent-hover);
  text-decoration: none;
  transform: translateX(5px);
}

/* TESTIMONIALS SECTION */

#testimonials {
  position: relative;
  height: fit-content;
  margin-bottom: 2rem;
  background: var(--bg-light);
}

#testimonials .carousel-container {
  height: 400px;
}

.testimonial-card {
  height: 100%;
  background: var(--bg-white);
  border-radius: 2rem;
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  transition: all 300ms ease;
  border: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.testimonial-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-primary);
}

.testimonial-content {
  margin-bottom: 1rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.quote-icon {
  font-size: 2rem;
  color: var(--accent-primary);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.testimonial-content p {
  font-style: italic;
  line-height: 1.6;
  color: var(--brand-gray-dark);
  font-size: 0.9rem;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gradient-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg-white);
  font-weight: 600;
  font-size: 0.9rem;
}

.author-info h4 {
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
  color: var(--brand-black);
}

.author-info p {
  font-size: 0.8rem;
  color: var(--brand-gray-dark);
  margin: 0;
}

.testimonial-rating {
  font-size: 1rem;
  letter-spacing: 2px;
  color: #fbbf24;
}

/* CONTACT SECTION */

.contact-section {
  padding: 5rem 1rem;
  background: var(--bg-light);
  font-family: 'Inter', sans-serif;
}

.container {
  max-width: 1000px;
  margin: auto;
  text-align: center;
}

.contact-section h2 {
  font-size: 2.2rem;
  margin-bottom: 2rem;
  color: var(--brand-black);
}

.lead {
  font-size: 1.05rem;
  color: var(--brand-gray-dark);
  margin-bottom: 3rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
  max-width: 1040px;
  margin: 0 auto;
}

/* Desktop: square cards */
@media screen and (min-width: 1024px) {
  .contact-grid {
    gap: 2.5rem;
  }

  .contact-form,
  .booking-card {
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .contact-form .form-group {
    margin-bottom: 0.75rem;
  }

  .contact-form .form-group input,
  .contact-form .form-group textarea {
    padding: 0.6rem 0.85rem;
    font-size: 0.93rem;
    min-height: 40px;
  }

  .contact-form .form-group textarea {
    rows: 3;
    min-height: 80px;
    resize: none;
  }

  .contact-form button[type="submit"] {
    margin-top: 0.75rem !important;
    padding: 0.65rem 1.5rem;
  }
}

.contact-form {
  background: var(--bg-white);
  padding: 2rem;
  border-radius: 2rem;
  box-shadow: var(--shadow-md);
  text-align: left;
  border: 1px solid var(--border-light);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  margin-bottom: .4rem;
  font-weight: 500;
  color: var(--brand-black);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  border: 1px solid var(--border-light);
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: all 300ms ease;
  font-family: 'Poppins', sans-serif;
  min-height: 48px;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.btn-primary {
  background: var(--accent-primary);
  color: var(--bg-white);
  border: none;
  padding: 1rem 2rem;
  font-size: 1rem;
  min-height: 48px;
  border-radius: 2rem;
  cursor: pointer;
  transition: all 300ms ease;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 102, 255, 0.3);
}

.form-message {
  margin-top: 1rem;
  font-size: .9rem;
}

.form-message.error {
  color: #e74c3c;
}

.form-message.success {
  color: var(--success-green);
}

.booking-card {
  background: var(--bg-white);
  padding: 2rem 2.5rem;
  border-radius: 2rem;
  box-shadow: var(--shadow-md);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border: 1px solid var(--border-light);
  transition: all 300ms ease;
}

.booking-card:hover {
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-lg);
}

.booking-card h3 {
  color: var(--brand-black);
}

.booking-card p {
  margin: .75rem 0 1.5rem;
  line-height: 1.5;
  color: var(--brand-gray-dark);
}

.booking-card small {
  display: block;
  margin-top: .75rem;
  font-size: .8rem;
  color: var(--brand-gray-mid);
}

.booking-card .cta-btn {
  max-width: 220px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  gap: .5rem;
}

.contact-form .btn-container {
  display: block;
  text-align: center;
}

.contact-form .btn-primary {
  width: 220px;
  display: block;
  margin: 1.5rem auto 0;
}

/* CORNER CTA */
.corner-cta {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 999;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--accent-primary);
  color: var(--bg-white);
  padding: .55rem 1rem;
  border-radius: 50px;
  font-size: .85rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 102, 255, 0.35);
  transition: all 300ms ease;
}

.corner-cta:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 102, 255, 0.45);
}

.corner-cta span {
  display: inline-block;
}

/* GENERIC CAROUSEL STYLES */
.carousel-scroll-wrapper {
  display: flex;
  gap: 0.5rem;
  overflow: hidden;
  scroll-behavior: smooth;
  padding: 1rem 0;
}

.card-3-per-view {
  flex: 0 0 calc(33.333% - 0.333rem);
  box-sizing: border-box;
  margin: 0;
  width: auto;
}

/* RESPONSIVE DESIGN */

@media screen and (max-width: 1350px) {
  .carousel-arrow.prev {
    left: 10px;
  }

  .carousel-arrow.next {
    right: 10px;
  }
}

@media screen and (max-width: 1024px) {
  .card-3-per-view {
    flex: 0 0 calc(50% - 0.25rem);
  }

  section {
    margin: 0 5rem;
  }

  .metrics {
    gap: 1.5rem;
  }

  .metric .num {
    font-size: 2rem;
  }
}

@media screen and (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }

  section {
    margin: 0 2rem;
  }

  .title {
    font-size: 2rem;
  }

  .section__text__p2 {
    font-size: 1.25rem;
  }
}

@media screen and (max-width: 600px) {

  .carousel-scroll-wrapper {
    overflow-x: auto !important;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 1.5rem !important; /* space for scroll bar */
  }

  .carousel-arrow {
    display: none !important;
  }

  .card-3-per-view,
  .case-study-card {
    flex: 0 0 85%; /* 85% width so next card peeks in */
    scroll-snap-align: start;
  }

  .corner-cta span {
    display: none;
  }

  section {
    margin: 0 1rem;
  }

  #profile {
    flex-direction: column;
    gap: 2rem;
  }

  .section__pic-container {
    height: 300px;
    width: 300px;
  }

  /* Metrics Mobile Fix */
  .metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }

  .metric {
    flex: none;
    width: 100%;
  }
}

/* FOOTER (if you have one) */
footer {
  background: var(--bg-white);
  color: var(--brand-gray-dark);
  padding: 2rem;
  text-align: center;
  border-top: 1px solid var(--brand-gray-light);
}

footer p {
  color: var(--brand-gray-dark);
}

footer a {
  color: var(--accent-primary);
}

footer a:hover {
  color: var(--accent-hover);
}

/* Skip Link Styling */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--bg-accent);
  color: white;
  padding: 8px 16px;
  z-index: 9999;
  transition: top 0.3s;
  text-decoration: none;
  font-weight: 500;
  border-radius: 0 0 8px 8px;
}

.skip-link:focus {
  top: 0;
}

/* ============================================
   MOBILE PERFORMANCE OPTIMIZATIONS (CLS/INP)
   ============================================ */

/* Prevent layout shifts with consistent aspect ratio */
.portfolio-img-wrapper,
.portfolio-img-wrapper picture {
  aspect-ratio: 3/2;
  display: block;
  overflow: hidden;
}

.project-img,
.portfolio-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* GPU acceleration for animated elements */
.carousel-arrow,
.modal {
  will-change: opacity, transform;
}

/* Optimize button touch targets for mobile */
button,
.btn,
.cta-btn,
.portfolio-link {
  touch-action: manipulation;
  min-height: 44px;
  min-width: 44px;
}

/* FORCE MOBILE NAV VISIBILITY */
@media screen and (max-width: 1200px) {
  #desktop-nav {
    display: none !important;
  }

  #hamburger-nav {
    display: flex !important;
  }
}

@font-face {
  font-family: 'CustomFont';
  src: url('font.woff2') format('woff2');
  font-display: swap;
  /* Prevents invisible text */
}

/* ============================================
   USER REQUESTED FIXES
   ============================================ */

/* Fix: Card Layout Issues */
.info-card {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  overflow: hidden; /* Prevent content clipping */
  word-wrap: break-word; /* Fix text overflow */
}

.info-card h3 {
  margin-bottom: 1rem;
  padding-left: 0; /* Remove negative padding causing text clip */
}

.info-card p {
  line-height: 1.6;
  margin-bottom: 1rem;
}

/* Fix: Remove stray bullet points */
.info-card ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.info-card ul li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
}

.info-card ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 6px;
  height: 6px;
  background: #22C55E; /* Green bullet color */
  border-radius: 50%;
}

/* Fix: Section spacing */
section {
  padding: 3rem 1.5rem; /* Consistent padding */
  margin-bottom: 0; /* Remove excessive margins */
}

section + section {
  margin-top: 0;
}

/* Fix: Remove massive gaps */
.services-section {
  margin-bottom: 0;
  padding-bottom: 3rem;
}

.testimonials-section {
  padding-top: 3rem;
}

/* Fix: Text overlap in cards */
.voice-ai-section {
  position: relative;
}

.voice-ai-section h3 {
  position: relative;
  z-index: 1;
  margin-bottom: 1rem;
}

.voice-ai-section .content {
  position: relative;
  z-index: 2;
}

/* Fix: Vertical heading alignment */
.vertical-heading {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  margin-right: 1rem;
}

/* Ensure heading and content don't overlap */
.faq-item {
  position: relative;
  z-index: 1;
}

/* Fix: Horizontal overflow */
body {
  overflow-x: hidden;
}

.container {
  max-width: 100%;
  overflow: hidden;
}

/* Fix: Card responsiveness */
.info-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.info-card {
  max-width: 100%;
  overflow: hidden;
  word-break: break-word;
}

/* Fix: Missing testimonials content */
.testimonials-section {
  min-height: 200px;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.testimonial-card {
  background: #ffffff;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Show placeholder if no testimonials */
.testimonials-grid:empty::after {
  content: "Testimonials coming soon...";
  display: block;
  text-align: center;
  padding: 2rem;
  color: #666;
}