:root {
  --blue: #283a83;
  --teal: #057590;
  --green: #48ad48;
  --accent: #3d9ee8;
  --bg: #0b101c;
  --surface: #131b2c;
  --surface-soft: #0f1726;
  --glass: rgba(19, 27, 44, .78);
  --text: #eef4ff;
  --muted: #a8b4c9;
  --line: rgba(255, 255, 255, .1);
  --shadow-sm: 0 8px 28px rgba(0, 0, 0, .28);
  --shadow: 0 24px 60px rgba(0, 0, 0, .34);
  --shadow-lg: 0 36px 80px rgba(0, 0, 0, .42);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --font: "Poppins", "Cairo", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --header-h: 76px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(72, 173, 72, .12), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(5, 117, 144, .14), transparent 50%),
    radial-gradient(ellipse 50% 30% at 50% 100%, rgba(61, 158, 232, .06), transparent 45%),
    linear-gradient(180deg, #0a0f18 0%, #101626 48%, #0b101c 100%);
  pointer-events: none;
}

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

button,
input,
textarea {
  font: inherit;
}

.container {
  width: min(1160px, calc(100% - 40px));
  margin-inline: auto;
}

.section {
  padding: 104px 0;
  position: relative;
}

/* Scroll progress */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 50;
  background: transparent;
}

.scroll-progress-bar {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--blue), var(--teal), var(--green));
  box-shadow: 0 0 12px rgba(72, 173, 72, .5);
  transition: width .08s linear;
}

/* Ambient orbs */
.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .45;
  animation: floatOrb 18s var(--ease) infinite;
}

.orb-1 {
  width: 420px;
  height: 420px;
  top: -8%;
  left: -6%;
  background: rgba(5, 117, 144, .35);
}

.orb-2 {
  width: 360px;
  height: 360px;
  top: 38%;
  right: -8%;
  background: rgba(72, 173, 72, .28);
  animation-delay: -6s;
}

.orb-3 {
  width: 300px;
  height: 300px;
  bottom: 8%;
  left: 32%;
  background: rgba(40, 58, 131, .22);
  animation-delay: -12s;
}

@keyframes floatOrb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(24px, -18px) scale(1.05); }
  66% { transform: translate(-16px, 22px) scale(.95); }
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(1.4);
  transition: box-shadow .3s var(--ease), background .3s var(--ease);
}

.site-header.scrolled {
  box-shadow: var(--shadow-sm);
}

.nav {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-inline-end: auto;
  font-weight: 800;
  color: #f4f8ff;
  transition: transform .25s var(--ease);
}

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

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  box-shadow: 0 10px 26px rgba(40, 58, 131, .3);
  overflow: hidden;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}

.brand:hover .brand-mark {
  transform: rotate(-4deg) scale(1.04);
  box-shadow: 0 14px 32px rgba(5, 117, 144, .35);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: .92rem;
  font-weight: 600;
}

.nav-links a {
  position: relative;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  transition: color .25s var(--ease), background .25s var(--ease);
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 6px;
  height: 2px;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(90deg, var(--teal), var(--green));
  border-radius: 2px;
  transition: transform .3s var(--ease);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--teal);
  background: rgba(5, 117, 144, .06);
}

.nav-links a.active::after,
.nav-links a:hover::after {
  transform: scaleX(1);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-toggle,
.menu-toggle {
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: #fff;
  background: var(--surface);
  cursor: pointer;
  transition: transform .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease), box-shadow .25s var(--ease);
}

.menu-toggle {
  width: 44px;
}

.lang-toggle {
  min-width: 58px;
  padding: 0 14px;
  font-weight: 800;
}

.lang-toggle:hover,
.menu-toggle:hover {
  transform: translateY(-2px);
  border-color: rgba(5, 117, 144, .35);
  box-shadow: var(--shadow-sm);
}

.menu-toggle {
  display: none;
}

/* Hero */
.hero {
  position: relative;
  min-height: calc(92vh - var(--header-h));
  display: flex;
  align-items: center;
  padding: 48px 0 80px;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, var(--bg) 0%, rgba(11, 16, 28, .94) 44%, rgba(11, 16, 28, .6) 70%, transparent 100%),
    url("hero.png") center right / cover no-repeat;
  z-index: -1;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 56px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  color: var(--teal);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.eyebrow.pill {
  padding: 8px 14px;
  border: 1px solid rgba(5, 117, 144, .2);
  border-radius: 999px;
  background: rgba(5, 117, 144, .06);
  animation: fadeSlideUp .8s var(--ease) both;
}

