.magdy-page {
  --profile-paper: #f4f7fc;
  --profile-border: rgba(7, 19, 45, 0.12);
}
.magdy-page :focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 4px;
}
.magdy-page .navlinks a[aria-current="page"] {
  color: var(--orange);
}
.magdy-page .magdy-hero {
  position: relative;
  overflow: hidden;
  padding: 164px 0 86px;
  color: #fff;
  background:
    radial-gradient(ellipse at 82% 35%, rgba(43, 23, 111, 0.7), transparent 39%),
    linear-gradient(125deg, #06081b 2%, #080b24 55%, #102d66 100%);
}
.magdy-hero:before {
  position: absolute;
  inset: 0;
  content: "";
  opacity: 0.18;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.45) 0.65px, transparent 0.65px);
  background-size: 26px 26px;
}
.magdy-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: clamp(36px, 7vw, 94px);
}
.magdy-hero-copy .eyebrow,
.magdy-page .eyebrow {
  color: var(--orange);
}
.magdy-hero h1 {
  margin: 18px 0 0;
  font: 800 clamp(56px, 8vw, 104px) / 0.98 "Manrope", sans-serif;
  letter-spacing: -0.065em;
}
.magdy-hero h1 span {
  color: var(--orange);
}
.magdy-hero-statement {
  margin: 22px 0 15px;
  font: 600 clamp(23px, 3.1vw, 38px) / 1.2 "Manrope", sans-serif;
  letter-spacing: -0.04em;
}
.magdy-role {
  margin: 0;
  color: #e0e5f1;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.7;
}
.magdy-role span {
  padding: 0 5px;
  color: var(--orange);
}
.magdy-hero-intro {
  max-width: 620px;
  margin: 18px 0 0;
  color: #bdc5d9;
  font-size: 16px;
  line-height: 1.8;
}
.magdy-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 25px;
}
.magdy-page .magdy-hero-actions .btn-outline,
.magdy-page .contact-actions .btn-outline {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
}
.cv-pending {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  margin-top: 14px;
  padding: 0;
  border: 0;
  color: #d4d9e6;
  background: transparent;
  font: 700 13px "DM Sans", sans-serif;
  text-decoration: underline;
  text-decoration-color: rgba(255, 173, 22, 0.8);
  text-underline-offset: 5px;
  cursor: pointer;
  transition: color 0.2s ease;
}
.cv-pending:hover {
  color: #fff;
}
.cv-pending span {
  margin-left: 5px;
}
.magdy-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 25px 0 0;
  padding: 0;
  list-style: none;
}
.magdy-hero-meta li {
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #dce2ef;
  font-size: 12px;
}
.magdy-portrait {
  position: relative;
  margin: 0;
}
.magdy-portrait:before {
  position: absolute;
  inset: 14px -14px -14px 14px;
  border: 1px solid rgba(255, 173, 22, 0.62);
  border-radius: 24px;
  content: "";
}
.magdy-portrait img {
  position: relative;
  width: 100%;
  height: clamp(380px, 45vw, 560px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 22px;
  object-fit: cover;
  object-position: center 38%;
}
.magdy-portrait figcaption {
  position: absolute;
  right: 16px;
  bottom: 16px;
  left: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.19);
  font-weight: 800;
}
.magdy-portrait figcaption span + span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.magdy-page .section {
  padding: clamp(66px, 8vw, 104px) 0;
}
.magdy-page .title {
  max-width: 820px;
  font-size: clamp(34px, 4.2vw, 56px);
}
.magdy-about {
  background: #fff;
}
.magdy-about-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(36px, 8vw, 112px);
  align-items: start;
}
.magdy-about-grid .title {
  max-width: 500px;
}
.magdy-prose p {
  margin: 0 0 17px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.85;
}
.magdy-prose p:last-child {
  margin-bottom: 0;
}
.magdy-journey {
  background: var(--profile-paper);
}
.magdy-section-head {
  margin-bottom: 40px;
}
.magdy-section-head .eyebrow,
.case-heading .eyebrow {
  margin: 0 0 11px;
}
.magdy-section-head .title,
.case-heading .title {
  margin-top: 0;
}
.journey-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 48px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: journey;
}
.journey-item {
  position: relative;
  min-height: 160px;
  padding: 0 0 30px 28px;
  border-left: 1px solid rgba(8, 43, 126, 0.2);
  counter-increment: journey;
}
.journey-item:before {
  position: absolute;
  top: 4px;
  left: -5px;
  width: 9px;
  height: 9px;
  border: 2px solid var(--blue);
  border-radius: 50%;
  background: #fff;
  content: "";
}
.journey-date,
.experience-period {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.journey-item h3 {
  margin: 0 0 6px;
  font: 800 19px/1.35 "Manrope", sans-serif;
  letter-spacing: -0.025em;
}
.journey-item p:not(.journey-date) {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}
.journey-item p:last-child {
  margin-bottom: 0;
}
.magdy-results {
  background: #fff;
}
.results-head {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 0.72fr);
  column-gap: 50px;
  align-items: end;
}
.results-head .eyebrow {
  grid-column: 1 / -1;
}
.results-head .title {
  margin: 0;
}
.results-context {
  margin: 0;
  padding-left: 18px;
  border-left: 2px solid var(--orange);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}
