:root {
  --aws-navy: #11141b;
  --aws-slate: #1b2433;
  --aws-blue: #4f7cff;
  --aws-orange: #e0b66b;
  --aws-ice: #f8f7f3;
  --aws-border: rgba(255, 255, 255, 0.14);
  --aws-surface: rgba(22, 30, 45, 0.76);
  --aws-surface-soft: rgba(33, 45, 67, 0.58);
  --premium-transition: 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

body.modern-resume {
  color: #dbe4f0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 15% 10%, rgba(79, 124, 255, 0.28), transparent 32%),
    radial-gradient(circle at 85% 15%, rgba(224, 182, 107, 0.24), transparent 35%),
    linear-gradient(145deg, #0c1017 0%, #111827 45%, #182232 100%);
}

#fx-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.96;
}

body.modern-resume .container-fluid {
  position: relative;
  z-index: 1;
  isolation: isolate;
}

body.modern-resume h1,
body.modern-resume h2,
body.modern-resume h3,
body.modern-resume h4,
body.modern-resume h5,
body.modern-resume h6 {
  text-transform: none;
  color: #f7fbff;
  letter-spacing: 0.01em;
}

body.modern-resume p,
body.modern-resume li,
body.modern-resume .subheading {
  color: #ccd8e7;
}

body.modern-resume a {
  color: #b4c8ff;
}

body.modern-resume a:hover {
  color: #f2d7a4;
}

.top-controls {
  position: fixed;
  top: 1.2rem;
  right: 1.4rem;
  display: inline-flex;
  direction: ltr;
  gap: 0.55rem;
  z-index: 1100;
}

body.modern-resume .text-primary {
  color: var(--aws-orange) !important;
}

.theme-toggle {
  width: 4.7rem;
  height: 2.45rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(53, 69, 105, 0.95), rgba(29, 40, 62, 0.92));
  color: #fff;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.28);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem;
  transition: transform var(--premium-transition), box-shadow var(--premium-transition), border-color var(--premium-transition);
}

section.resume-section .resume-section-content h2.mb-5 {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}

#awards .resume-section-content h2.mb-5::before,
#experience .resume-section-content h2.mb-5::before,
#education .resume-section-content h2.mb-5::before,
#skills .resume-section-content h2.mb-5::before,
#publications .resume-section-content h2.mb-5::before,
#contact .resume-section-content h2.mb-5::before {
  font-size: 0.92em;
  line-height: 1;
  filter: drop-shadow(0 0 8px rgba(224, 182, 107, 0.35));
}

#awards .resume-section-content h2.mb-5::before {
  content: "🏅";
}

#experience .resume-section-content h2.mb-5::before {
  content: "💼";
}

#education .resume-section-content h2.mb-5::before {
  content: "🎓";
}

#skills .resume-section-content h2.mb-5::before {
  content: "</>";
  font-size: 0.78em;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--aws-orange);
}

#publications .resume-section-content h2.mb-5::before {
  content: "📖";
}

#contact .resume-section-content h2.mb-5::before {
  content: "✉️";
}

.theme-toggle .toggle-track {
  width: 100%;
  height: 100%;
  position: relative;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.52rem;
  font-size: 0.76rem;
}

.theme-toggle .toggle-track i {
  opacity: 0.78;
}

.theme-toggle .toggle-thumb {
  position: absolute;
  left: 2px;
  top: 2px;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 999px;
  background: linear-gradient(130deg, #e0b66b, #4f7cff);
  box-shadow: 0 5px 13px rgba(0, 0, 0, 0.3);
  transition: transform var(--premium-transition);
}

body.modern-resume.light-theme .theme-toggle .toggle-thumb {
  transform: translateX(2.15rem);
}

.lang-toggle {
  min-width: 4.45rem;
  height: 2.45rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(53, 69, 105, 0.95), rgba(29, 40, 62, 0.92));
  color: #dfeeff;
  padding: 0 0.72rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.22rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.28);
  transition: transform var(--premium-transition), box-shadow var(--premium-transition), color var(--premium-transition);
}

.lang-toggle[aria-pressed="true"] .lang-ar,
.lang-toggle[aria-pressed="false"] .lang-en {
  color: #e0b66b;
}