h1, h2, h3, p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: clamp(3rem, 7vw, 5.4rem);
  line-height: .98;
  letter-spacing: -.02em;
  background: linear-gradient(135deg, #e8f0ff 0%, #7ec8e0 50%, #7dd87d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: fadeSlideUp .8s var(--ease) .1s both;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.85rem, 4vw, 3rem);
  line-height: 1.16;
  letter-spacing: -.015em;
}

h3 {
  margin-bottom: 8px;
  line-height: 1.25;
}

.role {
  margin-bottom: 16px;
  color: var(--teal);
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 700;
  animation: fadeSlideUp .8s var(--ease) .18s both;
}

.type-line {
  min-height: 36px;
  margin-bottom: 22px;
  color: var(--muted);
  font-weight: 600;
  font-size: 1.05rem;
  animation: fadeSlideUp .8s var(--ease) .26s both;
}

#typewriter {
  color: var(--green);
  font-weight: 700;
}

.type-cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  margin-inline-start: 2px;
  vertical-align: text-bottom;
  background: var(--green);
  animation: blink .9s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.hero-text {
  max-width: 580px;
  margin-bottom: 32px;
  color: var(--muted);
  font-size: 1.06rem;
  animation: fadeSlideUp .8s var(--ease) .34s both;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 36px;
  animation: fadeSlideUp .8s var(--ease) .42s both;
}

.btn {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 13px 22px;
  font-weight: 700;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, .25) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .6s var(--ease);
}

.btn:hover::before {
  transform: translateX(120%);
}

.btn:hover {
  transform: translateY(-3px);
}

.btn:active {
  transform: translateY(-1px);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  box-shadow: 0 16px 36px rgba(40, 58, 131, .28);
}

.btn-primary:hover {
  box-shadow: 0 22px 44px rgba(5, 117, 144, .32);
}

.btn-secondary {
  color: #fff;
  background: var(--surface);
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.btn.loading {
  pointer-events: none;
  opacity: .85;
}

.btn.loading i {
  animation: spin .8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Hero stats */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  max-width: 520px;
}

.stat-card {
  padding: 18px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--glass);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  transition: transform .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: rgba(72, 173, 72, .35);
  box-shadow: var(--shadow);
}

.stat-card strong {
  display: block;
  font-size: 1.75rem;
  line-height: 1;
  color: #e8f2ff;
  margin-bottom: 6px;
}

.stat-card span {
  font-size: .78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .03em;
}

/* Hero visual */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.visual-card {
  position: relative;
  width: min(380px, 100%);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.visual-glow {
  position: absolute;
  inset: 10%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(5, 117, 144, .25), transparent 70%);
  animation: pulseGlow 4s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% { transform: scale(1); opacity: .8; }
  50% { transform: scale(1.08); opacity: 1; }
}

.visual-ring {
  position: absolute;
  inset: 8%;
  border: 2px dashed rgba(5, 117, 144, .25);
  border-radius: 50%;
  animation: spinSlow 24s linear infinite;
}

@keyframes spinSlow {
  to { transform: rotate(360deg); }
}

.visual-core {
  width: 120px;
  height: 120px;
  display: grid;
  place-items: center;
  border-radius: 28px;
  font-size: 2.8rem;
  color: #fff;
  background: linear-gradient(145deg, var(--blue), var(--teal));
  box-shadow: var(--shadow-lg);
  z-index: 2;
  animation: floatCore 5s var(--ease) infinite;
}

@keyframes floatCore {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.visual-chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(10px);
  font-size: .82rem;
  font-weight: 700;
  color: var(--text);
  box-shadow: var(--shadow-sm);
  animation: floatChip 6s var(--ease) infinite;
  z-index: 3;
}

.visual-chip:nth-child(2) { top: 12%; left: 0; animation-delay: 0s; }
.visual-chip.chip-2 { top: 58%; right: -4%; animation-delay: -2s; }
.visual-chip.chip-3 { bottom: 14%; left: 8%; animation-delay: -4s; }

