/*
Theme Name: Subhan Alam Portfolio
Theme URI: https://www.linkedin.com/in/subhan-alam/
Author: Subhan Alam
Description: Premium personal portfolio — Demand Generation, Digital Marketing & RevOps Strategy. Fully editable via ACF + WordPress admin.
Version: 10.4.1
License: Private
Text Domain: subhan-alam-portfolio
*/

/* ===========================
   CSS VARIABLES
=========================== */
:root {
  /* ── Core palette (overridable by ACF color pickers) ── */
  --navy:        #0f172a;
  --navy-light:  #1e293b;
  --red:         #dc2626;
  --red-hover:   #b91c1c;
  --white:       #ffffff;
  --off-white:   #f8fafc;
  --light-gray:  #f1f5f9;
  --border:      #e2e8f0;
  --muted:       #64748b;
  --text:        #0f172a;

  /* ── Semantic aliases — ACF color pickers target these ── */
  --header-bg:        var(--navy);
  --footer-bg:        var(--navy);
  --footer-text:      rgba(248,250,252,0.55);
  --card-bg:          rgba(248,250,252,0.05);
  --card-border:      rgba(248,250,252,0.08);
  --btn-primary-bg:   var(--red);
  --btn-primary-text: var(--white);

  /* ── Typography & spacing ── */
  --font-display: 'Outfit', sans-serif;
  --font-body:    'Inter', sans-serif;
  --radius:       1rem;
  --radius-sm:    0.5rem;
  --max-w:        80rem;
  --section-py:   6rem;
  --nav-h:        5rem;
  --transition:   0.3s ease;
}

/* ===========================
   RESET & BASE
=========================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea { font-family: inherit; font-size: inherit; }
::selection { background: var(--red); color: var(--white); }

/* ===========================
   UTILITIES
=========================== */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  /* Fluid padding: 20px on very small screens, scales to 48px on wide screens */
  padding-left:  clamp(1.25rem, 5vw, 3rem);
  padding-right: clamp(1.25rem, 5vw, 3rem);
}
.section-py { padding: var(--section-py) 0; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9375rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
}
.btn-primary  { background: var(--btn-primary-bg); color: var(--btn-primary-text); border-color: var(--btn-primary-bg); }
.btn-primary:hover { background: var(--red-hover); border-color: var(--red-hover); color: var(--btn-primary-text); }
.btn-outline  { background: transparent; color: var(--white); border-color: rgba(248,250,252,0.3); }
.btn-outline:hover { background: var(--white); color: var(--navy); border-color: var(--white); }
.btn-outline-dark { background: transparent; color: var(--navy); border-color: var(--border); }
.btn-outline-dark:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }

.tag {
  display: inline-block;
  padding: 0.3rem 0.9rem;
  border: 1px solid rgba(248,250,252,0.15);
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(248,250,252,0.75);
}

.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.75rem;
}
.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--navy);
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.15;
}
.section-title--light { color: var(--white); }
.section-underline {
  width: 3rem;
  height: 0.25rem;
  background: var(--red);
  margin-top: 1rem;
}
.section-underline--center { margin-left: auto; margin-right: auto; }

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.from-left  { transform: translateX(-28px); }
.reveal.from-right { transform: translateX(28px); }
.reveal.visible    { opacity: 1; transform: translate(0); }

/* ===========================
   NAVBAR
=========================== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition);
}
.navbar.scrolled { box-shadow: 0 2px 24px rgba(15,23,42,0.08); }
.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
}
/* Logo: image-based */
.navbar__logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
.navbar__logo img {
  height: 38px;
  width: auto;
  display: block;
  object-fit: contain;
}
/* Fallback text logo if image fails */
.navbar__logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  color: var(--navy);
}
.navbar__logo-text span { color: var(--red); }

.navbar__links {
  display: flex;
  align-items: center;
  gap: 2.25rem;
}
.navbar__links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  transition: color var(--transition);
  text-decoration: none;
}
.navbar__links a:hover { color: var(--navy); }
.navbar__cta {
  margin-left: 0.75rem;
  background: var(--red) !important;
  border-color: var(--red) !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  font-size: 0.8125rem !important;
  letter-spacing: 0.07em !important;
  text-transform: uppercase !important;
  padding: 0.7rem 1.5rem !important;
  box-shadow: 0 2px 14px rgba(220,38,38,0.45) !important;
  transition: all 0.25s ease !important;
}
.navbar__cta:hover {
  background: #b91c1c !important;
  border-color: #b91c1c !important;
  color: #ffffff !important;
  box-shadow: 0 4px 20px rgba(185,28,28,0.55) !important;
  transform: translateY(-2px) !important;
}
.navbar__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
}
.navbar__hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: all var(--transition);
}
.navbar__mobile {
  display: none;
  flex-direction: column;
  padding: 1rem 1.5rem 1.5rem;
  border-top: 1px solid var(--border);
  gap: 0.25rem;
}
.navbar__mobile.open { display: flex; }
.navbar__mobile a {
  display: block;
  padding: 0.75rem 0.5rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--muted);
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}
.navbar__mobile a:hover { color: var(--navy); background: var(--light-gray); }
.navbar__mobile .btn { margin-top: 0.5rem; width: 100%; justify-content: center; }

