/* ================================================
   MOHAMED HAGALI – PORTFOLIO
   Theme: Data Terminal / Dark Analytics
   ================================================ */

/* -------- RESET & BASE -------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:         #060b14;
  --bg-2:       #0c1525;
  --bg-card:    #101d34;
  --bg-card-2:  #152240;
  --accent:     #00e5c3;
  --accent-2:   #f0a500;
  --accent-3:   #6e8cff;
  --text:       #dde6f5;
  --text-muted: #6b7f9e;
  --border:     #1e2d4a;
  --border-2:   #243755;
  --font-display: 'Syne', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;
  --radius:     12px;
  --radius-lg:  20px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* -------- SCROLLBAR -------- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* -------- UTILITIES -------- */
.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 100px 0;
}

.section__label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  color: #fff;
  margin-bottom: 16px;
}

.section__subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-top: 8px;
}

.section__header {
  margin-bottom: 60px;
}

/* -------- REVEAL ANIMATION -------- */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* -------- BUTTONS -------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}

.btn--primary {
  background: var(--accent);
  color: var(--bg);
}
.btn--primary:hover {
  background: #00fff5;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,229,195,0.35);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border-2);
}
.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.btn--full { width: 100%; justify-content: center; }

/* -------- NAV -------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  transition: background 0.3s, border-color 0.3s;
}

.nav.scrolled {
  background: rgba(6, 11, 20, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav__inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  color: #fff;
  letter-spacing: 1px;
}
.nav__logo-bracket { color: var(--accent); }

.nav__links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav__links a {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  transition: color 0.2s;
  letter-spacing: 0.5px;
}
.nav__links a:hover { color: var(--accent); }

.nav__cta {
  background: var(--accent) !important;
  color: var(--bg) !important;
  padding: 8px 18px;
  border-radius: 6px;
  font-weight: 600 !important;
}
.nav__cta:hover { background: #00fff5 !important; }

.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav__burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: 0.3s;
}

.nav__mobile {
  display: none;
  flex-direction: column;
  background: rgba(6,11,20,0.98);
  border-top: 1px solid var(--border);
  padding: 20px 24px;
  gap: 16px;
}
.nav__mobile a {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-muted);
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.nav__mobile a:hover { color: var(--accent); }
.nav__mobile.open { display: flex; }

/* -------- HERO -------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--bg);
}

.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.6;
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 1160px;
  margin: 0 auto;
  padding: 100px 24px 60px;
}

.hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 24px;
  animation: fadeUp 0.8s ease 0.2s both;
}

.hero__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 12px var(--accent); }
  50% { opacity: 0.5; box-shadow: 0 0 4px var(--accent); }
}

.hero__name {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 9vw, 7.5rem);
  font-weight: 800;
  line-height: 1.0;
  color: #fff;
  margin-bottom: 24px;
  animation: fadeUp 0.8s ease 0.4s both;
}

.hero__name-accent {
  color: var(--accent);
  display: block;
}

.hero__title-wrapper {
  font-family: var(--font-mono);
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  color: var(--text-muted);
  margin-bottom: 28px;
  animation: fadeUp 0.8s ease 0.6s both;
}

.hero__typed {
  color: var(--accent-2);
  font-weight: 500;
}

.hero__cursor {
  color: var(--accent);
  animation: blink 1s infinite;
  font-weight: 300;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero__desc {
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.8;
  max-width: 520px;
  margin-bottom: 40px;
  animation: fadeUp 0.8s ease 0.8s both;
}

.hero__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 40px;
  animation: fadeUp 0.8s ease 1.0s both;
}

.hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  animation: fadeUp 0.8s ease 1.2s both;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(0, 229, 195, 0.08);
  border: 1px solid rgba(0, 229, 195, 0.2);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  letter-spacing: 0.5px;
}

.hero__scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  animation: fadeIn 1s ease 2s both;
}

.hero__scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, transparent, var(--accent));
  animation: scrollLine 2s ease infinite;
}

@keyframes scrollLine {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* -------- ABOUT -------- */
.about {
  background: var(--bg-2);
  position: relative;
}

