/* ==============================
    Design Tokens
   ============================== */
:root {
  --bg-primary: rgb(0, 3, 7);
  --bg-secondary: rgb(1, 6, 9);
  --bg-card: rgb(7, 16, 25);
  --bg-elevated: rgb(10, 21, 29);
  --text-main: #f5f7fa;
  --text-secondary: #aab4c0;
  --text-muted: #7b8794;
  --accent-gold: #c8a96a;
  --accent-cyan: #7cc8da;
  --border-soft: rgba(245, 247, 250, 0.11);
  --border-strong: rgba(200, 169, 106, 0.34);
  --shadow-soft: 0 18px 50px rgba(0, 0, 0, 0.34);
  --shadow-card: 0 14px 34px rgba(0, 0, 0, 0.24);
  --radius-card: 8px;
  --radius-small: 6px;
  --container: 1360px;
  --container-gutter: 48px;
  --header-height: 64px;
  --scroll-offset: calc(var(--header-height) + 24px);
  --space-section: clamp(44px, 6vh, 76px);
  /* Font stacks */
  --font-en: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-ar: "Almarai", "Tahoma", "Arial", sans-serif;
  --text-xs: 0.86rem;
  --text-sm: 0.94rem;
  --text-base: 1rem;
  --text-md: 1.06rem;
  --text-lg: 1.14rem;
  --text-xl: 1.28rem;
  --text-2xl: 1.62rem;
  --text-3xl: 2.05rem;
  --text-4xl: clamp(2.25rem, 4vw, 3.8rem);
}

/* ==============================
    Base
   ============================== */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--scroll-offset);
  background:
    linear-gradient(115deg, rgb(0, 3, 7) 0%, rgb(1, 6, 9) 32%, rgb(7, 16, 25) 68%, rgb(10, 21, 29) 100%);
  background-attachment: fixed;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text-main);
  font-family: var(--font-en);
  font-weight: 400;
  font-size: var(--text-base);
  line-height: 1.7;
  background:
    linear-gradient(115deg, rgb(0, 3, 7) 0%, rgb(1, 6, 9) 32%, rgb(7, 16, 25) 68%, rgb(10, 21, 29) 100%);
  background-attachment: fixed;
}

html[lang="en"] body {
  font-family: var(--font-en);
}

html[lang="ar"] body {
  font-family: var(--font-ar);
  line-height: 1.8;
}

body.modal-open,
body.nav-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.ui-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.ui-box-bottom {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.ui-label-bottom {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding-bottom: 0;
  box-sizing: border-box;
  transform: translateY(0.02em);
}

.ui-icon {
  display: block;
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex: 0 0 auto;
}

:focus-visible {
  outline: 3px solid rgba(124, 200, 218, 0.85);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  inset-block-start: 12px;
  inset-inline-start: 12px;
  z-index: 1000;
  padding: 10px 14px;
  color: var(--bg-primary);
  background: var(--text-main);
  border-radius: var(--radius-small);
  transform: translateY(-160%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

/* ==============================
    Header / Navbar
   ============================== */
.site-header {
  position: sticky;
  inset-block-start: 0;
  z-index: 100;
  min-height: var(--header-height);
  background: rgba(0, 3, 7, 0.78);
  border-bottom: 1px solid var(--border-soft);
  backdrop-filter: blur(16px);
}

.navbar {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) auto minmax(140px, 1fr);
  align-items: center;
  width: min(100% - var(--container-gutter), var(--container));
  min-height: var(--header-height);
  margin-inline: auto;
  gap: 18px;
  direction: ltr;
}

.nav-left {
  display: flex;
  align-items: center;
  justify-self: start;
}

.nav-center {
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
}

.nav-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  justify-self: end;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  line-height: 1;
  text-decoration: none;
}

.brand-logo img {
  display: block;
  width: auto;
  height: 42px;
  max-width: 190px;
  object-fit: contain;
}

.nav-panel {
  display: contents;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 1.4vw, 22px);
  padding: 0;
  margin: 0;
  list-style: none;
}

html[lang="en"] .nav-links {
  direction: ltr;
  flex-direction: row;
}

html[lang="en"] .nav-links a {
  direction: ltr;
  text-align: center;
}

html[lang="ar"] .nav-links {
  direction: rtl;
  flex-direction: row;
}