.theme-toggle:hover,
.lang-toggle:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.34);
}

#sideNav {
  background: linear-gradient(170deg, rgba(34, 46, 70, 0.97), rgba(20, 30, 47, 0.96));
  box-shadow: 18px 0 45px rgba(0, 0, 0, 0.28);
  border-right: 1px solid var(--aws-border);
  z-index: 1030;
}

#sideNav .navbar-toggler {
  border-color: rgba(255, 255, 255, 0.42);
}

#sideNav .navbar-toggler:focus {
  box-shadow: 0 0 0 0.16rem rgba(79, 124, 255, 0.45);
}

#sideNav .navbar-toggler-icon {
  color: rgba(255, 255, 255, 0.95);
  background-image:
    linear-gradient(currentColor, currentColor),
    linear-gradient(currentColor, currentColor),
    linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: center 22%, center 50%, center 78%;
  background-size: 100% 2.4px, 100% 2.4px, 100% 2.4px;
}

#sideNav .navbar-nav {
  gap: 0.35rem;
}

#sideNav .navbar-nav .nav-item .nav-link {
  color: #dbe5f6;
  border-radius: 999px;
  padding: 0.55rem 1rem;
  transition: all 0.25s ease;
}

#sideNav .navbar-nav .nav-item .nav-link:hover,
#sideNav .navbar-nav .nav-item .nav-link.active {
  color: #fff;
  background: linear-gradient(110deg, rgba(79, 124, 255, 0.9), rgba(224, 182, 107, 0.9));
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
  transform: translateX(4px);
}

body.modern-resume .custom-profile {
  border: 4px solid rgba(224, 182, 107, 0.84);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.36);
}

.mobile-profile {
  width: 122px;
  height: 122px;
  border-radius: 50%;
  border: 3px solid rgba(224, 182, 107, 0.86);
  object-fit: cover;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.28);
}

section.resume-section {
  max-width: 100rem;
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
}

section.resume-section .resume-section-content {
  background: var(--aws-surface);
  border: 1px solid var(--aws-border);
  border-radius: 22px;
  padding: clamp(1.5rem, 2.2vw, 2.25rem);
  position: relative;
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(6px);
  transition: transform var(--premium-transition), box-shadow var(--premium-transition), border-color var(--premium-transition);
}

section.resume-section .resume-section-content::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  box-shadow:
    inset 0 0 0 1px rgba(179, 203, 242, 0.28),
    0 0 0 1px rgba(179, 203, 242, 0.14),
    0 0 34px rgba(79, 124, 255, 0.2);
  transition: opacity 360ms ease;
}

section.resume-section .resume-section-content p,
section.resume-section .resume-section-content li,
section.resume-section .resume-section-content a {
  overflow-wrap: anywhere;
}

#about .resume-section-content {
  background:
    linear-gradient(135deg, rgba(79, 124, 255, 0.2), rgba(224, 182, 107, 0.16)),
    var(--aws-surface);
}

#about h1 {
  font-size: clamp(3rem, 8vw, 6rem);
  margin-bottom: 0.75rem !important;
}

.hero-typed-wrap {
  margin: 0 0 1.5rem;
}

#typed {
  display: inline-block;
  font-size: clamp(1.25rem, 2.8vw, 2rem);
  font-weight: 800;
  color: #b4c8ff;
}

.typed-cursor {
  color: var(--aws-orange);
}

.subheading {
  text-transform: none;
  letter-spacing: 0.01em;
  font-size: 1.24rem;
}

.social-icons .social-icon {
  background: linear-gradient(135deg, #4a6296, #344970);
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
  transition: transform var(--premium-transition), background var(--premium-transition), box-shadow var(--premium-transition);
}

.social-icons .social-icon:hover {
  background: linear-gradient(135deg, rgba(79, 124, 255, 0.96), rgba(224, 182, 107, 0.96));
  color: #ffffff !important;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.3);
  transform: translateY(-3px) scale(1.04);
}

#contact .contact-intro {
  margin-bottom: 1rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.9rem;
  margin-bottom: 1rem;
}

.contact-card {
  border: 1px solid var(--aws-border);
  background: var(--aws-surface-soft);
  border-radius: 16px;
  padding: 1rem 1.05rem;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.2);
  text-decoration: none;
}