@keyframes floatChip {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Section intro */
.section-intro {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px 40px;
  align-items: start;
  margin-bottom: 48px;
}

.section-intro.centered {
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
}

.section-num {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(180deg, rgba(5, 117, 144, .25), transparent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-heading {
  max-width: 720px;
}

.section-heading p,
.about-panel p {
  color: var(--muted);
}

.centered {
  margin-inline: auto;
  text-align: center;
}

/* About */
.about-layout {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 28px;
  align-items: start;
}

.about-panel,
.contact-form,
.skill-card,
.timeline-item,
.highlight-card,
.stat-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.about-panel {
  padding: 36px;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}

.about-panel:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.about-panel p:last-child {
  margin-bottom: 0;
}

.highlight-grid {
  display: grid;
  gap: 16px;
}

.highlight-card {
  padding: 22px 24px;
  transition: transform .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
}

.highlight-card:hover {
  transform: translateX(6px);
  border-color: rgba(5, 117, 144, .3);
  box-shadow: var(--shadow);
}

body.rtl .highlight-card:hover {
  transform: translateX(-6px);
}

.highlight-card i {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  border-radius: var(--radius-sm);
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--green));
  font-size: 1.1rem;
}

.highlight-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: .92rem;
}

/* Skills */
.skills-section {
  background: linear-gradient(180deg, transparent, rgba(5, 117, 144, .04), transparent);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.skill-card {
  padding: 26px;
  transition: transform .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
  transform-style: preserve-3d;
  will-change: transform;
}

.skill-card:hover {
  border-color: rgba(72, 173, 72, .4);
  box-shadow: var(--shadow);
}

.skill-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.skill-card i {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--green));
  font-size: 1.4rem;
  transition: transform .35s var(--ease);
}

.skill-card:hover i {
  transform: scale(1.08) rotate(-4deg);
}

.skill-level {
  font-size: .78rem;
  font-weight: 800;
  color: var(--teal);
}

.skill-card p {
  margin-bottom: 16px;
  color: var(--muted);
  font-size: .92rem;
}

.skill-bar {
  height: 6px;
  border-radius: 999px;
  background: var(--surface-soft);
  overflow: hidden;
}

.skill-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--teal), var(--green));
  transition: width 1.2s var(--ease);
}

.skill-card.animated .skill-bar span {
  width: var(--level, 0%);
}

/* Timeline */
.timeline {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  inset-inline-start: 22px;
  width: 2px;
  background: linear-gradient(var(--blue), var(--teal), var(--green));
  opacity: .5;
}

.timeline-item {
  position: relative;
  margin-bottom: 16px;
  padding: 0;
  overflow: hidden;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}

.timeline-item.active {
  border-color: rgba(5, 117, 144, .35);
  box-shadow: var(--shadow);
}

.timeline-trigger {
  width: 100%;
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 12px 16px;
  align-items: center;
  padding: 22px 24px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: inherit;
  cursor: pointer;
  transition: background .25s var(--ease);
}

.timeline-trigger:hover {
  background: rgba(5, 117, 144, .04);
}

.timeline-dot {
  position: relative;
  z-index: 1;
  width: 40px;
  height: 40px;
  grid-row: span 2;
  align-self: center;
  border: 7px solid var(--surface);
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 2px var(--line);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}

.timeline-item.active .timeline-dot {
  transform: scale(1.12);
  box-shadow: 0 0 0 4px rgba(72, 173, 72, .25);
}

.timeline-trigger h3 {
  margin: 4px 0 0;
  text-align: inherit;
}

.time {
  display: block;
  color: var(--teal);
  font-size: .76rem;
  font-weight: 800;
  text-transform: uppercase;
  text-align: inherit;
}

.timeline-chevron {
  color: var(--muted);
  transition: transform .35s var(--ease), color .35s var(--ease);
}

.timeline-item.active .timeline-chevron {
  transform: rotate(180deg);
  color: var(--teal);
}

.timeline-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height .45s var(--ease), padding .45s var(--ease);
  padding: 0 24px 0 88px;
}

.timeline-item.active .timeline-body {
  max-height: 200px;
  padding: 0 24px 22px 88px;
}

.timeline-body p {
  margin: 0;
  color: var(--muted);
  font-size: .94rem;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 48px;
  align-items: start;
}

.contact-form {
  padding: 32px;
}

.contact-form .field {
  display: block;
  margin-bottom: 20px;
}

.contact-form .field > span:first-child,
.contact-form .field-head > span:first-child {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-weight: 700;
}

.field-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.char-count {
  font-size: .78rem;
  font-weight: 600;
  color: var(--muted);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 15px 16px;
  color: var(--text);
  background: var(--surface-soft);
  outline: none;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease), transform .25s var(--ease);
}

.contact-form textarea {
  resize: vertical;
  min-height: 130px;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(5, 117, 144, .12);
  background: var(--surface);
  transform: translateY(-1px);
}