html[lang="ar"] .nav-links a {
  direction: rtl;
  text-align: center;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding-block: 0.42rem;
  padding-inline: 8px;
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1;
  border-radius: var(--radius-small);
  transition: color 180ms ease, background 180ms ease;
}

.nav-links a:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.language-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  direction: ltr;
  min-height: 36px;
  padding: 4px 7px;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-small);
  background: rgba(7, 16, 25, 0.72);
}

.language-toggle span,
.language-separator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.language-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 28px;
  padding-block: 0.32rem;
  padding-inline: 8px;
  color: var(--text-muted);
  background: transparent;
  border: 0;
  border-radius: 5px;
  font-size: 0.85rem;
  font-weight: 800;
  line-height: 1;
}

.language-toggle .language-separator {
  min-height: 28px;
  align-items: center;
  align-self: center;
}

.nav-links a .ui-label-bottom,
.language-button .ui-label-bottom,
.language-separator .ui-label-bottom {
  line-height: 1;
}

.language-button .ui-label-bottom {
  padding-bottom: 0;
  transform: translateY(0.02em);
}

.language-separator .ui-label-bottom {
  align-items: center;
  padding-bottom: 0;
  transform: translateY(0.02em);
}

.language-button.is-active {
  color: var(--bg-primary);
  background: var(--accent-gold);
}

.menu-toggle {
  display: none;
  width: 38px;
  height: 38px;
  padding: 8px;
  background: rgba(7, 16, 25, 0.72);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card);
}

.menu-line {
  display: block;
  width: 100%;
  height: 2px;
  margin-block: 5px;
  background: var(--text-main);
  border-radius: 2px;
}

/* ==============================
    Layout / Section Frames
   ============================== */
.section {
  padding-block: clamp(26px, 3.6vw, 52px);
  background: transparent;
  border: 0;
  scroll-margin-top: var(--scroll-offset);
}

#home,
#about,
#services,
#process,
#projects,
#experience,
#skills,
#certifications,
#faq,
#contact {
  scroll-margin-top: var(--scroll-offset);
}

.section-elevated {
  background: transparent;
  border-block: 0;
}

.section::before,
.section::after {
  display: none;
}

.section-inner {
  width: min(100% - var(--container-gutter), var(--container));
  margin-inline: auto;
}

.section>.section-inner {
  position: relative;
  padding: clamp(22px, 2.8vw, 40px);
  border: 1.5px solid rgba(200, 169, 106, 0.2);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.015);
  box-shadow: none;
}

.section-heading {
  max-width: 860px;
  margin-block-end: 24px;
}

.section-heading h2,
.contact-copy h2 {
  margin: 0;
  color: var(--text-main);
  font-size: clamp(1.42rem, 2.35vw, 2.08rem);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: 0;
}

.section-heading p,
.contact-copy p,
.text-block p {
  color: var(--text-secondary);
  font-size: var(--text-md);
  line-height: 1.65;
}

.section-subtitle {
  max-width: 760px;
  margin: 16px 0 0;
  color: var(--text-secondary);
  font-size: var(--text-base);
  line-height: 1.7;
}

html[lang="ar"] .section-subtitle {
  line-height: 1.9;
}

.section-kicker,
.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-gold);
  font-size: var(--text-sm);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.button,
.hero-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding-block: 0.55rem;
  padding-inline: 1rem;
  border: 1px solid transparent;
  border-radius: var(--radius-card);
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1;
  box-sizing: border-box;
  vertical-align: middle;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.button .ui-label-bottom,
.hero-actions a .ui-label-bottom {
  line-height: 1;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  color: var(--bg-primary);
  background: var(--accent-gold);
  border-color: var(--accent-gold);
}

.button-secondary {
  color: var(--text-main);
  background: rgba(124, 200, 218, 0.11);
  border-color: rgba(124, 200, 218, 0.42);
}

.button-ghost {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border-soft);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 1.5vw, 24px);
}

.card,
.info-card,
.skill-category,
.timeline-item,
.contact-form {
  background: rgba(7, 16, 25, 0.92);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

.card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 20px;
  gap: 14px;
}

.card h3,
.info-card h3,
.skill-category h3,
.modal-card h3 {
  margin: 0 0 10px;
  color: var(--text-main);
  font-size: var(--text-lg);
  font-weight: 700;
  line-height: 1.3;
}

.card p,
.info-card p,
.skill-category p {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--text-base);
  line-height: 1.65;
  white-space: pre-line;
}