.about::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.4;
}

.about__grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 80px;
  align-items: start;
}

.about__photo-col {
  position: sticky;
  top: 100px;
}

.about__photo-frame {
  position: relative;
  margin-bottom: 28px;
}

.about__photo {
  width: 100%;
  border-radius: var(--radius-lg);
  display: block;
  filter: grayscale(10%);
  transition: filter 0.3s;
}

.about__photo:hover { filter: none; }

.about__photo-decoration {
  position: absolute;
  inset: -8px;
  border: 1.5px solid var(--accent);
  border-radius: calc(var(--radius-lg) + 8px);
  opacity: 0.3;
  pointer-events: none;
}

.about__photo-frame::after {
  content: '';
  position: absolute;
  bottom: -16px;
  right: -16px;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(0,229,195,0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.about__quick-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.stat-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 12px;
  text-align: center;
}

.stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.about__lead {
  font-size: 1.15rem;
  color: var(--text);
  margin-bottom: 20px;
  line-height: 1.7;
}
.about__lead strong { color: var(--accent); }

.about__body {
  color: var(--text-muted);
  margin-bottom: 20px;
  font-size: 0.97rem;
}
.about__body strong { color: var(--text); }

.about__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0;
}

.tag {
  padding: 7px 14px;
  background: rgba(110, 140, 255, 0.1);
  border: 1px solid rgba(110, 140, 255, 0.25);
  border-radius: 8px;
  font-size: 0.82rem;
  color: var(--accent-3);
}

.about__links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.about__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.88rem;
  color: var(--text-muted);
  transition: var(--transition);
}
.about__link:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(0,229,195,0.05);
}
.about__link svg { width: 18px; height: 18px; }

/* -------- SKILLS -------- */
.skills { background: var(--bg); }

.skills__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.skill-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-3));
  opacity: 0;
  transition: opacity 0.3s;
}

.skill-card:hover {
  border-color: var(--border-2);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.skill-card:hover::before { opacity: 1; }

.skill-card__icon {
  font-size: 2rem;
  margin-bottom: 16px;
}

.skill-card__title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 24px;
}

.skill-card__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.skill-card__list li {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.skill-name {
  font-size: 0.85rem;
  color: var(--text);
  font-family: var(--font-mono);
}

.skill-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.skill-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-3));
  border-radius: 2px;
  width: 0%;
  transition: width 1.2s cubic-bezier(0.4,0,0.2,1);
}

.skills__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.stag {
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  transition: var(--transition);
}
.stag:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(0,229,195,0.06);
}

/* -------- EXPERIENCE -------- */
.experience { background: var(--bg-2); }

.timeline {
  position: relative;
  padding-left: 40px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent), var(--accent-3), transparent);
  opacity: 0.5;
}

.timeline__item {
  position: relative;
  margin-bottom: 60px;
}
.timeline__item:last-child { margin-bottom: 0; }

.timeline__dot {
  position: absolute;
  left: -37px;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(0,229,195,0.15), 0 0 16px rgba(0,229,195,0.4);
  z-index: 1;
}

.timeline__content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  transition: var(--transition);
}
.timeline__content:hover {
  border-color: var(--border-2);
  box-shadow: 0 16px 50px rgba(0,0,0,0.35);
}

.timeline__meta {
  display: flex;
  gap: 20px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.timeline__period {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  letter-spacing: 1px;
}

.timeline__location {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.timeline__role {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.timeline__company {
  font-size: 0.92rem;
  color: var(--accent-2);
  margin-bottom: 20px;
  font-weight: 500;
}

.timeline__bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.timeline__bullets li {
  position: relative;
  padding-left: 20px;
  color: var(--text-muted);
  font-size: 0.93rem;
}
.timeline__bullets li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.8rem;
  top: 2px;
}
.timeline__bullets li strong { color: var(--text); }

.timeline__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.timeline__tags span {
  padding: 5px 12px;
  background: rgba(0,229,195,0.06);
  border: 1px solid rgba(0,229,195,0.15);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
}

/* -------- PROJECTS -------- */
.projects { background: var(--bg); }

.projects__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 0;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.project-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% -20%, rgba(0,229,195,0.06) 0%, transparent 60%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s;
}
.project-card:hover {
  border-color: rgba(0,229,195,0.3);
  transform: translateY(-6px);
  box-shadow: 0 24px 70px rgba(0,0,0,0.5);
}
.project-card:hover::after { opacity: 1; }

.project-card--featured {
  border-color: rgba(0,229,195,0.3);
}

.project-card__badge {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--accent);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
}

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