/* ===========================
   HERO
=========================== */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-h);
  background: var(--navy);
  overflow: hidden;
}
.hero__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  opacity: 0.09;
  animation: blob 14s infinite ease-in-out;
}
.hero__blob--1 { width: 38rem; height: 38rem; background: var(--red); top: 10%; left: -5%; }
.hero__blob--2 { width: 30rem; height: 30rem; background: rgba(248,250,252,0.9); top: 30%; right: -5%; animation-delay: -6s; }
@keyframes blob {
  0%, 100% { transform: translate(0,0) scale(1); }
  33%       { transform: translate(20px,-30px) scale(1.06); }
  66%       { transform: translate(-14px,18px) scale(0.96); }
}

.hero__inner {
  position: relative;
  z-index: 1;
  padding: 4rem 0;
  width: 100%;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}
@media (min-width: 64rem) {
  .hero__grid { grid-template-columns: 1.15fr 0.85fr; gap: 4rem; }
}

/* Left: Content */
.hero__content { display: flex; flex-direction: column; align-items: flex-start; }
.hero__tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2rem; }
.hero__heading {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.5rem, 5.5vw, 4.25rem);
  line-height: 1.08;
  color: var(--white);
  margin-bottom: 1.75rem;
  text-align: left;
}
.hero__heading .gradient {
  background: linear-gradient(90deg, var(--red) 0%, #f87171 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero__subheading {
  font-size: clamp(1rem, 1.8vw, 1.125rem);
  color: rgba(248,250,252,0.65);
  font-weight: 300;
  line-height: 1.8;
  max-width: 38rem;
  margin-bottom: 2.5rem;
  text-align: left;
}
.hero__ctas { display: flex; flex-wrap: wrap; gap: 1rem; }

/* Right: Branded visual block */
.hero__visual {
  position: relative;
  height: 440px;
  display: none;
  border-radius: 1.5rem;
  overflow: hidden; /* clips pattern/rings to rounded corners */
}
@media (min-width: 64rem) { .hero__visual { display: block; } }

/* Border frame */
.hero__visual::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid rgba(220,38,38,0.22);
  border-radius: 1.5rem;
  z-index: 1;
  pointer-events: none;
}

/* Dot-grid background pattern */
.hero__visual-pattern {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(220,38,38,0.22) 1.5px, transparent 1.5px);
  background-size: 22px 22px;
  border-radius: 1.5rem;
}

/* Glow overlay */
.hero__visual-glow {
  position: absolute;
  width: 280px; height: 280px;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(220,38,38,0.12) 0%, transparent 70%);
  border-radius: 50%;
  animation: pulseGlow 4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes pulseGlow {
  0%, 100% { opacity: 0.6; transform: translate(-50%,-50%) scale(1); }
  50%       { opacity: 1;   transform: translate(-50%,-50%) scale(1.12); }
}

/* Concentric rings */
.hero__visual-ring {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(220,38,38,0.18);
  pointer-events: none;
}
.hero__visual-ring--1 { width: 220px; height: 220px; animation: spinRing 18s linear infinite; }
.hero__visual-ring--2 { width: 150px; height: 150px; border-color: rgba(220,38,38,0.12); animation: spinRing 12s linear infinite reverse; }
.hero__visual-ring--3 {
  width: 290px; height: 290px;
  border-color: rgba(220,38,38,0.08);
  border-style: dashed;
  animation: spinRing 30s linear infinite;
}
@keyframes spinRing {
  from { transform: translate(-50%,-50%) rotate(0deg); }
  to   { transform: translate(-50%,-50%) rotate(360deg); }
}

/* Portrait image (if uploaded via ACF) */
.hero__visual-portrait {
  position: absolute;
  inset: 0;
  z-index: 2;
}
.hero__visual-portrait img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top center;
  border-radius: 1.5rem;
}

