/*--------------------------------------------------------------
# Custom additions — SEO / content sections
# Kept separate from style.css so the base template stays upgradeable.
# Theme accent: #0563bb   hover: #067ded   heading: #45505b   body: #272829
--------------------------------------------------------------*/

/*--- Accessibility: skip link -----------------------------------*/
.skip-link {
  position: absolute;
  top: -60px;
  left: 8px;
  z-index: 10000;
  padding: 10px 18px;
  background: #0563bb;
  color: #fff;
  border-radius: 0 0 6px 6px;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.25s ease;
}
.skip-link:focus {
  top: 0;
  color: #fff;
}

/* Visible focus ring for keyboard users */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid #0563bb;
  outline-offset: 2px;
}

/* Screen-reader-only text (used for context on icon-only links) */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/*--- Hero: responsive H1 + optimised LCP background --------------*/
#hero {
  /* 1920px derivative instead of the 4898px original — big LCP win */
  background-image: url("../img/hero-bilal-khursheed.jpg");
}

#hero h1 {
  font-size: clamp(34px, 7vw, 64px);
  line-height: 1.08;
}

#hero h1 .hero-role {
  display: block;
  margin-top: 0.35em;
  font-size: 0.42em;
  font-weight: 600;
  letter-spacing: 0.4px;
  color: #0563bb;
}

#hero p {
  font-size: clamp(17px, 3.2vw, 26px);
}

/* Availability pill in the hero */
.hero-availability {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(5, 99, 187, 0.25);
  font-size: 15px;
  font-weight: 600;
  color: #45505b;
}
.hero-availability .status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.22);
}

/* Primary hero CTAs */
.hero-cta {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.btn-primary-cta,
.btn-ghost-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: 0.3s;
}
.btn-primary-cta {
  background: #0563bb;
  color: #fff;
}
.btn-primary-cta:hover {
  background: #067ded;
  color: #fff;
}
.btn-ghost-cta {
  border: 2px solid #0563bb;
  color: #0563bb;
  background: transparent;
}
.btn-ghost-cta:hover {
  background: #0563bb;
  color: #fff;
}

/*--- Heading-level fixes ----------------------------------------
   Service and portfolio card titles were <h4> directly under a
   section <h2>, which skips a level. They are now <h3>; these rules
   mirror the template's original h4 styling so nothing shifts.
-----------------------------------------------------------------*/
.services .icon-box h3 {
  font-weight: 600;
  margin: 10px 0 15px 0;
  font-size: 22px;
  color: #45505b;
}

.portfolio .portfolio-wrap .portfolio-info h3 {
  font-size: 20px;
  color: #45505b;
  font-weight: 600;
}

/* Footer name heading (was #footer h3 in the template) */
#footer h2 {
  font-size: 36px;
  font-weight: 700;
  position: relative;
  font-family: "Poppins", sans-serif;
  padding: 0;
  margin: 0 0 15px 0;
}

/* FAQ headings sit inside <summary> — keep them inline, not block */
.faq .faq-item summary h3 {
  display: inline;
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
  font-family: inherit;
}

/* Contact info headings were <h4>, now <h3> under the section <h2> */
.contact .info h3 {
  padding: 0 0 0 60px;
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 5px;
  color: #45505b;
}

/*--- Credentials strip (verifiable trust signals) ----------------*/
.credentials-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 0 auto 10px;
  padding: 0;
  list-style: none;
}
.credentials-strip li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  background: #fff;
  border: 1px solid #e6eaee;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #45505b;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}
.credentials-strip li i {
  color: #0563bb;
  font-size: 18px;
}
.credentials-strip a {
  color: inherit;
  text-decoration: none;
}
.credentials-strip a:hover {
  color: #0563bb;
}