.tag-list,
.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.tag,
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding-block: 0.38rem;
  padding-inline: 0.68rem;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1;
  box-sizing: border-box;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-small);
  background: rgba(255, 255, 255, 0.03);
}

.tag-list>span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding-block: 0.38rem;
  padding-inline: 0.68rem;
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1;
  box-sizing: border-box;
}

.tag .ui-label-bottom,
.pill .ui-label-bottom,
.tag-list>span .ui-label-bottom {
  line-height: 1.25;
}

/* ==============================
   Process
   ============================== */
.process-section {
  position: relative;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 1.5vw, 22px);
  margin-top: 28px;
}

.process-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 220px;
  padding: 22px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card);
  background:
    linear-gradient(145deg, rgba(10, 21, 29, 0.92), rgba(1, 6, 9, 0.92)),
    var(--bg-card);
  box-shadow: var(--shadow-soft);
}

.process-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(200, 169, 106, 0.3);
  border-radius: 999px;
  color: var(--accent-gold);
  background: rgba(200, 169, 106, 0.08);
  font-size: var(--text-md);
  font-weight: 800;
  line-height: 1;
}

.process-card-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.process-card h3 {
  margin: 0;
  color: var(--text-main);
  font-size: var(--text-lg);
  font-weight: 800;
  line-height: 1.25;
}

.process-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--text-base);
  line-height: 1.7;
}

html[lang="ar"] .process-card p {
  line-height: 1.85;
}

/* ==============================
   Hero
   ============================== */
.hero {
  min-height: calc(100vh - var(--header-height, 72px));
  display: flex;
  align-items: center;
  padding-block: clamp(20px, 2.8vh, 32px);
  background: transparent;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(460px, 1.15fr) minmax(280px, 0.85fr);
  align-items: center;
  gap: clamp(30px, 4vw, 64px);
  width: min(100% - var(--container-gutter), var(--container));
}

.hero>.section-inner {
  min-height: clamp(500px, calc(100vh - var(--header-height, 72px) - 64px), 660px);
  display: grid;
  align-items: center;
  padding-block: clamp(22px, 2.3vw, 32px);
}

.hero-content {
  max-width: 820px;
}

.hero-content h1 {
  height: auto;
  overflow: visible;
  margin: 0;
  font-size: clamp(1.95rem, 3.8vw, 3.55rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.hero-title {
  margin: 10px 0 12px;
  color: var(--accent-cyan);
  font-size: clamp(0.96rem, 1.65vw, 1.12rem);
  font-weight: 800;
}

.hero-content h2 {
  height: auto;
  overflow: visible;
  max-width: 780px;
  margin: 0;
  color: var(--text-main);
  font-size: clamp(1.18rem, 2vw, 1.9rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: 0;
}

.hero-subheadline {
  max-width: 760px;
  margin: 16px 0 0;
  color: var(--text-secondary);
  font-size: var(--text-md);
  line-height: 1.7;
}

.section-heading p,
.contact-copy p,
.text-block p,
.card p,
.info-card p,
.skill-category p,
.faq-answer,
.timeline-list,
.modal-card p,
.modal-card li {
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-block-start: 22px;
}

.social-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-social-links {
  margin-block-start: 22px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  transition: transform 200ms ease, border-color 200ms ease, background 200ms ease;
}

.social-link:hover {
  transform: translateY(-2px);
  border-color: rgba(200, 169, 106, 0.45);
  background: rgba(200, 169, 106, 0.08);
}

.social-link img,
.contact-option-icon {
  display: block;
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex: 0 0 auto;
}

.profile-panel {
  width: min(100%, 420px);
  justify-self: end;
  padding: 12px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card);
  background: linear-gradient(180deg, rgba(10, 21, 29, 0.92), rgba(7, 16, 25, 0.84));
  box-shadow: var(--shadow-soft);
}

.profile-frame {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid rgba(200, 169, 106, 0.25);
  border-radius: var(--radius-card);
  background:
    linear-gradient(145deg, rgba(10, 21, 29, 1), rgba(0, 3, 7, 1)),
    var(--bg-elevated);
}

.profile-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-fallback {
  display: none;
  place-items: center;
  width: 100%;
  height: 100%;
  color: rgba(245, 247, 250, 0.9);
  font-size: clamp(4rem, 12vw, 7rem);
  font-weight: 900;
  letter-spacing: 0;
}

.profile-frame.is-fallback img {
  display: none;
}

.profile-frame.is-fallback .profile-fallback {
  display: grid;
}

.profile-caption {
  margin-block-start: 12px;
  padding: 10px;
  color: var(--text-secondary);
  font-size: var(--text-base);
  line-height: 1.55;
  text-align: center;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-small);
  background: rgba(0, 3, 7, 0.38);
}

/* ==============================
    About
   ============================== */
#about {
  --about-grid-gap: clamp(14px, 1.5vw, 24px);
}