.contact-link-card {
  transition: transform var(--premium-transition), border-color var(--premium-transition), box-shadow var(--premium-transition);
}

.contact-link-card:hover {
  transform: translateY(-3px);
  border-color: rgba(179, 203, 242, 0.36);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.26);
}

.contact-icon {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.55rem;
  color: #0f1724;
  background: linear-gradient(135deg, rgba(79, 124, 255, 0.96), rgba(224, 182, 107, 0.96));
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.24);
}

.contact-label {
  margin-bottom: 0.25rem;
  font-weight: 700;
}

.contact-value {
  margin-bottom: 0;
  color: #dbe4f0;
}

.contact-links-label {
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.phone-ltr {
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
}

.certifications {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 92px));
  justify-content: start;
  gap: 0.8rem;
}

.cert-img,
.certifications img {
  width: 92px;
  height: 92px;
  border-radius: 12px;
  border: 1px solid rgba(122, 144, 168, 0.35);
  background: #f8fbff;
  object-fit: contain;
  object-position: center;
  padding: 0.4rem;
  display: block;
  margin: 0;
  transition: transform var(--premium-transition), box-shadow var(--premium-transition), border-color var(--premium-transition);
}

.certifications img:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.28);
}

#experience .d-flex.flex-column.flex-md-row.justify-content-between,
#education .d-flex.flex-column.flex-md-row.justify-content-between {
  border: 1px solid var(--aws-border);
  background: var(--aws-surface-soft);
  border-radius: 18px;
  padding: 1.2rem 1.25rem;
  position: relative;
  overflow: hidden;
  margin-bottom: 1rem !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

#experience .d-flex.flex-column.flex-md-row.justify-content-between::before,
#education .d-flex.flex-column.flex-md-row.justify-content-between::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16%;
  width: 3px;
  height: 68%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(79, 124, 255, 0.95), rgba(224, 182, 107, 0.95));
  box-shadow: 0 0 14px rgba(79, 124, 255, 0.36);
  animation: timelineGlow 2.7s ease-in-out infinite;
}

#skills .resume-section-content,
#publications .resume-section-content {
  position: relative;
  overflow: hidden;
}

#skills .resume-section-content::before,
#publications .resume-section-content::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14%;
  width: 3px;
  height: 72%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(79, 124, 255, 0.95), rgba(224, 182, 107, 0.95));
  box-shadow: 0 0 14px rgba(79, 124, 255, 0.36);
  animation: timelineGlow 2.7s ease-in-out infinite;
}

@keyframes timelineGlow {
  0%,
  100% {
    opacity: 0.62;
    transform: scaleY(0.94);
  }
  50% {
    opacity: 1;
    transform: scaleY(1);
  }
}

#experience .flex-shrink-0,
#education .flex-shrink-0 {
  margin-top: 0.15rem;
}

#experience .flex-shrink-0 .text-primary,
#education .flex-shrink-0 .text-primary {
  display: inline-block;
  color: #1a2233 !important;
  font-weight: 700;
  background: linear-gradient(100deg, #4f7cff, #e0b66b);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
}

ul {
  padding-left: 1.15rem;
}

ul li {
  margin-bottom: 0.28rem;
}

ul li::marker {
  color: var(--aws-orange);
}

#skills ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  padding-left: 0;
}

#skills ul li {
  margin-bottom: 0;
  padding: 0.46rem 0.78rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background:
    linear-gradient(120deg, rgba(79, 124, 255, 0.25), rgba(79, 124, 255, 0.08), rgba(224, 182, 107, 0.22)),
    rgba(22, 32, 48, 0.82);
  background-size: 220% 220%;
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.2);
  animation: chipShimmer 3.4s ease-in-out infinite;
}

#skills ul li::marker {
  content: "";
}