/*--- Tech stack grid (replaces the fake-precision % bars) --------*/
.tech-stack .stack-group {
  height: 100%;
  padding: 26px 24px;
  background: #fff;
  border: 1px solid #e6eaee;
  border-radius: 10px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
  transition: 0.3s;
}
.tech-stack .stack-group:hover {
  box-shadow: 0 10px 28px rgba(5, 99, 187, 0.1);
  transform: translateY(-3px);
}
.tech-stack .stack-group h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 700;
  color: #45505b;
}
.tech-stack .stack-group h3 i {
  font-size: 22px;
  color: #0563bb;
}
.tech-stack .stack-group > p {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.6;
  color: #6b7280;
}
.tech-stack .stack-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tech-stack .stack-tags li {
  padding: 5px 11px;
  background: #f2f6fb;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 500;
  color: #0563bb;
}

/*--- How I work (numbered process) ------------------------------*/
.process-step {
  position: relative;
  height: 100%;
  padding: 26px 24px 24px;
  background: #fff;
  border: 1px solid #e6eaee;
  border-radius: 10px;
}
.process-step .step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: #0563bb;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
}
.process-step h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
  color: #45505b;
}
.process-step p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.65;
  color: #6b7280;
}

/*--- Case studies -----------------------------------------------*/
.case-studies .case-study {
  margin-bottom: 34px;
  padding: 30px;
  background: #fff;
  border: 1px solid #e6eaee;
  border-radius: 12px;
  box-shadow: 0 4px 22px rgba(0, 0, 0, 0.05);
}
.case-studies .case-study:last-child {
  margin-bottom: 0;
}
.case-studies .case-study h3 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 700;
  color: #45505b;
}
.case-studies .case-meta {
  margin: 0 0 16px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: #0563bb;
}
.case-studies .case-study h4 {
  margin: 18px 0 6px;
  font-size: 15px;
  font-weight: 700;
  color: #45505b;
}
.case-studies .case-study p,
.case-studies .case-study li {
  font-size: 15px;
  line-height: 1.75;
  color: #4b5563;
}
.case-studies .case-study ul {
  margin: 0;
  padding-left: 20px;
}
.case-studies .case-study ul li {
  margin-bottom: 6px;
}
.case-studies .case-outcome {
  margin-top: 18px;
  padding: 14px 18px;
  background: #f2f6fb;
  border-left: 4px solid #0563bb;
  border-radius: 0 6px 6px 0;
}
.case-studies .case-outcome p {
  margin: 0;
}
.case-studies .case-links {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.case-studies .case-links a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border: 1px solid #0563bb;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #0563bb;
  text-decoration: none;
  transition: 0.3s;
}
.case-studies .case-links a:hover {
  background: #0563bb;
  color: #fff;
}
.case-studies .case-thumb {
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid #e6eaee;
}

/*--- FAQ (native details/summary — no JS, crawlable) ------------*/
.faq .faq-item {
  margin-bottom: 14px;
  background: #fff;
  border: 1px solid #e6eaee;
  border-radius: 10px;
  overflow: hidden;
}
.faq .faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 22px;
  font-size: 16.5px;
  font-weight: 600;
  color: #45505b;
  cursor: pointer;
  list-style: none;
}
.faq .faq-item summary::-webkit-details-marker {
  display: none;
}
.faq .faq-item summary::after {
  content: "\002B";
  flex: 0 0 auto;
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
  color: #0563bb;
  transition: transform 0.25s ease;
}
.faq .faq-item[open] summary::after {
  content: "\2212";
}
.faq .faq-item summary:hover {
  color: #0563bb;
}
.faq .faq-answer {
  padding: 0 22px 20px;
  font-size: 15px;
  line-height: 1.75;
  color: #4b5563;
}
.faq .faq-answer p:last-child,
.faq .faq-answer ul:last-child {
  margin-bottom: 0;
}

/*--- Facts: prefix/suffix around the animated counter ------------
   The bundled PureCounter build supports only decimals/duration,
   so "$" and "K+" live in sibling spans inside a flex wrapper.
-----------------------------------------------------------------*/
.facts .count-box .count-value {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 1px;
}
.facts .count-box .count-value span {
  display: inline-block;
  font-size: 36px;
  font-weight: 600;
  color: #011426;
  line-height: 1.1;
}
.facts .count-box .count-value .count-affix {
  font-size: 27px;
}