.about-layout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--about-grid-gap);
  align-items: start;
}

#about .text-block {
  grid-column: span 2;
  max-width: 960px;
}

#about .text-block p {
  max-width: 920px;
  margin: 0 0 14px;
}

#about .profile-notes {
  display: grid;
  gap: 14px;
  width: 100%;
  justify-self: stretch;
  align-self: stretch;
}

.info-card {
  padding: 14px;
}

#about .profile-notes .info-card {
  width: 100%;
  max-width: none;
}

#about .highlight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--about-grid-gap);
  width: 100%;
  margin-block-start: 24px;
}

.highlight-item {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 12px;
  color: var(--text-main);
  font-size: var(--text-base);
  font-weight: 800;
  line-height: 1.25;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card);
  background: rgba(10, 21, 29, 0.72);
}

/* ==============================
   Projects
   ============================== */
.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-block: 10px 12px;
}

.project-tags {
  margin-block-start: 2px;
}

.project-card .button {
  align-self: flex-start;
  margin-block-start: auto;
}

.projects-toggle-wrap {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.projects-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 40px;
  padding: 0 1rem;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.projects-toggle:hover {
  transform: translateY(-2px);
  border-color: rgba(200, 169, 106, 0.45);
  background: rgba(200, 169, 106, 0.08);
}

.projects-toggle-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-gold);
  font-size: 1.1rem;
  line-height: 1;
}

/* ==============================
    Experience
   ============================== */
.timeline {
  display: grid;
  gap: clamp(14px, 1.5vw, 22px);
}

.experience-card {
  position: relative;
  padding: 22px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card);
  background: var(--bg-card);
}

.experience-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.experience-card h3 {
  margin: 0;
  color: var(--text-main);
  font-size: var(--text-xl);
  font-weight: 800;
  line-height: 1.2;
}

.experience-role {
  margin: 8px 0 0;
  color: var(--accent-gold);
  font-weight: 700;
  line-height: 1.45;
}

.experience-period {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--text-sm);
  line-height: 1.35;
  white-space: nowrap;
}

.experience-domain {
  margin: 14px 0 0;
  color: var(--text-secondary);
  font-weight: 600;
  line-height: 1.5;
}

.experience-description {
  margin: 14px 0 0;
  color: var(--text-secondary);
  line-height: 1.75;
}

.experience-highlights {
  padding-inline-start: 20px;
  margin: 16px 0 0;
  color: var(--text-secondary);
  font-size: var(--text-base);
  line-height: 1.7;
}

.experience-highlights li+li {
  margin-block-start: 10px;
}

/* ==============================
    Capabilities
   ============================== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 1.5vw, 24px);
}

.skill-category {
  padding: 16px;
}

.skill-category .tag-list {
  margin-block-start: 14px;
}

/* ==============================
    Certifications
   ============================== */
.certification-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  min-height: 196px;
}

.certification-issuer {
  margin: 0 0 10px;
  color: var(--accent-gold);
  font-size: var(--text-sm);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.certification-card h3 {
  margin: 0;
  color: var(--text-main);
  font-size: var(--text-lg);
  font-weight: 800;
  line-height: 1.3;
}

.certification-description {
  margin: 14px 0 0;
  color: var(--text-secondary);
  font-size: var(--text-base);
  line-height: 1.7;
}

.certification-link {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 0.75rem;
  font-size: var(--text-sm);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.certification-link:hover {
  transform: translateY(-2px);
  border-color: rgba(200, 169, 106, 0.45);
  background: rgba(200, 169, 106, 0.08);
}

html[lang="ar"] .certification-description {
  line-height: 1.85;
}

/* ==============================
    FAQ
   ============================== */
.faq-list {
  display: grid;
  width: min(100%, 1180px);
  gap: 12px;
  margin-inline: auto;
}

.faq-item {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card);
  background: rgba(7, 16, 25, 0.92);
  overflow: hidden;
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 58px;
  gap: 18px;
  padding: 16px 20px;
  color: var(--text-main);
  font: inherit;
  font-size: var(--text-base);
  text-align: start;
  background: transparent;
  border: 0;
  font-weight: 800;
  line-height: 1.35;
}

.faq-question span {
  display: inline-flex;
  align-items: center;
}

.faq-question>.ui-label-bottom {
  flex: 1;
  justify-content: flex-start;
  font-size: inherit;
  font-weight: inherit;
  line-height: 1.35;
}

.faq-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  color: var(--accent-gold);
  font-size: 1.12rem;
  font-weight: 800;
  line-height: 1;
}