.project-card__icon { font-size: 2.2rem; }

.project-card__date {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.project-card__title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 14px;
  line-height: 1.3;
}

.project-card__desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 20px;
}

.project-card__features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}
.project-card__features li {
  font-size: 0.86rem;
  color: var(--text-muted);
}

.project-card__stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
  margin-top: auto;
}
.project-card__stack span {
  padding: 5px 12px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-3);
}

.project-card__actions {
  display: flex;
  gap: 12px;
}

.project-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--transition);
  font-family: var(--font-display);
}

.project-btn--ghost {
  background: var(--bg-2);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.project-btn--ghost:hover {
  color: var(--text);
  border-color: var(--border-2);
}

.project-btn--primary {
  background: var(--accent);
  color: var(--bg);
  border: 1px solid transparent;
}
.project-btn--primary:hover {
  background: #00fff5;
  box-shadow: 0 6px 24px rgba(0,229,195,0.3);
}

/* -------- CERTIFICATIONS -------- */
.certifications { background: var(--bg-2); }

.edu__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.edu-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  gap: 18px;
  align-items: flex-start;
  transition: var(--transition);
}
.edu-card:hover {
  border-color: var(--accent-3);
  transform: translateY(-3px);
}

.edu-card__icon { font-size: 1.8rem; flex-shrink: 0; }

.edu-card__content h4 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
  line-height: 1.35;
}
.edu-card__content p {
  font-size: 0.82rem;
  color: var(--accent-2);
  margin-bottom: 4px;
}
.edu-card__content span {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.certs__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.cert-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
}
.cert-card:hover {
  border-color: var(--border-2);
  transform: translateX(4px);
}