/*--- More Projects grid -----------------------------------------*/
.more-projects .project-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 26px 26px 22px;
  background: #fff;
  border: 1px solid #e6eaee;
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
  transition: 0.3s;
}
.more-projects .project-card:hover {
  box-shadow: 0 10px 28px rgba(5, 99, 187, 0.1);
  transform: translateY(-3px);
}
.more-projects .project-card h3 {
  margin: 0 0 10px;
  font-size: 18.5px;
  font-weight: 700;
  line-height: 1.35;
  color: #45505b;
}
.more-projects .project-card > p {
  flex: 1 1 auto;
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.72;
  color: #4b5563;
}
.more-projects .project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}
.more-projects .project-stack li {
  padding: 4px 10px;
  background: #f2f6fb;
  border-radius: 4px;
  font-size: 12.5px;
  font-weight: 500;
  color: #0563bb;
}
.more-projects .project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #0563bb;
  text-decoration: none;
  word-break: break-word;
}
.more-projects .project-link:hover {
  color: #067ded;
  text-decoration: underline;
}

/*--- Client reviews (real, verified quotes) ----------------------*/
.review-grid .review-card {
  height: 100%;
  margin: 0;
  padding: 26px 26px 22px;
  background: #fff;
  border: 1px solid #e6eaee;
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
}
.review-grid .review-stars {
  margin: 0 0 12px;
  font-size: 17px;
  letter-spacing: 2px;
  color: #f0a500;
  line-height: 1;
}
.review-grid blockquote {
  flex: 1 1 auto;
  margin: 0 0 16px;
  padding: 0;
  border: 0;
  font-size: 15.5px;
  line-height: 1.75;
  color: #3f4854;
  quotes: none;
}
.review-grid blockquote::before {
  content: "\201C";
  margin-right: 2px;
  color: #0563bb;
  font-weight: 700;
}
.review-grid blockquote::after {
  content: "\201D";
  margin-left: 1px;
  color: #0563bb;
  font-weight: 700;
}
.review-grid figcaption {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 14px;
  border-top: 1px solid #eef1f4;
}
.review-grid figcaption strong {
  font-size: 15px;
  font-weight: 700;
  color: #45505b;
}
.review-grid figcaption span {
  font-size: 13px;
  color: #7b8794;
}
.review-grid .review-source {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  font-size: 12.5px;
  font-weight: 600;
  color: #0563bb;
}
.review-grid .review-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}
.review-grid .review-tags li {
  padding: 4px 10px;
  background: #f2f6fb;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  color: #0563bb;
}
.review-grid .repeat-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 4px;
  background: #e7f5ec;
  font-size: 11.5px;
  font-weight: 600;
  color: #157347;
  vertical-align: middle;
}

/*--- Contact / footer extras ------------------------------------*/
.contact .info .response-time {
  margin-top: 6px;
  font-size: 13.5px;
  color: #6b7280;
}

.page-meta {
  margin-top: 14px;
  font-size: 13px;
  color: #9aa5b1;
}
.page-meta a {
  color: #9aa5b1;
  text-decoration: underline;
}
.page-meta a:hover {
  color: #fff;
}

/*--- Legal / simple content pages (privacy.html, 404.html) -------*/
.legal-page {
  max-width: 820px;
  margin: 0 auto;
  padding: 90px 20px 70px;
}
.legal-page h1 {
  margin-bottom: 6px;
  font-size: 34px;
  font-weight: 700;
  color: #45505b;
}
.legal-page .updated {
  margin-bottom: 30px;
  font-size: 14px;
  color: #6b7280;
}
.legal-page h2 {
  margin: 32px 0 10px;
  font-size: 20px;
  font-weight: 700;
  color: #45505b;
}
.legal-page p,
.legal-page li {
  font-size: 15.5px;
  line-height: 1.8;
  color: #4b5563;
}
.legal-page ul {
  padding-left: 22px;
}