.faq-icon .ui-label-bottom {
  font-size: inherit;
  font-weight: inherit;
  line-height: 1;
}

.faq-answer {
  padding: 0 20px 18px;
  color: var(--text-secondary);
  font-size: var(--text-base);
  line-height: 1.75;
}

.faq-answer[hidden] {
  display: none;
}

.faq-toggle-wrap {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.faq-toggle-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 40px;
  padding: 0 1rem;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.faq-toggle-more:hover {
  transform: translateY(-2px);
  border-color: rgba(200, 169, 106, 0.45);
  background: rgba(200, 169, 106, 0.08);
}

.faq-toggle-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-gold);
  font-size: 1.08rem;
  line-height: 1;
}

.faq-toggle-more .ui-label-bottom {
  font-size: inherit;
  font-weight: inherit;
  line-height: 1;
}

html[lang="ar"] .faq-question {
  font-size: var(--text-base);
  line-height: 1.45;
}

html[lang="ar"] .faq-question>.ui-label-bottom {
  line-height: 1.45;
}

html[lang="ar"] .faq-answer {
  line-height: 1.9;
}

/* ==============================
    Contact
   ============================== */
.contact-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.1fr);
  gap: clamp(22px, 3.5vw, 48px);
  align-items: start;
}

.contact-copy p {
  margin-block-start: 14px;
}

.contact-note {
  color: var(--text-muted);
  font-size: var(--text-base);
}

.contact-direct-title {
  margin: 22px 0 0;
  color: var(--text-main);
  font-size: var(--text-base);
  font-weight: 800;
  line-height: 1.3;
}

.contact-options {
  display: grid;
  gap: 8px;
  margin-block-start: 12px;
}

.contact-option-link {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.65rem;
  width: fit-content;
  max-width: 100%;
  min-height: 36px;
  padding-block: 0.36rem;
  padding-inline: 0.68rem;
  color: var(--accent-cyan);
  font-size: var(--text-sm);
  line-height: 1;
  text-align: start;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  transition: transform 200ms ease, border-color 200ms ease, background 200ms ease;
}

.contact-option-link:hover {
  transform: translateY(-1px);
  border-color: rgba(200, 169, 106, 0.45);
  background: rgba(200, 169, 106, 0.08);
}

.contact-option-link span {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  overflow-wrap: anywhere;
}

.contact-option-link .ui-label-bottom {
  min-height: 23px;
  align-items: center;
  line-height: 1;
  padding-bottom: 0;
}

.contact-option-icon {
  display: block;
  width: 23px;
  height: 23px;
  object-fit: contain;
  flex: 0 0 auto;
}

.contact-options a {
  color: var(--accent-cyan);
  overflow-wrap: anywhere;
}

.contact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 18px;
}

.form-field {
  display: grid;
  gap: 7px;
}

.form-field-wide,
.form-submit,
.contact-status {
  grid-column: 1 / -1;
}

.hidden-field {
  display: none;
}

.form-field label {
  color: var(--text-main);
  font-size: var(--text-base);
  font-weight: 800;
  line-height: 1.3;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  color: var(--text-main);
  font-size: var(--text-base);
  line-height: 1.4;
  background: rgba(0, 3, 7, 0.62);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-small);
}

.form-field input,
.form-field select {
  min-height: 40px;
  padding: 7px 9px;
}

.form-field textarea {
  resize: vertical;
  min-height: 104px;
  padding: 9px;
}

.form-field input[aria-invalid="true"],
.form-field select[aria-invalid="true"],
.form-field textarea[aria-invalid="true"] {
  border-color: #e8a4a4;
}

.contact-status {
  min-height: 24px;
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.4;
}

