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

:root {
  --bg-page: #f1f5f9;
  --sheet-bg: #ffffff;
  --sidebar-bg: #f8fafc;
  --navy: #0f172a;
  --teal: #0d9488;
  --teal-dark: #0f766e;
  --teal-soft: #f0fdfa;
  --teal-border: #ccfbf1;
  --text-main: #1e293b;
  --text-muted: #475569;
  --border-light: #e2e8f0;
}

body {
  font-family: 'Cairo', sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.7;
  padding: 28px 16px;
}

.page-wrapper {
  max-width: 980px;
  margin: 0 auto;
}

.cv-sheet {
  background: var(--sheet-bg);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
  border: 1px solid var(--border-light);
}

/* Header */
.cv-header {
  background: linear-gradient(135deg, #0f172a 0%, #134e4a 100%);
  color: #ffffff;
  position: relative;
}

.header-accent-bar {
  height: 6px;
  background: linear-gradient(90deg, #2dd4bf, #0d9488, #38bdf8);
}

.header-content {
  padding: 36px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

.identity-block h1 {
  font-size: 2.25rem;
  font-weight: 900;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.role-ar {
  font-size: 1.15rem;
  font-weight: 700;
  color: #5eead4;
}

.role-en {
  font-size: 0.92rem;
  color: #cbd5e1;
  font-weight: 600;
  text-align: right;
  margin-top: 2px;
}

.contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-list a,
.contact-static {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #f8fafc;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.08);
  padding: 7px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: background 0.2s;
}

.contact-list a:hover {
  background: rgba(45, 212, 191, 0.2);
}

.icon {
  width: 17px;
  height: 17px;
  color: #5eead4;
  flex-shrink: 0;
}

/* Two Column Layout */
.cv-body {
  display: grid;
  grid-template-columns: 310px 1fr;
}

/* Sidebar */
.cv-sidebar {
  background: var(--sidebar-bg);
  border-left: 1px solid var(--border-light);
  padding: 32px 26px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--navy);
  padding-bottom: 8px;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--teal);
}

.en-sub {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.skill-group {
  margin-bottom: 16px;
}

.skill-group:last-child {
  margin-bottom: 0;
}

.skill-group h3 {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.tag-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-list li {
  background: var(--teal-soft);
  color: var(--teal-dark);
  border: 1px solid var(--teal-border);
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 700;
  direction: ltr;
}

.soft-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.soft-list li {
  position: relative;
  padding-right: 16px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-main);
}

.soft-list li::before {
  content: "";
  position: absolute;
  right: 0;
  top: 10px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
}

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

.lang-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.lang-row span {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.progress-track {
  height: 7px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal), #2dd4bf);
  border-radius: 999px;
}

/* Courses */
.course-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.course-list li {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-right: 3px solid var(--teal);
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
}

/* Main Column */
.cv-main {
  padding: 32px 36px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.profile-text {
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.85;
}

.edu-card {
  background: var(--sidebar-bg);
  border: 1px solid var(--border-light);
  border-right: 4px solid var(--teal);
  border-radius: 14px;
  padding: 18px 20px;
}

.edu-card h3 {
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--navy);
}

.uni-name {
  color: var(--teal-dark);
  font-weight: 700;
  font-size: 0.95rem;
  margin: 2px 0 8px;
}

.courses-note {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Projects */
.projects-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.project-item {
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 20px;
  background: #ffffff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.project-item:hover {
  border-color: var(--teal);
  box-shadow: 0 8px 24px rgba(13, 148, 136, 0.08);
}

.project-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.project-head h3 {
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--navy);
}

.project-en {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
  text-align: right;
}

.tech-badge {
  background: var(--teal-soft);
  color: var(--teal-dark);
  border: 1px solid var(--teal-border);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.project-points {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.project-points strong {
  color: var(--navy);
}

@media (max-width: 820px) {
  .header-content {
    padding: 28px 22px;
  }
  .cv-body {
    grid-template-columns: 1fr;
  }
  .cv-sidebar {
    border-left: none;
    border-bottom: 1px solid var(--border-light);
  }
  .cv-main {
    padding: 26px 22px;
  }
}

@media print {
  body {
    background: #ffffff;
    padding: 0;
  }
  .cv-sheet {
    box-shadow: none;
    border: none;
  }
}