.cert-card__logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  flex-shrink: 0;
  color: #fff;
}
.cert-card__logo--google  { background: linear-gradient(135deg, #4285F4, #34A853); }
.cert-card__logo--deloitte { background: linear-gradient(135deg, #86BC25, #007680); }
.cert-card__logo--harvard  { background: linear-gradient(135deg, #A41034, #c0392b); }
.cert-card__logo--tharaa   { background: linear-gradient(135deg, var(--accent), var(--accent-3)); }
.cert-card__logo--forage   { background: linear-gradient(135deg, #f0a500, #e67e22); }

.cert-card__content {
  flex: 1;
}
.cert-card__content h4 {
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 2px;
  line-height: 1.35;
}
.cert-card__content p {
  font-size: 0.78rem;
  color: var(--accent-2);
  margin-bottom: 2px;
}

.cert-card__date {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.cert-card__badge {
  padding: 4px 10px;
  background: rgba(0,229,195,0.1);
  border: 1px solid rgba(0,229,195,0.2);
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--accent);
  flex-shrink: 0;
}

/* -------- CONTACT -------- */
.contact {
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

.contact::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0,229,195,0.04) 0%, transparent 70%);
  pointer-events: none;
}

.contact__inner {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 80px;
  align-items: start;
}

.contact__text .section__title {
  margin-bottom: 20px;
}

.contact__text > p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 36px;
  line-height: 1.7;
}
.contact__text strong { color: var(--accent); }

.contact__info {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact__item {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text-muted);
  font-size: 0.93rem;
  transition: color 0.2s;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.contact__item:last-child { border-bottom: none; }
.contact__item:hover { color: var(--accent); }
.contact__item svg { flex-shrink: 0; color: var(--accent); }

.contact__card {
  background: var(--bg-card);
  border: 1px solid rgba(0,229,195,0.2);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  position: sticky;
  top: 90px;
}

.contact__card-header {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.contact__avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--accent);
  flex-shrink: 0;
}
.contact__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.contact__card-header strong {
  font-family: var(--font-display);
  font-size: 1rem;
  color: #fff;
  display: block;
}
.contact__card-header p {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  margin-top: 2px;
}

.contact__roles {
  margin-bottom: 28px;
}
.contact__roles p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.contact__roles ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.contact__roles li {
  font-size: 0.88rem;
  color: var(--text);
}

/* -------- FOOTER -------- */
.footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 32px 0;
}

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

.footer__copy {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer__links {
  display: flex;
  gap: 24px;
}
.footer__links a {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  transition: color 0.2s;
}
.footer__links a:hover { color: var(--accent); }

/* -------- RESPONSIVE -------- */
@media (max-width: 1024px) {
  .about__grid {
    grid-template-columns: 280px 1fr;
    gap: 48px;
  }
  .skills__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .contact__inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .contact__card {
    position: static;
  }
}

@media (max-width: 768px) {
  .nav__links { display: none; }
  .nav__burger { display: flex; }

  .section { padding: 72px 0; }

  .about__grid {
    grid-template-columns: 1fr;
  }
  .about__photo-col {
    position: static;
    max-width: 280px;
    margin: 0 auto;
  }

  .skills__grid { grid-template-columns: 1fr; }
  .projects__grid { grid-template-columns: 1fr; }
  .edu__grid { grid-template-columns: 1fr; }

  .timeline { padding-left: 28px; }
  .timeline__dot { left: -25px; }

  .hero__actions { flex-direction: column; }
  .hero__actions .btn { width: 100%; justify-content: center; }

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

  .timeline__content { padding: 24px 20px; }
}

@media (max-width: 480px) {
  .hero__name { font-size: clamp(2.3rem, 10.1vw, 3.2rem); }
  .section__title { font-size: clamp(1.6rem, 6vw, 2.2rem); }
  .about__quick-stats { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .stat-num { font-size: 1.4rem; }
  .contact__inner { gap: 36px; }
}


/* -------- CUSTOM PORTFOLIO UPDATES -------- */
.about__quick-stats .stat-label { line-height: 1.35; }
.about__tags .tag { padding: 8px 14px; }
.project-card__thumb-wrap {
  margin-bottom: 20px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-2);
}
.project-card__thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.project-card__actions--single .project-btn {
  flex: 0 0 auto;
  min-width: 160px;
}
.certs__grid {
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
}
.cert-card {
  align-items: flex-start;
}
.cert-card__logo {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  overflow: hidden;
}
.cert-card__logo img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}
.cert-card__platform {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 5px;
}
.cert-card__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 0.78rem;
  color: var(--accent-3);
  font-weight: 600;
}
.cert-card__link:hover { color: var(--accent); }
.contact__info .contact__item:last-child { border-bottom: none; }
@media (max-width: 900px) {
  .project-card__actions { flex-direction: column; }
  .project-card__actions--single .project-btn { width: 100%; }
}


/* -------- FINAL CONTENT / LOGO POLISH -------- */
.edu-card {
  gap: 20px;
  align-items: center;
}
.edu-card__logo {
  width: 92px;
  height: 92px;
  border-radius: 18px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(255,255,255,0.97);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 10px 28px rgba(0,0,0,0.22);
}
.edu-card__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.edu-card__content h4 {
  font-size: 1rem;
  line-height: 1.4;
}
.edu-card__content p {
  font-size: 0.88rem;
}
.cert-card {
  align-items: flex-start;
}
.cert-card__logo {
  width: 56px;
  height: 56px;
  padding: 8px;
  border-radius: 14px;
  background: rgba(255,255,255,0.98);
  box-shadow: inset 0 0 0 1px rgba(15,23,42,0.06);
}
.cert-card__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0;
  background: transparent;
}
.cert-card__content h4 {
  margin-bottom: 4px;
}
.cert-card__date {
  display: inline-block;
  margin-top: 2px;
}
.cert-card__link {
  margin-top: 10px;
  padding: 7px 12px;
  border: 1px solid rgba(0,229,195,0.18);
  border-radius: 999px;
  background: rgba(0,229,195,0.06);
}
.cert-card__link:hover {
  border-color: rgba(0,229,195,0.36);
  background: rgba(0,229,195,0.12);
}
.timeline__location::before {
  content: '📍 ';
}

@media (max-width: 700px) {
  .edu-card {
    align-items: flex-start;
  }

  .edu-card__logo {
    width: 74px;
    height: 74px;
    padding: 10px;
  }

  .cert-card__logo {
    width: 52px;
    height: 52px;
  }
}

@media (max-width: 768px) {
  .hero__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding: 100px 24px 72px;
  }

  .hero__name,
  .hero__title-wrapper,
  .hero__desc,
  .hero__actions,
  .hero__badges {
    width: 100%;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }

  .hero__name {
    max-width: 100%;
  }

  .hero__desc {
    max-width: 90%;
  }

  .hero__actions {
    align-items: center;
    justify-content: center;
  }

  .hero__actions .btn {
    width: 100%;
    max-width: 560px;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
  }

  .hero__badges {
    justify-content: center;
  }

  .hero__scroll-hint {
    left: 50%;
    transform: translateX(-50%);
  }
}

/* -------- THEME + LANGUAGE TOGGLES -------- */
.nav__controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 24px;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.nav-toggle:hover {
  border-color: rgba(0,229,195,0.35);
  color: var(--accent);
  background: rgba(0,229,195,0.08);
}

.nav-toggle__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
}