@media (max-width: 991px) {
  .legal-page {
    padding-top: 70px;
  }
}

/*--------------------------------------------------------------
# Accessibility fixes (from the UI/UX audit)
--------------------------------------------------------------*/

/*--- 1. Touch-device portfolio overlay ---------------------------
   DORMANT: the "Selected Work" (#portfolio) section was removed, so
   nothing currently matches these selectors. Kept deliberately —
   the template hides .portfolio-info behind opacity:0 and reveals it
   only on :hover, which makes project titles invisible on every
   touch device. If that section is ever restored, this fix (plus the
   88% hover scrim below) restores it working correctly.
-----------------------------------------------------------------*/
@media (hover: none), (pointer: coarse) {
  .portfolio .portfolio-wrap .portfolio-info {
    opacity: 1;
    background: linear-gradient(
      to top,
      rgba(28, 34, 41, 0.95) 0%,
      rgba(28, 34, 41, 0.9) 60%,
      rgba(28, 34, 41, 0.8) 100%
    );
    padding: 18px 16px;
  }
  .portfolio .portfolio-wrap .portfolio-info h3,
  .portfolio .portfolio-wrap .portfolio-info p {
    color: #fff;
  }
  /* Icon actions need a real tap area once they're always visible */
  .portfolio .portfolio-wrap .portfolio-info .portfolio-links a {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* Desktop hover overlay: the template's white scrim is 70%, which
   leaves #45505b text at ~4.4:1 over darker screenshots. 88% keeps
   it above 4.5:1 whatever the image underneath. */
.portfolio .portfolio-wrap::before {
  background: rgba(255, 255, 255, 0.88);
}

/*--- 2. Touch targets: icon-only social links --------------------
   These were 24x25px. WCAG exempts inline prose links, but these
   are icon-only controls and need the full 44x44 target.
-----------------------------------------------------------------*/
#hero .social-links a,
#footer .social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0 3px;
  border-radius: 8px;
}
#hero .social-links a:hover,
#footer .social-links a:hover {
  background: rgba(5, 99, 187, 0.08);
}

/*--- 3. Contrast corrections ------------------------------------
   Every value below failed WCAG AA (4.5:1) when measured against
   its real computed background.
-----------------------------------------------------------------*/

/* Review stars: #f0a500 on white was 2.08:1 -> #b45309 is ~5.0:1 */
.review-grid .review-stars {
  color: #b45309;
}

/* Review caption meta: #7b8794 on white was 3.66:1 */
.review-grid figcaption span {
  color: #5b6672;
}

/* Footer meta: #9aa5b1 on the light #f7f8f9 footer was 2.35:1.
   The old hover was #fff — invisible, since this footer is light. */
.page-meta {
  color: #5a6672;
}
.page-meta a {
  color: #5a6672;
}
.page-meta a:hover {
  color: #0563bb;
}

/* Contact block body copy: template used #728394 on white (3.9:1) */
.contact .info p {
  color: #55606d;
}
.contact .info .response-time {
  color: #5b6672;
}

/* Supporting copy used across the new sections */
.tech-stack .stack-group > p,
.process-step p {
  color: #5b6672;
}

/*--- 4. Reduced motion ------------------------------------------
   Bootstrap ships some reduced-motion rules, but AOS scroll
   animations and the custom transitions were not covered.
-----------------------------------------------------------------*/
@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;
  }
  /* AOS: show content in its final state, skip the travel */
  [data-aos] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .tech-stack .stack-group:hover,
  .more-projects .project-card:hover {
    transform: none;
  }
  html {
    scroll-behavior: auto;
  }
}

/*--- Print: make the resume actually printable -------------------*/
@media print {
  #header,
  #hero .social-links,
  .hero-cta,
  .back-to-top,
  #preloader,
  .contact form,
  .faq,
  .testimonials,
  #portfolio-flters {
    display: none !important;
  }
  body {
    color: #000;
  }
  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 11px;
  }
}