/* Floating stat cards */
.hero__stat {
  position: absolute;
  z-index: 3;
  background: rgba(15,23,42,0.82);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 0.875rem;
  padding: 1rem 1.25rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  animation: float 7s ease-in-out infinite;
  box-shadow: 0 4px 24px rgba(0,0,0,0.25);
}
/* All cards use positive offsets — safely inside the box, no clipping possible */
.hero__stat--1 { top: 1.25rem;    left: 1.25rem;  animation-delay: 0s; }
.hero__stat--2 { bottom: 1.25rem; right: 1.25rem; animation-delay: -3s; }
.hero__stat--3 { top: 50%; left: 50%; transform: translate(-50%, -50%); animation-name: float3; animation-delay: -5s; }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-9px); }
}
@keyframes float3 {
  0%, 100% { transform: translate(-50%, -50%) translateY(0); }
  50%       { transform: translate(-50%, -50%) translateY(-9px); }
}

.hero__stat-value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.625rem;
  color: var(--white);
  line-height: 1;
}
.hero__stat-value.red { color: #f87171; }
.hero__stat-label {
  font-size: 0.7rem;
  color: rgba(248,250,252,0.65);
  font-weight: 500;
  white-space: nowrap;
  max-width: 10rem;
  line-height: 1.3;
}

/* ===========================
   ABOUT
=========================== */
.about { background: var(--white); }
.about__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}
/* Tablet (768px+): 2-column so image sits beside text */
@media (min-width: 48rem) {
  .about__grid { grid-template-columns: 5fr 7fr; gap: 2rem; align-items: start; }
}
/* Large desktop: slightly more gap */
@media (min-width: 80rem) {
  .about__grid { gap: 3rem; }
}
.about__sticky { position: sticky; top: 6.5rem; }

/* Profile photo — always visible (hidden on mobile only via media query below) */
.about__photo {
  position: relative;
  display: block;
  width: 100%;
  max-width: 16rem;
  margin-bottom: 2rem;
  isolation: isolate;      /* own stacking context → red shadow renders correctly */
}
/* On 2-column layout: keep photo left-aligned with the facts below it */
@media (min-width: 48rem) {
  .about__photo { margin-left: 0; }
}
.about__photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--red);
  transform: translate(8px, 8px);
  z-index: -1;             /* behind the img, above section background */
}
.about__photo img {
  width: 100%;
  height: 22rem;
  object-fit: cover;
  object-position: top center;
  display: block;
  position: relative;
  z-index: 1;              /* img stays above the red ::after shadow */
  filter: grayscale(8%);
  transition: filter var(--transition);
}
.about__photo img:hover { filter: grayscale(0%); }

/* Fallback monogram (shown when no photo) */
.about__monogram {
  position: relative;
  width: 12rem; height: 12rem;
  background: var(--light-gray);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
}
.about__monogram::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--red);
  transform: translate(8px,8px);
  z-index: -1;
}
.about__monogram span {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 3rem;
  color: rgba(15,23,42,0.18);
  letter-spacing: -0.04em;
}
.about__facts { display: flex; flex-direction: column; gap: 0.875rem; }
.about__fact { display: flex; align-items: center; gap: 0.75rem; }
.about__fact-dot { width: 6px; height: 6px; background: var(--red); border-radius: 50%; flex-shrink: 0; }
.about__fact span { font-size: 0.875rem; font-weight: 500; color: var(--navy); }

.about__body { display: flex; flex-direction: column; gap: 1.25rem; }
.about__body p { font-size: 1.0625rem; line-height: 1.8; color: var(--muted); }
.about__body p strong { color: var(--navy); font-weight: 600; }
.about__quote {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--navy);
  border-left: 3px solid var(--red);
  padding-left: 1.5rem;
  margin-top: 1rem;
  line-height: 1.6;
}

/* ===========================
   EXPERTISE
=========================== */
.expertise { background: var(--navy); color: var(--white); }
.expertise__header { text-align: center; margin-bottom: 4rem; }
.expertise__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 40rem) { .expertise__grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 64rem) { .expertise__grid { grid-template-columns: repeat(3,1fr); } }

.expertise__card {
  padding: 2.25rem;
  background: rgba(248,250,252,0.05);
  border: 1px solid rgba(248,250,252,0.08);
  border-radius: var(--radius);
  transition: background var(--transition), border-color var(--transition);
}
.expertise__card:hover { background: rgba(248,250,252,0.09); border-color: rgba(220,38,38,0.25); }
.expertise__icon {
  width: 3rem; height: 3rem;
  background: rgba(220,38,38,0.12);
  border-radius: 0.625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--red);
  transition: transform var(--transition);
}
.expertise__card:hover .expertise__icon { transform: scale(1.1); }
.expertise__icon svg { width: 1.375rem; height: 1.375rem; stroke: currentColor; }
.expertise__card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--white);
  margin-bottom: 0.75rem;
}
.expertise__card p { font-size: 0.875rem; color: rgba(248,250,252,0.65); line-height: 1.75; }

/* ===========================
   CASE STUDIES
=========================== */
.case-studies { background: var(--white); }
.case-studies__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}
@media (min-width: 64rem) { .case-studies__grid { grid-template-columns: repeat(3,1fr); } }

