*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #0f4c75;
  --primary-light: #1b6ca8;
  --accent: #00b4d8;
  --accent2: #0077b6;
  --gold: #f4a261;
  --bg: #f0f4f8;
  --card-bg: #ffffff;
  --text: #1a2535;
  --text-muted: #5a6a7e;
  --border: #dde3ed;
  --shadow: 0 4px 24px rgba(15,76,117,0.10);
  --radius: 14px;
}

body {
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* ---- Language Toggle ---- */
.lang-toggle {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  gap: 0;
  background: var(--primary);
  border-radius: 50px;
  padding: 4px;
  box-shadow: 0 4px 20px rgba(15,76,117,0.35);
}

.lang-btn {
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.7);
  font-family: 'Cairo', 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 8px 24px;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.25s;
}

.lang-btn.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 10px rgba(0,180,216,0.4);
}

/* ---- Profile Wrapper ---- */
.profile-wrapper {
  font-family: 'Cairo', sans-serif;
}

.en-profile {
  font-family: 'Inter', sans-serif;
}

/* ---- Hero ---- */
.hero {
  position: relative;
  background: linear-gradient(135deg, #0f4c75 0%, #0077b6 50%, #00b4d8 100%);
  padding: 100px 20px 60px;
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-overlay { display: none; }

.hero-content { position: relative; z-index: 1; }

.avatar {
  width: 110px;
  height: 110px;
  background: rgba(255,255,255,0.15);
  border: 3px solid rgba(255,255,255,0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  backdrop-filter: blur(6px);
}

.avatar i { font-size: 3rem; color: #fff; }

.name {
  font-size: 2.2rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 8px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.title {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.88);
  font-weight: 400;
  margin-bottom: 12px;
}

.exp-badge {
  display: inline-block;
  background: var(--gold);
  color: #fff;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 5px 18px;
  border-radius: 50px;
  margin-bottom: 24px;
}

.exp-badge i { margin-left: 5px; margin-right: 5px; }

.contact-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.contact-bar a,
.contact-bar span {
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.12);
  padding: 6px 14px;
  border-radius: 50px;
  transition: background 0.2s;
}

.contact-bar a:hover { background: rgba(255,255,255,0.25); }

/* ---- Container ---- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 36px 20px 60px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* ---- Card ---- */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 30px 32px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.section-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 10px;
}

.section-title i { color: var(--accent); font-size: 1rem; }

/* ---- Summary ---- */
.summary-text {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--text-muted);
}

/* ---- Achievements ---- */
.achievements { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%); }
.achievements .section-title { color: #fff; border-color: rgba(255,255,255,0.4); }
.achievements .section-title i { color: var(--gold); }

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

.ach-item {
  text-align: center;
  background: rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 20px 10px;
}

.ach-number {
  display: block;
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 6px;
}

.ach-label {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.85);
  font-weight: 500;
}

/* ---- Skills ---- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.skill-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: #f7fafd;
  border-radius: 10px;
  padding: 16px;
  border: 1px solid var(--border);
  transition: box-shadow 0.2s, transform 0.2s;
}

.skill-item:hover {
  box-shadow: 0 4px 16px rgba(0,119,182,0.12);
  transform: translateY(-2px);
}

.skill-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.skill-icon i { color: #fff; font-size: 1rem; }

.skill-body h3 {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 5px;
}

.skill-body p { font-size: 0.82rem; color: var(--text-muted); line-height: 1.6; }

/* ---- Timeline ---- */
.timeline { position: relative; padding-right: 20px; }

[dir="ltr"] .timeline { padding-right: 0; padding-left: 20px; }

.timeline::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  right: 6px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--primary));
  border-radius: 2px;
}

[dir="ltr"] .timeline::before { right: auto; left: 6px; }

.timeline-item {
  position: relative;
  padding-right: 30px;
  margin-bottom: 30px;
}

[dir="ltr"] .timeline-item { padding-right: 0; padding-left: 30px; }

.timeline-item:last-child { margin-bottom: 0; }

.timeline-dot {
  position: absolute;
  top: 6px;
  right: -2px;
  width: 16px;
  height: 16px;
  background: var(--accent);
  border: 3px solid var(--card-bg);
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--accent);
}

[dir="ltr"] .timeline-dot { right: auto; left: -2px; }

.timeline-content {
  background: #f7fafd;
  border-radius: 10px;
  padding: 18px 20px;
  border: 1px solid var(--border);
}

.job-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.job-header h3 {
  font-size: 0.97rem;
  font-weight: 700;
  color: var(--primary);
  flex: 1;
}

.date {
  font-size: 0.78rem;
  color: var(--accent2);
  font-weight: 600;
  background: rgba(0,119,182,0.08);
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.company {
  font-size: 0.83rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.job-duties {
  padding-right: 18px;
  list-style: none;
}

[dir="ltr"] .job-duties { padding-right: 0; padding-left: 18px; }

.job-duties li {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 5px;
  position: relative;
}

.job-duties li::before {
  content: '▸';
  color: var(--accent);
  position: absolute;
  right: -18px;
  top: 0;
}

[dir="ltr"] .job-duties li::before { right: auto; left: -18px; }

/* ---- Two Column ---- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

/* ---- Education ---- */
.edu-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.edu-icon {
  width: 46px;
  height: 46px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.edu-icon i { color: #fff; font-size: 1.2rem; }

.edu-item h3 { font-size: 0.97rem; font-weight: 700; color: var(--primary); margin-bottom: 4px; }
.edu-item p { font-size: 0.85rem; color: var(--text-muted); }
.edu-note { font-size: 0.78rem; color: var(--accent2); font-weight: 500; }

/* ---- Certifications ---- */
.cert-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }

.cert-list li {
  font-size: 0.88rem;
  color: var(--text-muted);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.5;
}

.cert-list li i.fa-check-circle { color: #27ae60; flex-shrink: 0; margin-top: 3px; }
.cert-list li i.fa-clock { color: var(--gold); flex-shrink: 0; margin-top: 3px; }

/* ---- Languages ---- */
.lang-list { display: flex; flex-direction: column; gap: 16px; }

.lang-item { display: flex; align-items: center; gap: 12px; }

.lang-name {
  width: 90px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  flex-shrink: 0;
  text-align: right;
}

[dir="ltr"] .lang-name { text-align: left; }

.lang-bar {
  flex: 1;
  height: 8px;
  background: var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.lang-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 10px;
  animation: fillBar 1.2s ease-out forwards;
}

@keyframes fillBar {
  from { width: 0 !important; }
}

.lang-level {
  font-size: 0.78rem;
  color: var(--text-muted);
  width: 70px;
  flex-shrink: 0;
}

/* ---- Footer ---- */
.footer {
  background: var(--primary);
  color: rgba(255,255,255,0.75);
  text-align: center;
  padding: 28px 20px;
  font-size: 0.88rem;
  line-height: 1.8;
}

.footer a { color: var(--accent); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .ach-grid { grid-template-columns: repeat(2, 1fr); }
  .skills-grid { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .name { font-size: 1.6rem; }
  .card { padding: 20px; }
  .job-header { flex-direction: column; }
}

@media (max-width: 480px) {
  .ach-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-bar { flex-direction: column; align-items: center; }
  .lang-toggle { width: 90%; }
}