.contact-form .field.valid input,
.contact-form .field.valid textarea {
  border-color: rgba(72, 173, 72, .5);
}

.contact-form .invalid input,
.contact-form .invalid textarea {
  border-color: #d64545;
  box-shadow: 0 0 0 4px rgba(214, 69, 69, .1);
}

.error {
  display: none;
  margin-top: 8px;
  color: #d64545;
  font-size: .82rem;
  font-weight: 600;
}

.invalid .error {
  display: block;
}

.char-count.near-limit {
  color: #c98a20;
}

.char-count.at-limit {
  color: #d64545;
  font-weight: 800;
}

.form-status {
  min-height: 26px;
  margin: 14px 0 0;
  color: var(--teal);
  font-weight: 700;
}

.form-status.success {
  color: var(--green);
}

.form-status.error-msg {
  color: #d64545;
}

.form-status.info {
  color: var(--muted);
}

.btn-primary:disabled,
.btn-primary.btn-disabled {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-primary:disabled:hover,
.btn-primary.btn-disabled:hover {
  transform: none;
}

/* Footer */
.footer {
  border-top: 1px solid var(--line);
  padding: 32px 0;
  background: var(--glass);
  backdrop-filter: blur(12px);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer p {
  margin: 0;
  color: var(--muted);
}

.social-links {
  display: flex;
  gap: 10px;
}

.social-links a {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--teal);
  position: relative;
  transition: transform .3s var(--ease), background .3s var(--ease), color .3s var(--ease), box-shadow .3s var(--ease);
}

.social-links a:hover {
  transform: translateY(-4px) scale(1.05);
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--green));
  box-shadow: 0 12px 28px rgba(5, 117, 144, .3);
}

/* Back to top */
.back-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  box-shadow: var(--shadow);
  cursor: pointer;
  z-index: 30;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity .3s var(--ease), visibility .3s var(--ease), transform .3s var(--ease);
}

.back-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-top:hover {
  transform: translateY(-4px);
}

/* Reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .75s var(--ease), transform .75s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

[data-stagger] > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}

[data-stagger].visible > *:nth-child(1) { transition-delay: .05s; }
[data-stagger].visible > *:nth-child(2) { transition-delay: .12s; }
[data-stagger].visible > *:nth-child(3) { transition-delay: .19s; }

[data-stagger].visible > * {
  opacity: 1;
  transform: translateY(0);
}

@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* RTL */
body.rtl {
  font-family: "Cairo", "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.rtl .nav-links a::after {
  transform-origin: right;
}

body.rtl .hero-copy,
body.rtl .section-heading,
body.rtl .about-panel,
body.rtl .skill-card,
body.rtl .timeline-trigger,
body.rtl .timeline-body,
body.rtl .contact-form,
body.rtl .highlight-card {
  text-align: right;
}

body.rtl .centered,
body.rtl .section-intro.centered {
  text-align: center;
}

body.rtl .timeline-body,
body.rtl .timeline-item.active .timeline-body {
  padding-inline: 24px 88px;
}

body.rtl .contact-form input,
body.rtl .contact-form textarea {
  text-align: right;
}

body.rtl .timeline-trigger {
  text-align: right;
}

body.rtl .back-top {
  right: auto;
  left: 24px;
}

/* Responsive */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-visual {
    order: -1;
  }

  .visual-card {
    width: min(300px, 80vw);
  }

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

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

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}

@media (max-width: 760px) {
  :root {
    --header-h: 68px;
  }

  .container {
    width: min(100% - 28px, 1160px);
  }

  .section {
    padding: 76px 0;
  }

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .nav-links {
    position: absolute;
    top: var(--header-h);
    left: 14px;
    right: 14px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
  }

  body.rtl .nav-links {
    text-align: right;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a::after {
    display: none;
  }

  .hero::after {
    background:
      linear-gradient(180deg, var(--bg) 0%, rgba(11, 16, 28, .92) 58%, rgba(11, 16, 28, .78) 100%),
      url("hero.png") center / cover no-repeat;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

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

  .section-intro {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .section-num {
    font-size: 2.5rem;
  }

  .timeline-body,
  .timeline-item.active .timeline-body {
    padding-inline: 20px 20px;
    padding-inline-start: 72px;
  }

  body.rtl .timeline-body,
  body.rtl .timeline-item.active .timeline-body {
    padding-inline: 72px 20px;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .visual-chip {
    font-size: .72rem;
    padding: 8px 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }

  .reveal,
  [data-stagger] > * {
    opacity: 1;
    transform: none;
  }
}