.contact-status.is-error {
  color: #f1b8b8;
}

.contact-status.is-success {
  color: var(--accent-cyan);
}

/* ==============================
    Footer
   ============================== */
.site-footer {
  padding: 0;
  color: var(--text-secondary);
  background: transparent;
  border-top: 0;
}

.footer-bar {
  width: 100%;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 3, 7, 0.42);
}

.footer-inner {
  width: min(100% - var(--container-gutter), var(--container));
  margin-inline: auto;
  padding-block: 18px;
}

.footer-final {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 1fr);
  align-items: center;
  gap: 18px;
  direction: ltr;
}

.footer-left {
  display: flex;
  align-items: center;
  justify-self: start;
}

.footer-center {
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
}

.footer-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  justify-self: end;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  line-height: 1;
}

.footer-logo img {
  display: block;
  width: auto;
  height: 32px;
  max-width: 150px;
  object-fit: contain;
}

.footer-role {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
}

.footer-copy {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: end;
  white-space: nowrap;
}

html[lang="ar"] .footer-final,
html[lang="ar"] .footer-inner {
  direction: ltr;
}

html[lang="ar"] .footer-role,
html[lang="ar"] .footer-copy {
  direction: rtl;
  unicode-bidi: plaintext;
}

/* ==============================
    Modal
   ============================== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: center;
  padding: 14px;
}

.modal[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 3, 7, 0.78);
  backdrop-filter: blur(10px);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(100%, 720px);
  max-height: min(640px, calc(100vh - 28px));
  overflow: auto;
  padding: clamp(18px, 2.6vw, 26px);
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
}

.modal-card h2 {
  margin: 0 0 10px;
  color: var(--text-main);
  font-size: clamp(1.45rem, 2.8vw, 1.95rem);
  line-height: 1.18;
  letter-spacing: 0;
}

.modal-card h3 {
  margin-block: 18px 8px;
}

.modal-card p,
.modal-card li {
  font-size: var(--text-base);
  line-height: 1.65;
}

.modal-role {
  color: var(--accent-cyan);
  font-weight: 800;
}

.modal-card ul {
  padding-inline-start: 20px;
  margin: 0;
}

.modal-tags {
  margin-top: 0;
}

.modal-close {
  position: absolute;
  inset-block-start: 14px;
  inset-inline-end: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--text-main);
  font-size: 1.8rem;
  line-height: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-small);
}

/* ==============================
    RTL Tweaks
   ============================== */
[dir="rtl"] .section-kicker,
[dir="rtl"] .eyebrow {
  letter-spacing: 0;
}

html[lang="ar"] .section-heading h2,
html[lang="ar"] .contact-copy h2,
html[lang="ar"] .card h3,
html[lang="ar"] .info-card h3,
html[lang="ar"] .skill-category h3,
html[lang="ar"] .modal-card h3,
html[lang="ar"] .timeline-meta h3,
html[lang="ar"] .experience-card h3 {
  line-height: 1.38;
}

html[lang="ar"] .hero-content h1 {
  line-height: 1.08;
}

html[lang="ar"] .hero-content h2 {
  max-width: 820px;
  line-height: 1.28;
}

html[lang="ar"] .hero-subheadline {
  max-width: 780px;
  line-height: 1.9;
}

html[lang="ar"] p {
  line-height: 1.85;
}

html[lang="ar"] .section-heading p,
html[lang="ar"] .contact-copy p,
html[lang="ar"] .text-block p,
html[lang="ar"] .card p,
html[lang="ar"] .faq-answer,
html[lang="ar"] .timeline-list,
html[lang="ar"] .experience-description,
html[lang="ar"] .experience-highlights,
html[lang="ar"] .modal-card p,
html[lang="ar"] .modal-card li {
  line-height: 1.85;
}

[dir="rtl"] .timeline-list,
[dir="rtl"] .experience-highlights,
[dir="rtl"] .modal-card ul {
  padding-inline-start: 0;
  padding-inline-end: 20px;
}

/* ==============================
    Responsive
   ============================== */
@media (min-width: 1600px) {
  :root {
    --container: 1440px;
    --container-gutter: 64px;
  }
}

@media (min-width: 1024px) {

  .services-grid,
  .certifications-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .projects-grid,
  .skills-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1400px) {
  .projects-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .process-grid {
    grid-template-columns: 1fr;
  }

  .process-card {
    min-height: auto;
  }
}