.case-card {
  display: flex;
  flex-direction: column;
  padding: 2.25rem;
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition);
}
.case-card:hover { border-color: rgba(220,38,38,0.35); }
.case-card__client {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.375rem;
  color: var(--navy);
  margin-bottom: 0.375rem;
  transition: color var(--transition);
}
.case-card:hover .case-card__client { color: var(--red); }
.case-card__role {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1.25rem;
}
.case-card__desc {
  font-size: 0.875rem;
  line-height: 1.75;
  color: var(--muted);
  margin-bottom: 1.5rem;
  flex: 1;
}
.case-card__highlights { padding-top: 1.5rem; border-top: 1px solid var(--border); }
.case-card__highlights-label {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.875rem;
}
.case-card__highlight { display: flex; align-items: flex-start; gap: 0.5rem; margin-bottom: 0.625rem; }
.case-card__highlight svg { width: 1rem; height: 1rem; stroke: var(--red); flex-shrink: 0; margin-top: 2px; }
.case-card__highlight span { font-size: 0.875rem; color: var(--muted); }

/* ===========================
   EDUCATION
=========================== */
.education { background: var(--white); }
.education__list { display: flex; flex-direction: column; gap: 1.25rem; }
.edu-card {
  display: flex;
  gap: 1.5rem;
  padding: 2rem;
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition);
}
.edu-card:hover { border-color: rgba(220,38,38,0.25); }
.edu-card__icon {
  flex-shrink: 0;
  width: 3rem; height: 3rem;
  background: rgba(220,38,38,0.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--red);
}
.edu-card__icon svg { width: 1.375rem; height: 1.375rem; stroke: currentColor; }
.edu-card__body { flex: 1; }
.edu-card__header {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  margin-bottom: 0.75rem;
}
@media (min-width: 40rem) {
  .edu-card__header { flex-direction: row; align-items: flex-start; justify-content: space-between; }
}
.edu-card__degree { font-family: var(--font-display); font-weight: 700; font-size: 1.1875rem; color: var(--navy); }
.edu-card__school { font-weight: 600; font-size: 0.9375rem; color: var(--red); margin-top: 0.125rem; }
.edu-card__period { display: flex; align-items: center; gap: 0.375rem; font-size: 0.8125rem; color: var(--muted); flex-shrink: 0; }
.edu-card__period svg { width: 0.875rem; height: 0.875rem; stroke: currentColor; }
.edu-card__desc { font-size: 0.875rem; color: var(--muted); line-height: 1.7; }

/* ===========================
   CERTIFICATIONS
=========================== */
.certifications { background: var(--off-white); }
.certifications__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
}
@media (min-width: 64rem) { .certifications__grid { grid-template-columns: 1fr 1fr; } }
.certifications__sub-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.375rem;
  color: var(--navy);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.certifications__sub-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.cert-list { display: flex; flex-direction: column; gap: 0.875rem; }
.cert-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: border-color var(--transition);
}
.cert-item:hover { border-color: rgba(220,38,38,0.25); }
.cert-item svg { width: 1.375rem; height: 1.375rem; stroke: var(--red); flex-shrink: 0; }
.cert-item span { font-weight: 500; color: var(--navy); font-size: 0.9375rem; }

/* Tools — clean badge grid */
.tools-wrap { display: flex; flex-wrap: wrap; gap: 0.625rem; }
.tool-badge {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--navy);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  transition: border-color var(--transition), color var(--transition);
}
.tool-badge:hover { border-color: var(--red); color: var(--red); }
.tool-badge-dot {
  width: 6px; height: 6px;
  background: var(--red);
  border-radius: 50%;
  flex-shrink: 0;
  opacity: 0.6;
}

/* ===========================
   DOWNLOADS
=========================== */
.downloads { background: var(--navy); }
.downloads__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 40rem) { .downloads__grid { grid-template-columns: repeat(3,1fr); } }
.download-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 2rem;
  background: rgba(248,250,252,0.05);
  border: 1px solid rgba(248,250,252,0.1);
  border-radius: var(--radius);
  color: var(--white);
  text-decoration: none;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}
.download-card:hover { background: var(--red); border-color: var(--red); transform: translateY(-3px); }
.download-card__icon {
  width: 4rem; height: 4rem;
  background: rgba(248,250,252,0.1);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.5rem;
  transition: background var(--transition);
}
.download-card:hover .download-card__icon { background: rgba(255,255,255,0.2); }
.download-card__icon svg { width: 2rem; height: 2rem; stroke: var(--white); }
.download-card h3 { font-family: var(--font-display); font-weight: 700; font-size: 1.0625rem; margin-bottom: 0.375rem; }
.download-card p { font-size: 0.8125rem; color: rgba(248,250,252,0.55); transition: color var(--transition); }
.download-card:hover p { color: rgba(255,255,255,0.9); }