@keyframes chipShimmer {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

hr.m-0 {
  border-color: rgba(255, 255, 255, 0.12);
  opacity: 1;
}

.reveal-init {
  opacity: 0;
  transform: scale(0.982);
  transition: opacity 520ms ease, transform 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-init.is-visible {
  opacity: 1;
  transform: scale(1);
}

body.modern-resume.section-focus-ready section.resume-section .resume-section-content {
  opacity: 0.4;
  filter: grayscale(0.12) brightness(0.72);
  transform: scale(0.985);
  transition: opacity 340ms ease, transform 340ms ease, filter 340ms ease;
}

body.modern-resume.section-focus-ready section.resume-section.is-active .resume-section-content {
  opacity: 1;
  filter: none;
  transform: scale(1);
  box-shadow: 0 26px 52px rgba(0, 0, 0, 0.34);
}

body.modern-resume.section-focus-ready section.resume-section.is-active .resume-section-content::after {
  opacity: 1;
}

#scrollProgress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  transform-origin: left center;
  transform: scaleX(0);
  background: linear-gradient(90deg, rgba(79, 124, 255, 0.95), rgba(224, 182, 107, 0.95));
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
  z-index: 1200;
  pointer-events: none;
}

body.modern-resume.light-theme {
  color: #203047;
  background:
    radial-gradient(circle at 14% 11%, rgba(79, 124, 255, 0.15), transparent 30%),
    radial-gradient(circle at 86% 8%, rgba(224, 182, 107, 0.16), transparent 34%),
    linear-gradient(160deg, #fbfbfd 0%, #f2f5fb 42%, #fafbfd 100%);
}

body.modern-resume.light-theme p,
body.modern-resume.light-theme li,
body.modern-resume.light-theme .subheading {
  color: #384b64;
}

body.modern-resume.light-theme h1,
body.modern-resume.light-theme h2,
body.modern-resume.light-theme h3,
body.modern-resume.light-theme h4,
body.modern-resume.light-theme h5,
body.modern-resume.light-theme h6 {
  color: #10223b;
}

body.modern-resume.light-theme a {
  color: #3358a8;
}

body.modern-resume.light-theme a:hover {
  color: #9b7640;
}

body.modern-resume.light-theme #sideNav {
  background: linear-gradient(170deg, rgba(66, 86, 129, 0.95), rgba(44, 60, 94, 0.95));
}

body.modern-resume.light-theme #sideNav .navbar-toggler {
  border-color: rgba(15, 32, 56, 0.35);
}

body.modern-resume.light-theme #sideNav .navbar-toggler-icon {
  color: #ffffff;
}

body.modern-resume.light-theme section.resume-section .resume-section-content {
  background: rgba(255, 255, 255, 0.76);
  border-color: rgba(23, 46, 77, 0.14);
  box-shadow: 0 18px 34px rgba(26, 46, 75, 0.14);
}

body.modern-resume.light-theme #about .resume-section-content {
  background:
    linear-gradient(135deg, rgba(79, 124, 255, 0.13), rgba(224, 182, 107, 0.12)),
    rgba(255, 255, 255, 0.83);
}

body.modern-resume.light-theme #experience .d-flex.flex-column.flex-md-row.justify-content-between,
body.modern-resume.light-theme #education .d-flex.flex-column.flex-md-row.justify-content-between {
  background: rgba(243, 248, 255, 0.92);
  border-color: rgba(20, 46, 76, 0.12);
  box-shadow: 0 8px 20px rgba(33, 62, 97, 0.12);
}

body.modern-resume.light-theme .contact-card {
  background: rgba(243, 248, 255, 0.92);
  border-color: rgba(20, 46, 76, 0.12);
  box-shadow: 0 8px 20px rgba(33, 62, 97, 0.12);
}

body.modern-resume.light-theme .contact-value {
  color: #2a415e;
}

body.modern-resume.light-theme #skills ul li {
  border-color: rgba(52, 83, 120, 0.22);
  background:
    linear-gradient(120deg, rgba(79, 124, 255, 0.18), rgba(216, 229, 249, 0.68), rgba(224, 182, 107, 0.26)),
    rgba(239, 247, 255, 0.9);
  box-shadow: 0 7px 16px rgba(35, 64, 98, 0.12);
}

body.modern-resume.light-theme .cert-img,
body.modern-resume.light-theme .certifications img {
  background: #ffffff;
  border-color: rgba(120, 140, 158, 0.36);
}