@media (max-width: 1180px) {
  .navbar {
    grid-template-columns: minmax(110px, 1fr) auto minmax(110px, 1fr);
    gap: 12px;
  }

  .nav-links {
    gap: 8px;
  }

  .nav-links a {
    padding-inline: 6px;
  }
}

@media (max-width: 980px) {
  :root {
    --container-gutter: 36px;
  }

  .card-grid,
  .highlight-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-grid,
  .about-layout,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-block: 40px;
  }

  .hero>.section-inner {
    min-height: auto;
  }

  .hero-social-links {
    margin-block-start: 24px;
  }

  #about .about-layout {
    grid-template-columns: 1fr;
  }

  #about .text-block,
  #about .profile-notes {
    grid-column: auto;
    max-width: none;
  }

  #about .text-block p {
    max-width: none;
  }

  #about .highlight-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-panel {
    max-width: 460px;
    justify-self: start;
  }
}

@media (max-width: 820px) {
  :root {
    --header-height: 60px;
  }

  .navbar {
    grid-template-columns: auto 1fr auto;
    width: min(100% - var(--container-gutter), var(--container));
    gap: 14px;
  }

  .nav-left {
    justify-self: start;
  }

  .menu-toggle {
    grid-column: 3;
    justify-self: end;
  }

  .menu-toggle {
    display: block;
  }

  .nav-panel {
    position: fixed;
    inset-block-start: var(--header-height);
    inset-inline: 0;
    display: grid;
    gap: 14px;
    padding: 14px;
    background: rgba(0, 3, 7, 0.96);
    border-bottom: 1px solid var(--border-soft);
    transform: translateY(-120%);
    visibility: hidden;
    transition: transform 220ms ease, visibility 220ms ease;
  }

  .nav-center,
  .nav-right {
    width: 100%;
  }

  .nav-center {
    justify-content: stretch;
  }

  .nav-right {
    justify-content: flex-end;
  }

  .nav-panel.is-open {
    transform: translateY(0);
    visibility: visible;
  }

  .nav-links {
    display: grid;
    gap: 4px;
  }

  .nav-links a {
    min-height: 42px;
    padding-inline: 10px;
  }

  .language-toggle {
    width: max-content;
  }

  .hero {
    min-height: auto;
    padding-block: 40px;
  }

  .timeline-item {
    grid-template-columns: 1fr;
  }

  .experience-card-header {
    flex-direction: column;
    gap: 10px;
  }

  .experience-period {
    white-space: normal;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 768px) {
  :root {
    --scroll-offset: calc(var(--header-height) + 16px);
  }

  .footer-final {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 12px;
    padding-block: 18px;
  }

  .footer-left,
  .footer-center,
  .footer-right {
    justify-self: center;
    justify-content: center;
  }

  .footer-logo img {
    height: 32px;
    max-width: 150px;
  }

  .footer-copy {
    text-align: center;
    white-space: normal;
  }
}

@media (max-width: 700px) {
  .faq-list {
    width: 100%;
    gap: 14px;
  }

  .faq-question {
    min-height: 64px;
    gap: 16px;
    padding: 18px 20px;
    font-size: var(--text-base);
  }

  .faq-answer {
    padding: 0 20px 20px;
    font-size: var(--text-base);
  }
}

@media (max-width: 640px) {
  :root {
    --container-gutter: 28px;
    --text-base: 1rem;
    --text-md: 1.05rem;
  }

  html,
  body {
    background-attachment: scroll;
  }

  .section {
    padding-block: 32px;
  }

  .hero {
    padding-block: 40px;
  }

  .section-inner {
    width: min(100% - var(--container-gutter), var(--container));
  }

  .section>.section-inner {
    padding: 24px;
    border-radius: 18px;
  }

  .footer-inner {
    width: min(100% - var(--container-gutter), var(--container));
    padding-block: 18px;
  }

  .brand-logo img {
    height: 36px;
    max-width: 160px;
  }

  .card-grid,
  .highlight-grid,
  .skills-grid {
    grid-template-columns: 1fr;
  }

  #about .highlight-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
    min-height: 48px;
  }

  .contact-option-link {
    font-size: var(--text-sm);
  }

  .profile-panel {
    padding: 12px;
  }

  .contact-form {
    grid-template-columns: 1fr;
    padding: 16px;
  }
}