/* ===========================
   CONTACT
=========================== */
.contact { background: var(--white); }
.contact__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
}
@media (min-width: 64rem) { .contact__grid { grid-template-columns: 1fr 1fr; } }
.contact__info-items { display: flex; flex-direction: column; gap: 1.5rem; margin-top: 2.5rem; }
.contact__info-item { display: flex; align-items: center; gap: 1rem; }
.contact__info-icon {
  width: 3rem; height: 3rem;
  background: var(--light-gray);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--red);
}
.contact__info-icon svg { width: 1.25rem; height: 1.25rem; stroke: currentColor; }
.contact__info-label { font-size: 0.8125rem; font-weight: 500; color: var(--muted); margin-bottom: 0.2rem; }
.contact__info-value { font-size: 1.0625rem; font-weight: 500; color: var(--navy); text-decoration: none; transition: color var(--transition); }
a.contact__info-value:hover { color: var(--red); }
.contact__subheading { font-size: 1.0625rem; color: var(--muted); line-height: 1.7; max-width: 28rem; margin-bottom: 0.5rem; }
.contact__form-wrap {
  background: var(--white);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; font-size: 0.875rem; font-weight: 600; color: var(--navy); margin-bottom: 0.5rem; }
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.65rem 1rem;
  background: var(--white);
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  color: var(--navy);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(220,38,38,0.12);
}
.form-group textarea { min-height: 8.75rem; resize: none; }
.form-group input::placeholder,
.form-group textarea::placeholder { color: #94a3b8; opacity: 1; }
.form-submit {
  width: 100%;
  padding: 0.875rem;
  background: var(--red);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
}
.form-submit:hover { background: var(--red-hover); }
.form-submit:disabled { opacity: 0.7; cursor: not-allowed; }
.form-message {
  display: none;
  padding: 0.875rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  margin-top: 1rem;
}
.form-message.success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; display: block; }
.form-message.error   { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; display: block; }

/* ===========================
   FOOTER
=========================== */
.footer {
  background: var(--footer-bg);   /* overridable via ACF color pickers */
  color: var(--white);
  padding: 3.5rem 0;
  border-top: 1px solid rgba(248,250,252,0.08);
}
.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}
@media (min-width: 48rem) { .footer__inner { flex-direction: row; justify-content: space-between; } }
.footer__brand { display: flex; flex-direction: column; gap: 0.5rem; }
.footer__logo img { height: 36px; width: auto; display: block; filter: brightness(0) invert(1); opacity: 0.9; }
.footer__logo-text { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; letter-spacing: -0.02em; color: var(--white); }
.footer__logo-text span { color: var(--red); }
.footer__tagline { font-size: 0.8125rem; color: rgba(248,250,252,0.55); }
.footer__links { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; justify-content: center; }
.footer__links a { font-size: 0.875rem; color: rgba(248,250,252,0.55); text-decoration: none; transition: color var(--transition); }
.footer__links a:hover { color: var(--white); }
.footer__links .footer__linkedin { color: var(--red); }
.footer__links .footer__linkedin:hover { color: #f87171; }
.footer__copyright {
  font-size: 0.75rem;
  color: rgba(248,250,252,0.3);
  text-align: center;
  padding-top: 1.5rem;
  margin-top: 1.5rem;
  border-top: 1px solid rgba(248,250,252,0.06);
}

/* ===========================
   INNER PAGE HERO
=========================== */
.page-hero {
  background: var(--navy);
  padding: calc(var(--nav-h) + 4rem) 0 4rem;
}
.page-hero__label { color: var(--red); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 0.75rem; }
.page-hero__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 1rem;
}
.page-hero__sub { font-size: 1.0625rem; color: rgba(248,250,252,0.65); max-width: 38rem; line-height: 1.75; }

.page-content { padding: 5rem 0; background: var(--white); }
.page-content .container { max-width: 56rem; }
.entry-content { font-size: 1.0625rem; line-height: 1.8; color: var(--muted); }
.entry-content h1, .entry-content h2, .entry-content h3, .entry-content h4 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--navy);
  margin-top: 2rem;
  margin-bottom: 1rem;
}
.entry-content h2 { font-size: 1.75rem; }
.entry-content h3 { font-size: 1.375rem; }
.entry-content p { margin-bottom: 1.25rem; }
.entry-content strong { color: var(--navy); font-weight: 600; }
.entry-content a { color: var(--red); text-decoration: underline; }
.entry-content a:hover { color: var(--red-hover); }
.entry-content ul, .entry-content ol { margin: 1rem 0 1rem 1.5rem; }
.entry-content li { margin-bottom: 0.5rem; }
.entry-content ul li { list-style: disc; }
.entry-content ol li { list-style: decimal; }