.results-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.metric-card {
  min-height: 166px;
  padding: 23px;
  border: 1px solid var(--profile-border);
  border-radius: 18px;
  background: linear-gradient(145deg, #fff, #f8f9fc);
  box-shadow: 0 8px 24px rgba(7, 19, 45, 0.035);
}
.metric-value {
  margin: 0 0 11px;
  color: var(--blue);
  font: 800 clamp(26px, 3.2vw, 38px) / 1.1 "Manrope", sans-serif;
  letter-spacing: -0.045em;
}
.metric-card h3 {
  margin: 0 0 7px;
  font: 800 15px/1.45 "Manrope", sans-serif;
}
.metric-card > p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.magdy-case {
  background: var(--profile-paper);
}
.case-heading {
  margin-bottom: 38px;
}
.case-subtitle {
  margin: 10px 0 0;
  color: var(--muted);
  font-weight: 700;
}
.case-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 38px;
  align-items: start;
}
.case-detail {
  display: grid;
  grid-template-columns: minmax(125px, 0.34fr) 1fr;
  gap: 18px;
  padding: 17px 0;
  border-top: 1px solid var(--profile-border);
}
.case-detail h3 {
  margin: 0;
  font: 800 14px/1.5 "Manrope", sans-serif;
}
.case-detail p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}
.case-contact {
  margin-top: 22px;
}
.ads-snapshot {
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid var(--profile-border);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(7, 19, 45, 0.08);
}
.snapshot-heading .eyebrow {
  margin: 0 0 7px;
  font-size: 10px;
}
.snapshot-heading h3 {
  margin: 0;
  font: 800 clamp(20px, 2.4vw, 28px)/1.25 "Manrope", sans-serif;
  letter-spacing: -0.035em;
}
.snapshot-heading > p:last-child {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.ads-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 22px 0;
}
.ads-metrics div {
  min-height: 76px;
  padding: 13px;
  border-radius: 12px;
  background: var(--profile-paper);
}
.ads-metrics dt {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}
.ads-metrics dd {
  margin: 4px 0 0;
  color: var(--ink);
  font: 800 19px/1.25 "Manrope", sans-serif;
}
.account-evidence {
  margin: 0;
}
.account-evidence img {
  width: 100%;
  height: auto;
  border: 1px solid var(--profile-border);
  border-radius: 10px;
}
.account-evidence figcaption {
  margin-top: 9px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}
.seo-evidence {
  margin-top: clamp(58px, 8vw, 90px);
  padding-top: clamp(36px, 5vw, 56px);
  border-top: 1px solid var(--profile-border);
}
.seo-evidence .magdy-section-head {
  max-width: 760px;
}
.seo-evidence .magdy-section-head .title {
  font-size: clamp(30px, 3.5vw, 44px);
}
.seo-evidence .magdy-section-head > p:last-child {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.7;
}
.seo-evidence-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}
.seo-evidence-grid figure {
  min-width: 0;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--profile-border);
  border-radius: 14px;
  background: #fff;
}
.seo-evidence-grid img {
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  border-radius: 8px;
  object-fit: contain;
}
.seo-evidence-grid figcaption {
  padding: 10px 2px 1px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}
