/* ============================================================
   TechnBrains — Author Profile (Muhammad Arif)
   Layers on hire-developers.css (nav, footer, buttons).
   Page-scoped under .ap-body. Outfit throughout.
   ============================================================ */
.ap-body {
  background: #FFFFFF;
  color: #16181D;
  font-family: 'Outfit', system-ui, sans-serif;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
  --r: #EC1C24;
  --ink: #16181D;
  --charcoal: #1A1A1C;
  --mute: #5A6478;
  --soft: #6E7787;
  --line: #E7E8EC;
  --gray: #F6F6F4;
  --dark: #05070B;
}
.ap-wrap { max-width: 1240px; margin: 0 auto; padding: 0 48px; box-sizing: border-box; }

/* reveal */
.ap-rev { opacity: 0; transform: translateY(28px); transition: opacity .8s cubic-bezier(.22,1,.36,1), transform .8s cubic-bezier(.22,1,.36,1); }
.ap-rev.in { opacity: 1; transform: none; }
.ap-rev.d1 { transition-delay: .08s; } .ap-rev.d2 { transition-delay: .16s; } .ap-rev.d3 { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) { .ap-rev { opacity: 1; transform: none; transition: none; } }

/* type scale ---------------------------------------------- */
.ap-h1 { font-size: clamp(44px, 6.4vw, 75px); font-weight: 700; line-height: 1.0; letter-spacing: -0.035em; margin: 0; }
.ap-h2 { font-size: clamp(34px, 5vw, 60px); font-weight: 600; line-height: 1.04; letter-spacing: -0.03em; color: var(--charcoal); margin: 0; text-wrap: balance; }
.ap-h3 { font-size: clamp(22px, 2.2vw, 28px); font-weight: 600; line-height: 1.2; letter-spacing: -0.02em; margin: 0; }
.ap-eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--r); }
.ap-eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--r); }
.ap-lead { font-size: clamp(19px, 1.8vw, 23px); line-height: 1.62; font-weight: 400; color: var(--mute); margin: 0; }
.ap-body-lg { font-size: clamp(24px, 2.6vw, 34px); line-height: 1.4; font-weight: 500; color: #3A3F4A; }

/* ============================================================ HERO (dark) */
.ap-hero {
  position: relative; color: #fff; overflow: hidden;
  padding: 140px 0 72px;
  background: #05070B;
  background-image:
    radial-gradient(900px 540px at 22% 24%, rgba(236,28,36,0.20) 0%, transparent 60%),
    radial-gradient(880px 560px at 92% 82%, rgba(22,40,72,0.55) 0%, transparent 64%),
    linear-gradient(180deg, #0A0F18 0%, #05070B 74%);
}
.ap-hero-grid {
  position: absolute; inset: 0; z-index: 0;
  background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 30px 30px;
  -webkit-mask-image: radial-gradient(ellipse 72% 70% at 40% 38%, #000 8%, transparent 80%);
  mask-image: radial-gradient(ellipse 72% 70% at 40% 38%, #000 8%, transparent 80%);
}
.ap-hero-inner { position: relative; z-index: 2; }

.ap-crumbs { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 500; color: rgba(255,255,255,0.5); margin-bottom: 34px; flex-wrap: wrap; }
.ap-crumbs a { color: rgba(255,255,255,0.5); transition: color .2s ease; }
.ap-crumbs a:hover { color: var(--r); }
.ap-crumbs .sep { opacity: 0.4; }
.ap-crumbs .now { color: rgba(255,255,255,0.85); }

.ap-hero-grid-2 { display: grid; grid-template-columns: 300px 1fr; gap: 56px; align-items: center; }

.ap-verify { display: inline-flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 30px 0 0; }
.ap-verify-pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; letter-spacing: 0.02em;
  color: #fff; background: rgba(236,28,36,0.14);
  border: 1px solid rgba(236,28,36,0.4); border-radius: 100px;
  padding: 8px 16px 8px 12px;
}
.ap-verify-pill svg { color: var(--r); }
.ap-verify-li {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 500; color: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.16); border-radius: 100px;
  padding: 8px 16px; transition: all .2s ease;
}
.ap-verify-li:hover { border-color: rgba(255,255,255,0.4); color: #fff; }
.ap-verify-li svg { color: #0A66C2; }

.ap-hero h1 { color: #fff; }
.ap-social { display: flex; gap: 12px; margin-top: 26px; }
.ap-social-ic {
  display: grid; place-items: center; width: 46px; height: 46px;
  border-radius: 12px; color: #fff;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.16);
  transition: background .2s ease, border-color .2s ease, transform .2s ease, color .2s ease;
}
.ap-social-ic:hover { background: var(--r); border-color: var(--r); color: #fff; transform: translateY(-2px); }
.ap-name-row { display: flex; align-items: center; gap: 40px; flex-wrap: wrap; }
.ap-li-logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; transition: opacity .2s ease; }
.ap-li-logo:hover { opacity: 0.82; }
.ap-li-mark { background: #0A66C2; color: #fff; font-weight: 700; border-radius: 6px; padding: 3px 7px; font-size: clamp(18px, 1.6vw, 22px); line-height: 1; font-family: Arial, Helvetica, sans-serif; }
.ap-li-word { color: #fff; font-weight: 600; font-size: clamp(18px, 1.6vw, 22px); letter-spacing: -0.01em; }
.ap-hero h1 .hl { color: var(--r); }
.ap-hero-role {
  margin: 22px 0 0; font-size: clamp(19px, 1.85vw, 24px); font-weight: 500;
  line-height: 1.35; color: rgba(255,255,255,0.92); white-space: nowrap;
}
.ap-hero-role .div { color: var(--r); margin: 0 10px; font-weight: 400; }
.ap-hero-sub { margin: 24px 0 0; max-width: 600px; font-size: clamp(18px, 1.6vw, 20px); line-height: 1.66; font-weight: 400; color: rgba(255,255,255,0.62); }

.ap-hero-actions { margin-top: 38px; display: flex; gap: 14px; flex-wrap: wrap; }
.ap-hero-actions .hd-btn-secondary { color: #fff; border-color: rgba(255,255,255,0.3); }
.ap-hero-actions .hd-btn-secondary:hover { background: #fff; color: #000; border-color: #fff; }

/* hero stat strip */
.ap-hero-stats { margin-top: 44px; display: flex; gap: 40px; flex-wrap: wrap; padding-top: 30px; border-top: 1px solid rgba(255,255,255,0.1); }
.ap-hero-stat .v { font-size: clamp(30px, 3vw, 40px); font-weight: 700; letter-spacing: -0.03em; color: #fff; line-height: 1; }
.ap-hero-stat .v .u { color: var(--r); }
.ap-hero-stat .l { margin-top: 8px; font-size: 14px; font-weight: 500; color: rgba(255,255,255,0.55); letter-spacing: 0.01em; }

/* hero portrait — circular */
.ap-portrait { position: relative; justify-self: center; width: 100%; max-width: 290px; aspect-ratio: 1 / 1; }
.ap-portrait-card {
  position: relative; border-radius: 50%; overflow: hidden;
  border: 4px solid rgba(255,255,255,0.06);
  box-shadow: 0 50px 90px -46px rgba(0,0,0,0.9);
  aspect-ratio: 1 / 1; width: 100%; background: #11151F;
}
.ap-portrait-card img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 16%; display: block; }
.ap-portrait-card::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: linear-gradient(180deg, transparent 60%, rgba(5,7,11,0.4) 100%); pointer-events: none; }
/* concentric ring accent around the circle */
.ap-portrait-accent { position: absolute; inset: -16px; border-radius: 50%; border: 1.5px solid rgba(236,28,36,0.45); pointer-events: none; }
.ap-portrait-verify { position: absolute; right: 8%; bottom: 8%; top: auto; transform: none; width: clamp(30px, 3.4vw, 40px); height: auto; z-index: 4; filter: drop-shadow(0 6px 14px rgba(0,0,0,0.45)); }
.ap-portrait-accent::before { content: ""; position: absolute; inset: -14px; border-radius: 50%; border: 1px dashed rgba(255,255,255,0.12); }
.ap-portrait-badge {
  position: absolute; left: 4%; bottom: 4%; z-index: 3;
  display: flex; flex-direction: column; gap: 2px;
  background: #fff; color: var(--charcoal);
  padding: 14px 20px; border-radius: 14px;
  box-shadow: 0 24px 50px -22px rgba(0,0,0,0.7);
}
.ap-portrait-badge .v { font-size: 30px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.ap-portrait-badge .v .u { color: var(--r); }
.ap-portrait-badge .l { font-size: 13px; font-weight: 600; color: var(--soft); letter-spacing: 0.02em; }

/* ============================================================ ABOUT (white) */
.ap-section { padding: var(--ap-pad, clamp(65px, 8.12vw, 80px)) 0; position: relative; }
.ap-section.gray { background: var(--gray); }
/* About → Core Expertise are both white: collapse the doubled gap so the heading sits centered between bio and tiles */
.ap-section[data-screen-label="03 Expertise"] { padding-top: 0; }

.ap-about-grid { display: block; }
.ap-about-copy { display: flex; flex-direction: column; gap: 22px; }
.ap-about-copy .ap-h2 { margin-bottom: 10px; }
.ap-about-copy p { margin: 0; }

.ap-facts { position: sticky; top: 110px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: #fff; box-shadow: 0 30px 70px -50px rgba(12,35,64,0.4); }
.ap-fact { display: flex; align-items: center; gap: 18px; padding: 20px 26px; border-bottom: 1px solid var(--line); transition: background .25s ease; }
.ap-fact:last-child { border-bottom: none; }
.ap-fact:hover { background: #FBFBFA; }
.ap-fact-ic { flex-shrink: 0; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: rgba(236,28,36,0.08); color: var(--r); transition: background .25s ease; }
.ap-fact:hover .ap-fact-ic { background: rgba(236,28,36,0.13); }
.ap-fact-ic svg { width: 23px; height: 23px; }
.ap-fact-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.ap-fact .k { font-size: 12.5px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--r); }
.ap-fact .v { font-size: 17px; font-weight: 600; color: var(--charcoal); line-height: 1.35; }
.ap-fact-no { flex-shrink: 0; font-family: Georgia, 'Times New Roman', serif; font-size: 32px; font-weight: 400; letter-spacing: 0.02em; color: #D5D8DF; line-height: 1; font-variant-numeric: lining-nums; transition: color .25s ease; }
.ap-fact:hover .ap-fact-no { color: var(--r); }

/* ============================================================ EXPERTISE */
.ap-sec-head { max-width: 720px; margin-bottom: clamp(44px, 5vw, 64px); }
.ap-sec-head .ap-h2 { margin-top: 18px; }
.ap-sec-head .ap-lead { margin-top: 20px; }

.ap-exp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.ap-exp-card {
  position: relative; background: #fff; border: 1px solid var(--line);
  border-radius: 18px; padding: 32px 30px 30px;
  display: flex; flex-direction: column; gap: 22px;
  transition: transform .4s cubic-bezier(.22,1,.36,1), box-shadow .4s ease, border-color .4s ease;
}
.ap-section.gray .ap-exp-card { background: #fff; }
.ap-exp-card:hover { transform: translateY(-5px); border-color: rgba(236,28,36,0.28); box-shadow: 0 36px 64px -40px rgba(236,28,36,0.35); }
.ap-exp-ic { width: 50px; height: 50px; border-radius: 12px; display: grid; place-items: center; background: rgba(236,28,36,0.08); color: var(--r); }
.ap-exp-ic svg { width: 25px; height: 25px; }
.ap-exp-card h3 { color: var(--charcoal); }
.ap-exp-tags { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 2px; }
.ap-tag {
  display: inline-flex; align-items: center;
  font-size: 15px; font-weight: 500; color: #2E333D;
  background: var(--gray); border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 14px; transition: all .2s ease;
}
.ap-section.gray .ap-tag { background: #F1F1EE; }
.ap-exp-card:hover .ap-tag { border-color: rgba(236,28,36,0.2); }

/* tech-stack tile grid (matches services page) */
.ap-tools-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.ap-tool {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 30px 16px 24px; border: 1px solid var(--line); border-radius: 16px;
  background: #fff; text-align: center;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
  animation: apFade .4s ease both;
}
.ap-tool:hover { transform: translateY(-4px); border-color: rgba(236,28,36,0.22); box-shadow: 0 18px 40px -26px rgba(236,28,36,0.4); }
@keyframes apFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.ap-tool-tile { width: 60px; height: 60px; border-radius: 15px; display: grid; place-items: center; font-weight: 700; font-size: 18px; letter-spacing: -0.02em; }
.ap-tool-name { font-size: 16px; font-weight: 500; color: var(--charcoal); line-height: 1.3; }

/* ============================================================ ACHIEVEMENTS */
.ap-split { display: grid; grid-template-columns: minmax(240px, 0.78fr) 1.5fr; gap: 56px; align-items: center; }
.ap-split-head { position: static; }
.ap-split-head .ap-h2 { font-size: clamp(28px, 3.1vw, 44px); }
.ap-split-head .ap-lead { margin-top: 18px; font-size: 17px; }
.ap-achv-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.ap-achv {
  display: flex; flex-direction: column; gap: 16px;
  padding: 28px 26px; background: #fff; border: 1px solid var(--line); border-radius: 18px;
  transition: transform .4s ease, border-color .4s ease, box-shadow .4s ease;
}
.ap-achv:hover { transform: translateY(-5px); border-color: rgba(236,28,36,0.22); box-shadow: 0 36px 70px -46px rgba(12,35,64,0.4); }
.ap-achv-no { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; color: var(--r); line-height: 1; }
.ap-achv-t { margin: 0; font-size: clamp(16px, 1.4vw, 18px); font-weight: 500; line-height: 1.5; color: var(--charcoal); }

/* ============================================================ CREDENTIALS */
.ap-cred {
  display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(40px, 5vw, 80px);
  align-items: center; padding: clamp(40px, 4vw, 60px);
  background: var(--dark); color: #fff; border-radius: 26px; overflow: hidden; position: relative;
  background-image: radial-gradient(700px 400px at 12% 20%, rgba(236,28,36,0.16) 0%, transparent 62%);
}
.ap-cred > div:first-child { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.ap-cred-solo { grid-template-columns: 1fr; text-align: center; padding: clamp(64px, 7vw, 100px) clamp(40px, 6vw, 96px); }
.ap-cred-solo .ap-cred-copy { max-width: 860px; margin: 0 auto; }
.ap-cred-solo .ap-h3 { font-size: clamp(28px, 3.2vw, 42px); line-height: 1.18; }
.ap-cred-solo .ap-cred-copy p { margin: 26px auto 0; font-size: clamp(20px, 1.8vw, 25px); line-height: 1.6; }
.ap-cred-big { font-size: clamp(72px, 11vw, 132px); font-weight: 700; letter-spacing: -0.04em; line-height: 0.9; }
.ap-cred-big .u { color: var(--r); }
.ap-cred-big-sub { margin-top: 12px; font-size: 15px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(255,255,255,0.55); }
.ap-cred-copy .ap-h3 { color: #fff; }
.ap-cred-copy p { margin: 16px 0 0; font-size: clamp(18px, 1.5vw, 20px); line-height: 1.66; color: rgba(255,255,255,0.66); font-weight: 400; }
.ap-cred-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.ap-cred-chip {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 14.5px; font-weight: 500; color: rgba(255,255,255,0.85);
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.14);
  border-radius: 100px; padding: 9px 16px;
}
.ap-cred-chip svg { color: var(--r); }

/* ============================================================ CONTRIBUTIONS */
.ap-contrib-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; flex-wrap: wrap; margin-bottom: clamp(40px, 5vw, 56px); }
.ap-contrib-head .left { max-width: 100%; }
.ap-contrib-head .ap-h2 { margin-top: 18px; }
.ap-contrib-head .ap-lead { margin-top: 18px; }
.ap-viewall {
  display: inline-flex; align-items: center; gap: 9px; flex-shrink: 0;
  font-size: 16px; font-weight: 600; color: var(--charcoal);
  border: 1px solid var(--line); border-radius: 100px; padding: 13px 22px;
  transition: all .25s ease;
}
.ap-viewall:hover { border-color: var(--r); color: var(--r); }
.ap-viewall svg { transition: transform .25s ease; }
.ap-viewall:hover svg { transform: translateX(3px); }

.ap-contrib-grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 1fr; gap: 28px; }
.ap-art {
  display: flex; flex-direction: column; background: #fff;
  border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}
.ap-art:hover { transform: translateY(-5px); border-color: rgba(236,28,36,0.22); box-shadow: 0 34px 60px -36px rgba(12,35,64,0.42); }
.ap-art-img { height: 196px; background-size: cover; background-position: center; position: relative; }
.ap-art-cat {
  position: absolute; top: 14px; left: 14px;
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: #fff; background: rgba(5,7,11,0.72); backdrop-filter: blur(6px);
  border-radius: 100px; padding: 6px 13px;
}
.ap-art-body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.ap-art-title { font-size: 21px; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; color: var(--charcoal); transition: color .25s ease; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.ap-art:hover .ap-art-title { color: var(--r); }
.ap-art-excerpt { margin: 14px 0; font-size: 16px; line-height: 1.6; color: var(--mute); font-weight: 400; }
.ap-art-meta { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--soft); }
.ap-art-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--soft); }
.ap-contrib-more { display: flex; justify-content: center; margin-top: clamp(40px, 5vw, 56px); }

/* ============================================================ CTA (dark) */
.ap-cta { position: relative; background: var(--dark); color: #fff; overflow: hidden; padding: clamp(80px, 9vw, 130px) 0; }
.ap-cta::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(720px 440px at 50% 0%, rgba(236,28,36,0.22) 0%, transparent 62%); }
.ap-cta-inner { position: relative; z-index: 1; max-width: 820px; margin: 0 auto; text-align: center; }
.ap-cta .ap-h2 { color: #fff; }
.ap-cta-sub { margin: 22px auto 0; max-width: 620px; font-size: clamp(18px, 1.6vw, 22px); line-height: 1.6; font-weight: 400; color: rgba(255,255,255,0.66); }
.ap-cta-actions { margin-top: 40px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.ap-cta-actions .hd-btn-secondary { color: #fff; border-color: rgba(255,255,255,0.3); }
.ap-cta-actions .hd-btn-secondary:hover { background: #fff; color: #000; border-color: #fff; }

/* ============================================================
   Load More button — extracted from hire-developers.css (.hd-btn
   / .hd-btn-primary) so the 112 KB nav/footer sheet is not shipped.
   Scoped under .ap-body; --hd-red inlined as #EC1C24 (its value).
   ============================================================ */
.ap-body .hd-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 26px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.005em;
  border: 1px solid transparent;
  transition: all 0.25s ease;
  cursor: pointer;
}
.ap-body .hd-btn-primary {
  background: #EC1C24;
  color: #fff;
  box-shadow: 0 8px 24px -10px rgba(236, 28, 36, 0.5);
}
.ap-body .hd-btn-primary:hover {
  background: #FF2E36;
  transform: translateY(-2px);
  box-shadow: 0 14px 36px -10px rgba(236, 28, 36, 0.7);
}

/* Contribution excerpt — clamp to 3 lines (client request). Additive; keeps the
   source colour/spacing, limits height + adds an ellipsis. min-height reserves the
   3 lines (line-height 1.6 × 3) so every card has equal body height / meta baseline. */
.ap-body .ap-art-excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 4.8em;
}

/* ============================================================
   Inline-style removal — QA tweak values moved here as scoped
   rules (0px change). Dynamic values arrive as CSS custom
   properties on the element (data only). Scoped under .ap-body.
   ============================================================ */
.ap-body .ap-name-row { padding: 2px; align-items: center; gap: 204px; }
/* .ap-body .ap-h1 { font-size: 7px; }
.ap-body .ap-h1 .hl { font-size: 75px; } */
.ap-body .ap-hero-role { font-size: 25px; }
.ap-body .ap-about-copy .ap-h2 { margin-bottom: 8px; }
.ap-body .ap-about-copy .ap-body-lg { font-size: 25px; }
.ap-body .ap-sec-head { margin-bottom: clamp(36px, 4vw, 52px); max-width: none; text-align: left; }
.ap-body .ap-cred .ap-h3 { margin-top: 0; letter-spacing: 0; line-height: 1.18; font-size: 45px; }
.ap-body .ap-cred-copy p { font-size: 21px; }

/* Expertise reveal stagger (was inline animation-delay: i*40ms). */
.ap-body .ap-tools-grid .ap-tool:nth-child(1) { animation-delay: 0ms; }
.ap-body .ap-tools-grid .ap-tool:nth-child(2) { animation-delay: 40ms; }
.ap-body .ap-tools-grid .ap-tool:nth-child(3) { animation-delay: 80ms; }
.ap-body .ap-tools-grid .ap-tool:nth-child(4) { animation-delay: 120ms; }
.ap-body .ap-tools-grid .ap-tool:nth-child(5) { animation-delay: 160ms; }
.ap-body .ap-tools-grid .ap-tool:nth-child(6) { animation-delay: 200ms; }
.ap-body .ap-tools-grid .ap-tool:nth-child(7) { animation-delay: 240ms; }
.ap-body .ap-tools-grid .ap-tool:nth-child(8) { animation-delay: 280ms; }
.ap-body .ap-tools-grid .ap-tool:nth-child(9) { animation-delay: 320ms; }
.ap-body .ap-tools-grid .ap-tool:nth-child(10) { animation-delay: 360ms; }
.ap-body .ap-tools-grid .ap-tool:nth-child(11) { animation-delay: 400ms; }
.ap-body .ap-tools-grid .ap-tool:nth-child(12) { animation-delay: 440ms; }

/* Contribution card reveal stagger (was inline transition-delay by column). */
.ap-body .ap-contrib-grid .ap-art:nth-child(3n+1) { transition-delay: 0s; }
.ap-body .ap-contrib-grid .ap-art:nth-child(3n+2) { transition-delay: 0.08s; }
.ap-body .ap-contrib-grid .ap-art:nth-child(3n) { transition-delay: 0.16s; }

/* Contribution thumbnail — image from per-card custom property (set in PHP). */
.ap-body .ap-art-img { background-image: var(--ap-bg); }

/* Credentials optional image — rendered as the card background (url from the
   --ap-cred-bg custom property). Image only; when no image is set the class is
   absent, so the base .ap-cred gradient shows through instead. */
.ap-body .ap-cred-bg {
  background-image: var(--ap-cred-bg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Skill tile with an uploaded icon — plain, no colour box (fits the 60×60 tile). */
.ap-body .ap-tool-tile--img { background: transparent;  }
.ap-body .ap-tool-tile--img img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* Phone/tablet Load More — reveal 4 at a time.
   Initial overflow is hidden in CSS (before paint → no layout shift / flash);
   JS opts cards in with .ap-shown as the user taps Load More. Cards stay in the
   DOM/HTML source, so they remain crawlable. Desktop (≥993px) shows all. */
@media (max-width: 992px) {
  .ap-body .ap-contrib-grid .ap-art:nth-child(n+5) { display: none; }
  .ap-body .ap-contrib-grid .ap-art.ap-shown { display: flex; }
}

/* ============================================================
   RESPONSIVE LADDER — theme-aligned breakpoints.
   Desktop ≥1280px stays QA-exact; everything below scales.
   Ordered largest→smallest so each narrower step overrides.
   Scoped .ap-body; matches the specificity of the fixed
   overrides above (.ap-body .x) so no !important is needed.
   ============================================================ */

/* ── 1440 ── name group tightens (was gap:204px) */
@media (max-width: 1440px) {
  .ap-body .ap-name-row { gap: 120px; }
}

/* ── 1366 ── */
@media (max-width: 1366px) {
  .ap-body .ap-name-row { gap: 96px; }
}

/* ── 1280 ── first padding step below desktop */
@media (max-width: 1280px) {
  .ap-wrap { padding: 0 40px; }
  .ap-hero { padding: 120px 0 72px; }
  .ap-body .ap-name-row { gap: 72px; }
}

/* ── 1024 ── scale fixed-px overrides toward theme's type step; tools 4→3 */
@media (max-width: 1024px) {
  .ap-body .ap-hero-role { font-size: 20px; }
  .ap-body .ap-about-copy .ap-body-lg { font-size: 20px; }
  .ap-body .ap-cred .ap-h3 { font-size: 34px; }
  .ap-body .ap-cred-copy p { font-size: 18px; }
  .ap-tools-grid { grid-template-columns: repeat(3, 1fr); }
  .ap-hero-grid-2 { gap: 40px; }
  .ap-body .ap-name-row { gap: 48px; }
}

/* ── 992 ── major collapse: hero stacks, grids → 1–2 col */
@media (max-width: 992px) {
  .ap-hero-grid-2 { grid-template-columns: 1fr; gap: 40px; justify-items: center; text-align: center; }
  .ap-portrait { order: -1; justify-self: center; max-width: 270px; }
  .ap-name-row { justify-content: center; }
  .ap-social { justify-content: center; }
  .ap-split { grid-template-columns: 1fr; gap: 30px; }
  .ap-split-head { position: static; }
  .ap-contrib-grid { grid-template-columns: repeat(2, 1fr); }
  .ap-body .ap-name-row { gap: 24px; }
  .ap-wrap { padding: 0 32px; }
  .ap-hero { padding: 110px 0 64px; }
}

/* ── 768 ── mobile: single-column content, tools 3→2 */
@media (max-width: 768px) {
  .ap-wrap { padding: 0 24px; }
  .ap-hero { padding: 104px 0 60px; }
  .ap-body .ap-hero-role { white-space: normal; }
  .ap-tools-grid { grid-template-columns: repeat(2, 1fr); }
  .ap-contrib-grid { grid-template-columns: 1fr; }
  .ap-body .ap-name-row { gap: 16px; }
  .ap-body .ap-cred .ap-h3 { font-size: 30px; }
}

/* ── 640 ── small phone: type + achievements single-col */
@media (max-width: 640px) {
  .ap-body .ap-hero-role { font-size: 18px; }
  .ap-about-copy { align-items: center; text-align: center; }
  .ap-body .ap-about-copy .ap-body-lg { font-size: 18px; }
  .ap-body .ap-cred-copy p { font-size: 16px; }
  .ap-achv-grid { grid-template-columns: 1fr; }
  .ap-wrap { padding: 0 20px; }
  .ap-hero { padding: 92px 0 52px; }
  .ap-portrait { max-width: 216px; }
  .ap-social-ic { width: 41px; height: 41px; }
  .ap-section { padding: 48px 0; }
  .ap-cta { padding: 64px 0; }
}

/* ── 576 / 480 ── tighten padding; stack name row to kill any overflow */
@media (max-width: 576px) {
  .ap-wrap { padding: 0 16px; }
  .ap-hero { padding: 80px 0 44px; }
  .ap-body .ap-name-row { flex-direction: column; align-items: center; gap: 12px; }
  .ap-body .ap-cred .ap-h3 { font-size: 26px; }
  .ap-tool { padding: 24px 12px 20px; }
}
@media (max-width: 480px) {
  .ap-portrait { max-width: 198px; }
  .ap-section { padding: 40px 0; }
  .ap-cta { padding: 52px 0; }
}

/* ── 430 → 320 ── micro devices: final padding + portrait easing */
@media (max-width: 430px) {
  .ap-wrap { padding: 0 14px; }
  .ap-portrait { max-width: 180px; }
  .ap-body .ap-hero-role { font-size: 17px; }
}
@media (max-width: 360px) {
  .ap-wrap { padding: 0 12px; }
  .ap-tool { padding: 20px 10px 16px; }
}