.portfolio-page-cases { padding: 5rem 0; background: var(--white); }
.portfolio-page-cases .container { max-width: var(--max-w); }
.contact-page { padding: 5rem 0; background: var(--white); }

/* ===========================
   GLOBAL OVERFLOW GUARD
   Prevents any element from causing horizontal scroll
=========================== */
html {
  overflow-x: hidden;
  max-width: 100%;
}
/* Hero blobs: allow them visually but clip at page edge */
.hero__blob {
  max-width: 100vw;
  max-height: 100vh;
}

/* About mobile text: hidden on desktop, shown only on mobile */
.about__mobile-body { display: none; }

/* ===========================
   RESPONSIVE — MOBILE (≤ 768px)
=========================== */
@media (max-width: 48rem) {
  :root { --section-py: 3.5rem; }

  /* ── Navbar ── */
  .navbar__links   { display: none; }
  .navbar__hamburger { display: flex; }

  /* ── Hero: proper side padding + text sizing ── */
  .hero__inner     { padding-left: 0; padding-right: 0; }
  .hero__content   { padding-left: 0.25rem; padding-right: 0.25rem; }
  .hero__heading   { font-size: 2rem; }
  .hero__subheading { font-size: 0.9375rem; }
  .hero__tags      { gap: 0.375rem; }
  .hero__ctas      { flex-direction: column; width: 100%; }
  .hero__ctas .btn {
    justify-content: center;
    white-space: normal;
    text-align: center;
    width: 100%;
  }

  /* ── About: remove sticky, hide photo, show short mobile text ── */
  .about__sticky    { position: static !important; }   /* kill the sticky pin on mobile */
  .about__photo,
  .about__monogram  { display: none !important; }      /* no image on mobile */
  .about__body      { display: none !important; }      /* hide full desktop text on mobile */
  .about__mobile-body {                                 /* show short mobile text */
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
  }
  .about__facts { gap: 0.625rem; margin-top: 1.25rem; }

  /* ── General container padding ── */
  .container { padding-left: 1.25rem; padding-right: 1.25rem; }

  /* ── Cards and grids: prevent overflow ── */
  .hero__stat      { max-width: calc(100vw - 3rem); }
  .edu-card        { flex-direction: column; }
  .edu-card__header { flex-direction: column; gap: 0.25rem; }

  /* ── Certifications / Tools: ensure wrapping ── */
  .tools-wrap      { gap: 0.5rem; }
  .certifications__grid { gap: 2.5rem; }

  /* ── Downloads grid: single column ── */
  .downloads__grid { grid-template-columns: 1fr; }

  /* ── Contact grid: single column ── */
  .contact__grid   { gap: 2.5rem; }
  .contact__form-wrap { padding: 1.75rem 1.25rem; }
}

/* ===========================
   RESPONSIVE — TABLET (48rem – 64rem)
=========================== */
@media (min-width: 48rem) and (max-width: 63.999rem) {
  /* About grid is 2-column at 48rem+ (set in main CSS above).
     Sticky is allowed on tablet so the photo stays visible while scrolling text. */
  .hero__heading { font-size: clamp(2rem, 4.5vw, 3rem); }
}

/* WP core */
.screen-reader-text {
  clip: rect(1px,1px,1px,1px);
  clip-path: inset(50%);
  height: 1px; margin: -1px;
  overflow: hidden; padding: 0;
  position: absolute; width: 1px;
}

/* =====================================================================
   PER-SECTION CSS VARIABLES  (v8)
   Each section element receives inline CSS custom properties via PHP.
   These selectors apply the variables with built-in fallbacks so the
   design stays intact when no custom color is set.
   Naming: --s-{section}-{element}
====================================================================== */

/* ── Hero button aliases (scoped so they don't affect global .btn rules) ── */
.hero-cta-primary {
  background:   var(--s-hero-cta1-bg,   var(--btn-primary-bg));
  color:        var(--s-hero-cta1-text, var(--btn-primary-text));
  border-color: var(--s-hero-cta1-bg,   var(--btn-primary-bg));
}
.hero-cta-primary:hover {
  background:   var(--red-hover);
  border-color: var(--red-hover);
  color:        var(--s-hero-cta1-text, var(--btn-primary-text));
}
.hero-cta-outline {
  background:   transparent;
  color:        var(--s-hero-cta2-text,   var(--white));
  border:       2px solid var(--s-hero-cta2-border, rgba(248,250,252,0.3));
}
.hero-cta-outline:hover {
  background:   var(--white);
  color:        var(--navy);
  border-color: var(--white);
}