body.modern-resume.light-theme .social-icons .social-icon {
  background: linear-gradient(135deg, #4f7cff, #3b5fbf);
  color: #ffffff !important;
}

body.modern-resume.light-theme .theme-toggle,
body.modern-resume.light-theme .lang-toggle {
  border-color: rgba(18, 48, 78, 0.23);
  background: linear-gradient(135deg, rgba(226, 239, 252, 0.97), rgba(208, 229, 249, 0.95));
  color: #163556;
}

body.modern-resume.lang-ar #navbarResponsive .nav-item .nav-link {
  letter-spacing: 0;
  text-align: right;
}

body.modern-resume.lang-ar #experience .d-flex.flex-column.flex-md-row.justify-content-between::before,
body.modern-resume.lang-ar #education .d-flex.flex-column.flex-md-row.justify-content-between::before,
body.modern-resume.lang-ar #skills .resume-section-content::before,
body.modern-resume.lang-ar #publications .resume-section-content::before {
  left: auto;
  right: 0;
}

body.modern-resume.lang-ar #contact .contact-label,
body.modern-resume.lang-ar #contact .contact-value,
body.modern-resume.lang-ar #contact .contact-intro,
body.modern-resume.lang-ar #contact .contact-links-label {
  text-align: right;
}

body.modern-resume.lang-ar #about h1,
body.modern-resume.lang-ar #about .hero-typed-wrap {
  text-align: right;
}

body.modern-resume.lang-ar section.resume-section .resume-section-content,
body.modern-resume.lang-ar .subheading,
body.modern-resume.lang-ar p,
body.modern-resume.lang-ar li {
  text-align: right;
}

body.modern-resume.lang-ar ul {
  padding-right: 1.15rem;
  padding-left: 0;
}

body.modern-resume.lang-ar .lang-toggle,
body.modern-resume.lang-ar .theme-toggle {
  direction: ltr;
}

body.modern-resume.lang-ar .top-controls {
  right: 1.4rem;
  left: auto;
}

@media (min-width: 992px) {
  .top-controls {
    top: 0.62rem;
    right: 2rem;
  }

  body.modern-resume.lang-ar .top-controls {
    right: 2rem;
    left: auto;
  }

  body.modern-resume.lang-ar {
    padding-right: 17rem;
    padding-left: 0;
  }

  body.modern-resume.lang-ar #sideNav {
    left: auto;
    right: 0;
  }

  body.modern-resume.lang-ar #sideNav .navbar-brand {
    margin: auto auto 0;
  }
}

@media (max-width: 991.98px) {
  #sideNav {
    border-right: 0;
    border-bottom: 1px solid var(--aws-border);
  }

  #sideNav .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.58);
    background: rgba(17, 26, 40, 0.46);
  }

  #sideNav .navbar-toggler-icon {
    display: block;
    width: 1.5em;
    height: 1.5em;
    opacity: 1;
  }

  body.modern-resume.lang-ar #sideNav .navbar-toggler-icon {
    color: rgba(255, 255, 255, 0.95);
  }

  #sideNav .navbar-nav .nav-item .nav-link:hover,
  #sideNav .navbar-nav .nav-item .nav-link.active {
    transform: none;
  }

  body.modern-resume {
    padding-top: 5.9rem;
  }

  body.modern-resume.lang-ar #sideNav {
    direction: ltr;
  }

  body.modern-resume.lang-ar #navbarResponsive {
    direction: rtl;
    text-align: right;
  }

  section.resume-section {
    min-height: auto;
    padding-top: 2rem;
    padding-bottom: 2rem;
  }

  section.resume-section .resume-section-content {
    padding: 1.25rem;
  }

  .top-controls {
    top: 0.58rem;
    left: 0.78rem;
    right: auto;
    gap: 0.72rem;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: 0;
    backdrop-filter: none;
  }

  body.modern-resume.lang-ar .top-controls {
    right: auto;
    left: 0.78rem;
  }

  .theme-toggle {
    width: 4.35rem;
    height: 2.35rem;
    padding: 0.18rem;
  }

  .theme-toggle .toggle-track {
    padding: 0 0.46rem;
    font-size: 0.76rem;
  }

  .theme-toggle .toggle-thumb {
    width: 1.68rem;
    height: 1.68rem;
    left: 2px;
    top: 2px;
  }

  body.modern-resume.light-theme .theme-toggle .toggle-thumb {
    transform: translateX(2.23rem);
  }

  .lang-toggle {
    min-width: 4.25rem;
    height: 2.35rem;
    padding: 0 0.62rem;
    font-size: 0.86rem;
    border-radius: 11px;
    gap: 0.2rem;
  }
}