.seo-note {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.magdy-experience {
  background: #fff;
}
.experience-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.experience-card {
  padding: 25px;
  border: 1px solid var(--profile-border);
  border-radius: 17px;
  background: #fff;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.experience-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 38px rgba(7, 19, 45, 0.08);
}
.experience-card h3 {
  margin: 0 0 5px;
  font: 800 20px/1.35 "Manrope", sans-serif;
  letter-spacing: -0.03em;
}
.experience-role {
  margin: 0 0 13px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.55;
}
.experience-card > p:not(.experience-period):not(.experience-role) {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}
.experience-card a {
  display: inline-block;
  min-height: 36px;
  padding: 8px 0;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-color: rgba(255, 173, 22, 0.9);
  text-underline-offset: 4px;
}
.magdy-expertise {
  background: var(--profile-paper);
}
.expertise-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.expertise-grid li {
  min-height: 156px;
  padding: 21px;
  border: 1px solid var(--profile-border);
  border-radius: 16px;
  background: #fff;
}
.expertise-grid li:before {
  display: block;
  width: 23px;
  height: 3px;
  margin-bottom: 14px;
  border-radius: 2px;
  background: var(--orange);
  content: "";
}
.expertise-grid h3 {
  margin: 0 0 8px;
  font: 800 15px/1.4 "Manrope", sans-serif;
}
.expertise-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}
.magdy-education {
  background: #fff;
}
.education-grid {
  display: grid;
  grid-template-columns: 1fr 0.7fr 1.1fr;
  gap: 32px;
  align-items: start;
}
.education-grid .magdy-section-head {
  margin: 0;
}
.education-grid .title {
  font-size: clamp(32px, 3.6vw, 46px);
}
.education-column {
  padding-left: 22px;
  border-left: 1px solid var(--profile-border);
}
.education-column h3 {
  margin: 0 0 15px;
  font: 800 15px/1.45 "Manrope", sans-serif;
}
.education-item {
  padding: 16px;
  border: 1px solid var(--profile-border);
  border-radius: 13px;
  background: var(--profile-paper);
}
.education-item h4 {
  margin: 0 0 5px;
  font: 800 14px/1.4 "Manrope", sans-serif;
}
.education-item p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.certification-list {
  display: grid;
  gap: 13px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.certification-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.5;
}
.certification-list li span:last-child {
  color: var(--muted);
  text-align: right;
}
.education-note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}
.magdy-contact {
  padding-top: 0 !important;
}
.magdy-contact .contact-box {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px 46px;
  min-height: auto;
  padding: clamp(34px, 6vw, 68px);
  border-radius: 24px;
  background:
    radial-gradient(circle at 95% 15%, rgba(37, 217, 209, 0.12), transparent 32%),
    linear-gradient(135deg, #080b24, #151044 65%, #2a1367);
}
.magdy-contact .contact-copy {
  position: relative;
  z-index: 1;
}
.magdy-contact .contact-copy .eyebrow {
  margin: 0 0 10px;
}
.magdy-contact .contact-copy .title {
  font-size: clamp(34px, 4vw, 52px);
}
.magdy-contact .contact-copy > p:last-child {
  max-width: 650px;
  margin: 17px 0 0;
  color: #c1c8db;
  line-height: 1.75;
}
.contact-details {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  gap: 14px;
}
.contact-details a,
.contact-details p {
  margin: 0;
  color: #fff;
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.contact-details span {
  display: block;
  margin-bottom: 3px;
  color: #9da8c2;
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.contact-actions {
  grid-column: 1 / -1;
  margin-top: 4px;
}
.magdy-page footer {
  margin-top: 36px;
}
@media (max-width: 980px) {
  .magdy-hero-grid {
    grid-template-columns: 1fr 0.8fr;
    gap: 32px;
  }
  .magdy-about-grid {
    gap: 44px;
  }
  .journey-list {
    gap: 0 25px;
  }
  .case-grid {
    grid-template-columns: 1fr;
  }
  .ads-snapshot {
    max-width: 760px;
  }
  .expertise-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .education-grid {
    grid-template-columns: 1fr 1fr;
  }
  .education-grid .magdy-section-head {
    grid-column: 1 / -1;
  }
  .magdy-contact .contact-box {
    gap: 28px;
  }
}
@media (max-width: 650px) {
  .magdy-page .magdy-hero {
    padding: 128px 0 65px;
  }
  .magdy-hero-grid,
  .magdy-about-grid {
    grid-template-columns: 1fr;
  }
  .magdy-hero-grid {
    gap: 34px;
  }
  .magdy-hero h1 {
    font-size: clamp(54px, 16vw, 78px);
  }
  .magdy-hero-statement {
    font-size: clamp(23px, 7vw, 31px);
  }
  .magdy-hero-intro {
    font-size: 15px;
  }
  .magdy-portrait {
    width: min(100% - 14px, 430px);
    margin-right: 14px;
  }
  .magdy-portrait img {
    height: clamp(360px, 105vw, 430px);
  }
  .magdy-about-grid {
    gap: 22px;
  }
  .magdy-section-head {
    margin-bottom: 28px;
  }
  .journey-list {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .journey-item {
    min-height: 0;
    padding-bottom: 25px;
  }
  .results-head {
    display: block;
  }
  .results-context {
    margin-top: 18px;
  }
  .results-grid,
  .seo-evidence-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .metric-card {
    min-height: 155px;
    padding: 17px;
  }
  .metric-value {
    font-size: clamp(24px, 7vw, 31px);
  }
  .case-detail {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .ads-metrics {
    gap: 7px;
  }
  .ads-metrics div {
    padding: 11px;
  }
  .ads-metrics dd {
    font-size: 17px;
  }
  .experience-grid {
    grid-template-columns: 1fr;
  }
  .expertise-grid {
    gap: 9px;
  }
  .expertise-grid li {
    min-height: 0;
    padding: 16px;
  }
  .education-grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }
  .education-grid .magdy-section-head {
    grid-column: auto;
  }
  .education-column {
    padding-left: 16px;
  }
  .magdy-contact .contact-box {
    grid-template-columns: 1fr;
    padding: 34px 24px;
  }
  .contact-actions {
    grid-column: auto;
  }
  .magdy-page footer {
    margin-top: 16px;
  }
}
@media (max-width: 400px) {
  .magdy-page .magdy-hero-actions .btn {
    width: 100%;
  }
  .magdy-hero-meta {
    display: grid;
  }
  .results-grid,
  .seo-evidence-grid,
  .expertise-grid {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  .magdy-page *,
  .magdy-page *:before,
  .magdy-page *:after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