/* ── Hero section ── */
.hero .tag {
  color:        var(--s-hero-eyebrow, rgba(248,250,252,0.75));
  border-color: var(--s-hero-eyebrow, rgba(248,250,252,0.15));
}
.hero__heading            { color: var(--s-hero-heading, var(--white)); }
.hero__heading .gradient  { color: var(--s-hero-gradient, var(--red)); }
.hero__subheading         { color: var(--s-hero-subhead, rgba(248,250,252,0.75)); }
.hero__stat               { background: var(--s-hero-card-bg, rgba(30,41,59,0.85)); }
.hero__stat-value         { color: var(--s-hero-card-text, var(--white)); }
.hero__stat-label         { color: var(--s-hero-card-text, rgba(248,250,252,0.65)); }
.hero__stat-value.red     { color: var(--s-hero-card-accent, var(--red)); }

/* ── About section ── */
.about                    { background: var(--s-about-bg, var(--white)); }
.about .about__heading-el { color: var(--s-about-heading, var(--navy)); }
.about .about__text-el    { color: var(--s-about-text,    var(--text)); }
.about .about__facts-text-el { color: var(--s-about-facts-text, var(--navy)); }
.about__fact-dot          { background: var(--s-about-facts-dot, var(--red)); }
.about__quote             {
  color:             var(--s-about-quote,        var(--navy));
  border-left-color: var(--s-about-quote-border, var(--red));
}

/* ── Expertise section ── */
.expertise                         { background: var(--s-exp-bg, var(--navy)); }
.expertise .expertise__heading-el  { color: var(--s-exp-heading, var(--white)); }
.expertise__card {
  background:   var(--s-exp-card-bg,     rgba(255,255,255,0.05));
  border-color: var(--s-exp-card-border, rgba(255,255,255,0.1));
}
.expertise__card:hover { border-color: var(--s-exp-hover, var(--red)); }
.expertise__icon svg   { stroke: var(--s-exp-icon, var(--red)); }
.expertise__icon       { background: var(--s-exp-icon-bg, rgba(220,38,38,0.12)); }
.expertise .exp-title-el { color: var(--s-exp-title, var(--white)); }
.expertise .exp-text-el  { color: var(--s-exp-text, rgba(248,250,252,0.7)); }

/* ── Featured Work section ── */
.case-studies                         { background: var(--s-work-bg, var(--white)); }
.case-studies .work-label-el          { color: var(--s-work-label, var(--red)); }
.case-studies .work-heading-el        { color: var(--s-work-heading, var(--navy)); }
.case-card {
  background:   var(--s-work-card-bg,     var(--white));
  border-color: var(--s-work-card-border, var(--border));
}
.case-card .work-company-el           { color: var(--s-work-company, var(--navy)); }
.case-card:hover .work-company-el     { color: var(--s-work-company, var(--red)); }
.case-card .work-role-el              { color: var(--s-work-role, var(--red)); }
.case-card .work-text-el              { color: var(--s-work-text, var(--muted)); }
.case-card .work-highlight-el         { color: var(--s-work-highlight, var(--muted)); }
.case-card .case-card__hl-icon svg    { stroke: var(--s-work-hl-icon, var(--red)); }
.case-card .work-btn-el               { color: var(--s-work-btn, var(--red)); }
.case-card .work-btn-el:hover         { color: var(--s-work-btn, var(--red)); opacity: 0.8; }

/* ── Education section ── */
.education                     { background: var(--s-edu-bg, var(--off-white)); }
.education .edu-label-el       { color: var(--s-edu-label,   var(--red)); }
.education .edu-heading-el     { color: var(--s-edu-heading, var(--navy)); }
.edu-card                      { background: var(--s-edu-card-bg, var(--white)); }
.edu-card .edu-degree-el       { color: var(--s-edu-degree,  var(--navy)); }
.edu-card .edu-school-el       { color: var(--s-edu-school,  var(--muted)); }
.edu-card .edu-year-el         { color: var(--s-edu-year,    var(--muted)); }
.edu-card .edu-desc-el         { color: var(--s-edu-desc,    var(--muted)); }

/* ── Certifications + Tools section ── */
.certifications                { background: var(--s-cert-bg, var(--white)); }
.certifications .cert-heading-el { color: var(--s-cert-heading, var(--navy)); }
.certifications .tools-heading-el { color: var(--s-tools-heading, var(--navy)); }
.cert-item .cert-text-el       { color: var(--s-cert-text,   var(--navy)) !important; }
.cert-item .cert-issuer-el     { color: var(--s-cert-issuer, var(--muted)) !important; }
.cert-item .cert-icon-el svg   { stroke: var(--s-cert-icon,  var(--red)) !important; }
.cert-item .cert-link-el       { color: var(--s-cert-link,   var(--red)) !important; }
.cert-item .cert-link-el:hover { opacity: 0.8; }
.tool-badge {
  background:   var(--s-tools-pill-bg,     var(--navy));
  color:        var(--s-tools-pill-text,   var(--white));
  border-color: var(--s-tools-pill-border, rgba(255,255,255,0.12));
}
.tool-badge:hover {
  border-color: var(--s-tools-pill-dot, var(--red));
  color:        var(--s-tools-pill-text, var(--white));
}
.tool-badge-dot { background: var(--s-tools-pill-dot, var(--red)); }