@media (max-width: 767.98px) {
  body.modern-resume {
    padding-top: 5.8rem;
  }

  .top-controls {
    top: 0.56rem;
    left: 0.68rem;
    right: auto;
    gap: 0.62rem;
    padding: 0;
  }

  body.modern-resume.lang-ar .top-controls {
    right: auto;
    left: 0.68rem;
  }

  section.resume-section {
    padding-top: 1.4rem;
    padding-bottom: 1.4rem;
  }

  section.resume-section .resume-section-content {
    border-radius: 16px;
    padding: 1rem;
  }

  #about h1 {
    font-size: clamp(2.2rem, 12vw, 3rem);
  }

  #typed {
    font-size: clamp(1.05rem, 4.8vw, 1.35rem);
  }

  .subheading {
    font-size: 1.02rem;
  }

  .social-icons .social-icon {
    width: 3rem;
    height: 3rem;
    font-size: 1.25rem;
    margin-right: 0.9rem;
  }

  .certifications {
    grid-template-columns: repeat(auto-fit, minmax(76px, 76px));
    justify-content: start;
    gap: 0.55rem;
  }

  .cert-img,
  .certifications img {
    width: 76px;
    height: 76px;
    padding: 0.24rem;
  }

  #experience .d-flex.flex-column.flex-md-row.justify-content-between,
  #education .d-flex.flex-column.flex-md-row.justify-content-between {
    padding: 0.95rem;
    border-radius: 14px;
  }

  #experience .flex-shrink-0,
  #education .flex-shrink-0 {
    margin-top: 0.7rem;
  }

  #experience .flex-shrink-0 .text-primary,
  #education .flex-shrink-0 .text-primary {
    font-size: 0.82rem;
    padding: 0.3rem 0.62rem;
  }

  ul {
    padding-left: 1rem;
  }

  body.modern-resume.lang-ar ul {
    padding-right: 1rem;
    padding-left: 0;
  }
}

@media (max-width: 420px) {
  .top-controls {
    top: 0.54rem;
    left: 0.52rem;
    right: auto;
    gap: 0.52rem;
    padding: 0;
  }

  body.modern-resume.lang-ar .top-controls {
    right: auto;
    left: 0.52rem;
  }

  .theme-toggle {
    width: 3.9rem;
    height: 2.15rem;
  }

  .lang-toggle {
    min-width: 3.75rem;
    height: 2.15rem;
    padding: 0 0.5rem;
    font-size: 0.8rem;
  }

  .theme-toggle .toggle-track {
    padding: 0 0.38rem;
  }

  .theme-toggle .toggle-thumb {
    width: 1.46rem;
    height: 1.46rem;
  }

  body.modern-resume.light-theme .theme-toggle .toggle-thumb {
    transform: translateX(2.02rem);
  }

  .certifications {
    grid-template-columns: repeat(auto-fit, minmax(70px, 70px));
  }

  .cert-img,
  .certifications img {
    width: 70px;
    height: 70px;
    padding: 0.2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal-init,
  .social-icons .social-icon,
  .certifications img,
  .theme-toggle,
  .lang-toggle {
    transition: none !important;
    transform: none !important;
    filter: none !important;
  }

  .contact-link-card {
    transition: none !important;
    transform: none !important;
  }

  body.modern-resume {
    animation: none !important;
  }

  #skills ul li,
  #experience .d-flex.flex-column.flex-md-row.justify-content-between::before,
  #education .d-flex.flex-column.flex-md-row.justify-content-between::before,
  #skills .resume-section-content::before,
  #publications .resume-section-content::before {
    animation: none !important;
  }

  #fx-canvas {
    display: none;
  }
}

@media (hover: hover) and (pointer: fine) {
  section.resume-section .resume-section-content:hover {
    transform: translateY(-4px);
    border-color: rgba(179, 203, 242, 0.36);
    box-shadow: 0 28px 56px rgba(0, 0, 0, 0.32);
  }
}