.nav-toggle__icon--lang {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.nav__mobile-controls {
  display: none;
  gap: 12px;
  padding-top: 8px;
}

.nav-toggle--mobile {
  flex: 1;
}

body[data-theme='light'] {
  --bg: #f4f8fc;
  --bg-2: #edf3f9;
  --bg-card: #ffffff;
  --bg-card-2: #e8eff8;
  --accent: #0f9f98;
  --accent-2: #b7791f;
  --accent-3: #3158d4;
  --text: #152236;
  --text-muted: #52657f;
  --border: #d5e0ee;
  --border-2: #bfd0e4;
}

body[data-theme='light'] {
  background: var(--bg);
  color: var(--text);
}

body[data-theme='light'] .nav.scrolled {
  background: rgba(244, 248, 252, 0.9);
  border-bottom-color: rgba(191,208,228,0.9);
}

body[data-theme='light'] .section__title,
body[data-theme='light'] .nav__logo,
body[data-theme='light'] .hero__name,
body[data-theme='light'] .skill-card__title,
body[data-theme='light'] .timeline__role,
body[data-theme='light'] .project-card__title,
body[data-theme='light'] .edu-card__content h4,
body[data-theme='light'] .cert-card__content h4,
body[data-theme='light'] .contact__card-header strong {
  color: #0f172a;
}

body[data-theme='light'] .timeline__content,
body[data-theme='light'] .skill-card,
body[data-theme='light'] .project-card,
body[data-theme='light'] .cert-card,
body[data-theme='light'] .edu-card,
body[data-theme='light'] .contact__card,
body[data-theme='light'] .stat-item,
body[data-theme='light'] .about__link,
body[data-theme='light'] .stag,
body[data-theme='light'] .badge,
body[data-theme='light'] .project-card__thumb-wrap,
body[data-theme='light'] .btn--ghost,
body[data-theme='light'] .nav-toggle {
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

body[data-theme='light'] .hero__canvas {
  opacity: 0.4;
}

html[lang='ar'] {
  --font-display: 'Cairo', sans-serif;
  --font-body: 'Cairo', sans-serif;
  --font-mono: 'Cairo', sans-serif;
}

html[dir='rtl'] body {
  text-align: right;
}

html[dir='rtl'] .nav__inner,
html[dir='rtl'] .footer__inner,
html[dir='rtl'] .about__grid,
html[dir='rtl'] .contact__inner,
html[dir='rtl'] .project-card__actions,
html[dir='rtl'] .hero__actions,
html[dir='rtl'] .about__links,
html[dir='rtl'] .about__tags,
html[dir='rtl'] .skills__tags,
html[dir='rtl'] .timeline__meta,
html[dir='rtl'] .timeline__tags,
html[dir='rtl'] .project-card__stack,
html[dir='rtl'] .hero__badges,
html[dir='rtl'] .nav__controls,
html[dir='rtl'] .nav__mobile-controls {
  direction: rtl;
}

html[dir='rtl'] .hero__content,
html[dir='rtl'] .about__text-col,
html[dir='rtl'] .contact__text,
html[dir='rtl'] .contact__card {
  text-align: right;
}

html[dir='rtl'] .timeline {
  padding-left: 0;
  padding-right: 40px;
}

html[dir='rtl'] .timeline::before {
  left: auto;
  right: 8px;
}

html[dir='rtl'] .timeline__dot {
  left: auto;
  right: -37px;
}

html[dir='rtl'] .timeline__bullets li {
  padding-left: 0;
  padding-right: 20px;
}

html[dir='rtl'] .timeline__bullets li::before {
  left: auto;
  right: 0;
  content: '◂';
}

html[dir='rtl'] .timeline__location::before {
  content: '📍 ';
}

html[dir='rtl'] .contact__item {
  text-align: right;
}

html[dir='rtl'] .hero__eyebrow,
html[dir='rtl'] .hero__badges,
html[dir='rtl'] .hero__actions,
html[dir='rtl'] .about__links,
html[dir='rtl'] .about__tags,
html[dir='rtl'] .project-card__stack,
html[dir='rtl'] .project-card__actions,
html[dir='rtl'] .timeline__tags,
html[dir='rtl'] .skills__tags {
  justify-content: flex-start;
}

html[dir='rtl'] .about__quick-stats,
html[dir='rtl'] .skills__grid,
html[dir='rtl'] .projects__grid,
html[dir='rtl'] .edu__grid,
html[dir='rtl'] .certs__grid {
  direction: rtl;
}

@media (max-width: 768px) {
  .nav__controls {
    margin-left: auto;
    margin-right: 12px;
    gap: 8px;
  }

  .nav-toggle {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
  }

  .nav-toggle__text {
    display: none;
  }

  .nav__mobile-controls {
    display: flex;
  }

  .nav__mobile {
    text-align: start;
  }

  html[dir='rtl'] .nav__mobile,
  html[dir='rtl'] .hero__content,
  html[dir='rtl'] .hero__eyebrow,
  html[dir='rtl'] .hero__name,
  html[dir='rtl'] .hero__title-wrapper,
  html[dir='rtl'] .hero__desc,
  html[dir='rtl'] .hero__actions,
  html[dir='rtl'] .hero__badges {
    text-align: center;
    justify-content: center;
  }

  html[dir='rtl'] .timeline {
    padding-right: 28px;
  }

  html[dir='rtl'] .timeline__dot {
    right: -25px;
  }
}


/* -------- FINAL QA POLISH: THEME + RTL -------- */
body[data-theme='light'] .hero,
body[data-theme='light'] .skills,
body[data-theme='light'] .projects,
body[data-theme='light'] .contact {
  background: linear-gradient(180deg, #f7fbff 0%, #f3f8fd 100%);
}

body[data-theme='light'] .about,
body[data-theme='light'] .experience,
body[data-theme='light'] .certifications,
body[data-theme='light'] .footer {
  background: linear-gradient(180deg, #eef4fa 0%, #eaf1f8 100%);
}

body[data-theme='light'] .hero__canvas {
  opacity: 0.18;
}

body[data-theme='light'] .section__subtitle,
body[data-theme='light'] .hero__desc,
body[data-theme='light'] .about__body,
body[data-theme='light'] .timeline__bullets li,
body[data-theme='light'] .project-card__desc,
body[data-theme='light'] .project-card__features li,
body[data-theme='light'] .contact__text > p,
body[data-theme='light'] .contact__item,
body[data-theme='light'] .footer__copy,
body[data-theme='light'] .footer__links a {
  color: #52657f;
}

body[data-theme='light'] .timeline__content,
body[data-theme='light'] .skill-card,
body[data-theme='light'] .project-card,
body[data-theme='light'] .cert-card,
body[data-theme='light'] .edu-card,
body[data-theme='light'] .contact__card,
body[data-theme='light'] .stat-item,
body[data-theme='light'] .about__link,
body[data-theme='light'] .stag,
body[data-theme='light'] .badge,
body[data-theme='light'] .project-card__thumb-wrap,
body[data-theme='light'] .btn--ghost,
body[data-theme='light'] .nav-toggle {
  background: rgba(255,255,255,0.86);
  border-color: #d6e1ed;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

body[data-theme='light'] .badge,
body[data-theme='light'] .stag,
body[data-theme='light'] .timeline__tags span,
body[data-theme='light'] .project-card__stack span,
body[data-theme='light'] .cert-card__badge,
body[data-theme='light'] .cert-card__link {
  background: rgba(15, 159, 152, 0.08);
  border-color: rgba(15, 159, 152, 0.18);
}

body[data-theme='light'] .btn--ghost:hover,
body[data-theme='light'] .about__link:hover,
body[data-theme='light'] .stag:hover,
body[data-theme='light'] .nav-toggle:hover {
  background: rgba(15, 159, 152, 0.1);
}

body[data-theme='light'] .nav__mobile {
  background: rgba(244,248,252,0.98);
  border-top-color: #d9e4ef;
}

body[data-theme='light'] .nav__mobile a {
  border-bottom-color: #d9e4ef;
}

body[data-theme='light'] .hero__eyebrow,
body[data-theme='light'] .section__label,
body[data-theme='light'] .cert-card__platform,
body[data-theme='light'] .timeline__period {
  color: #0f9f98;
}

html[dir='rtl'] .project-card,
html[dir='rtl'] .timeline__content,
html[dir='rtl'] .cert-card,
html[dir='rtl'] .edu-card,
html[dir='rtl'] .contact__item,
html[dir='rtl'] .contact__roles {
  text-align: right;
}

html[dir='rtl'] .project-card__header,
html[dir='rtl'] .cert-card,
html[dir='rtl'] .edu-card,
html[dir='rtl'] .contact__card-header {
  direction: rtl;
}

html[dir='rtl'] .contact__card-header {
  justify-content: flex-start;
}

html[dir='rtl'] .contact__item svg,
html[dir='rtl'] .contact__card-header .contact__avatar,
html[dir='rtl'] .cert-card__logo,
html[dir='rtl'] .edu-card__logo {
  flex-shrink: 0;
}

html[dir='rtl'] .project-card__actions,
html[dir='rtl'] .hero__actions,
html[dir='rtl'] .about__links,
html[dir='rtl'] .about__tags,
html[dir='rtl'] .project-card__stack,
html[dir='rtl'] .timeline__tags,
html[dir='rtl'] .skills__tags,
html[dir='rtl'] .hero__badges {
  row-gap: 10px;
}

@media (max-width: 768px) {
  body[data-theme='light'] .hero,
  body[data-theme='light'] .skills,
  body[data-theme='light'] .projects,
  body[data-theme='light'] .contact,
  body[data-theme='light'] .about,
  body[data-theme='light'] .experience,
  body[data-theme='light'] .certifications,
  body[data-theme='light'] .footer {
    background: #f7fbff;
  }

  html[dir='rtl'] .project-card,
  html[dir='rtl'] .timeline__content,
  html[dir='rtl'] .cert-card,
  html[dir='rtl'] .edu-card,
  html[dir='rtl'] .contact__item,
  html[dir='rtl'] .contact__roles,
  html[dir='rtl'] .nav__mobile {
    text-align: right;
  }

  html[dir='rtl'] .hero__content,
  html[dir='rtl'] .hero__eyebrow,
  html[dir='rtl'] .hero__name,
  html[dir='rtl'] .hero__title-wrapper,
  html[dir='rtl'] .hero__desc,
  html[dir='rtl'] .hero__actions,
  html[dir='rtl'] .hero__badges {
    text-align: center;
  }
}