/* ── Downloads section ── */
.downloads                     { background: var(--s-dl-bg, var(--off-white)); }
.download-card {
  background:   var(--s-dl-card-bg,     var(--white));
  border-color: var(--s-dl-card-border, var(--border));
}
.download-card .dl-heading-el  { color: var(--s-dl-heading, var(--navy)); }
.download-card .dl-text-el     { color: var(--s-dl-text,    var(--muted)); }
.download-card .dl-icon-el svg { stroke: var(--s-dl-icon,   var(--red)); }

/* ── Contact section ── */
.contact                              { background: var(--s-contact-bg, var(--white)); }
.contact .contact-heading-el          { color: var(--s-contact-heading, var(--navy)); }
.contact .contact-section-label-el    { color: var(--s-contact-section-label, var(--red)); }
.contact .contact-para-el             { color: var(--s-contact-para, var(--muted)); }
.contact .contact-label-el            { color: var(--s-contact-label, var(--muted)); }
.contact .contact-link-el             { color: var(--s-contact-link, var(--navy)); }
.contact a.contact-link-el:hover      { color: var(--red); opacity: 1; }
.contact .contact-input-el {
  background:   var(--s-contact-input-bg,     var(--white));
  border-color: var(--s-contact-input-border, #cbd5e1);
  color:        var(--s-contact-input-text,   var(--navy));
}
.contact .contact-input-el::placeholder { color: #94a3b8; }
.contact .contact-input-el:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(220,38,38,0.12);
}
.contact .contact-submit-el {
  background: var(--s-contact-btn-bg,   var(--red));
  color:      var(--s-contact-btn-text, var(--white));
}
.contact .contact-submit-el:hover {
  background: var(--s-contact-btn-bg, var(--red-hover));
  opacity: 1;
}
/* Contact form wrap heading */
.contact__form-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 1.75rem;
}

/* ── Footer section ── */
.footer                     { background: var(--s-footer-bg,      var(--footer-bg)); }
.footer                     { color: var(--s-footer-text, rgba(248,250,252,0.65)); }
.footer .footer__tagline    { color: var(--s-footer-tagline, rgba(248,250,252,0.5)); }
.footer__links a,
.footer .footer__copyright  { color: var(--s-footer-link, rgba(248,250,252,0.65)); }
.footer__inner              { border-color: var(--s-footer-border, rgba(255,255,255,0.1)); }

/* =====================================================================
   NEW / UPDATED ELEMENT STYLES  (v8)
====================================================================== */

/* Case study category tag pill */
.case-card__tag {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  background: rgba(220,38,38,0.08);
  color: var(--red);
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 0.625rem;
}

/* Case study "View Case Study" link */
.case-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--red);
  text-decoration: none;
  transition: gap var(--transition);
}
.case-card__link svg { width: 1rem; height: 1rem; stroke: currentColor; flex-shrink: 0; }
.case-card__link:hover { gap: 0.625rem; }

/* Highlight icon wrapper (prevents SVG from shrinking) */
.case-card__hl-icon { display: inline-flex; flex-shrink: 0; margin-top: 2px; }
.case-card__hl-icon svg { width: 1rem; height: 1rem; stroke: var(--red); }

/* Updated cert-item layout: icon + body column */
.cert-item__icon  { display: inline-flex; flex-shrink: 0; margin-top: 1px; }
.cert-item__body  { display: flex; flex-direction: column; gap: 0.2rem; }
.cert-item__name  { font-weight: 500; color: var(--navy); font-size: 0.9375rem; text-decoration: none; }
.cert-item__name:hover { color: var(--red); }
.cert-item__meta  {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0.02em;
}
/* keep legacy .cert-item span rule compatible: override only for new structure */
.cert-item .cert-item__name { color: var(--navy); }

/* Expertise icon background — ensure consistent sizing */
.expertise__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  background: var(--s-exp-icon-bg, rgba(220,38,38,0.12));
  margin-bottom: 1.25rem;
}
.expertise__icon svg {
  width: 1.5rem;
  height: 1.5rem;
  stroke: var(--s-exp-icon, var(--red));
  fill: none;
}

/* noscript: make revealed elements visible without JS */
noscript .reveal { opacity: 1; transform: none; }

