/* ===== GLOBAL STYLES ===== */
:root {
  --primary-color: #1A3A5C;
  --accent-color: #C9A84C;
  --bg-light: #F5F7FA;
  --text-dark: #1A1A1A;
  --text-light: #666666;
  --border-color: #E0E0E0;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
  --shadow-xl: 0 12px 32px rgba(0, 0, 0, 0.2);
}

html {
  scroll-behavior: smooth;
}

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

body {
  font-family: 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  direction: rtl;
  text-align: right;
  background-color: #FFFFFF;
  color: var(--text-dark);
  line-height: 1.8;
  overflow-x: hidden;
}

body.dark-mode {
  background-color: #0F1419;
  color: #F5F7FA;
}

body.dark-mode .navbar {
  background-color: #0F1419;
  border-color: #1A1A1A;
}

body.dark-mode .footer {
  background-color: #0F1419;
  border-color: #1A1A1A;
}

body.dark-mode .hero {
  background: linear-gradient(135deg, #0F1419 0%, #1A2A3A 100%);
}

body.dark-mode .card,
body.dark-mode .service-card,
body.dark-mode .publication-card {
  background-color: #1A1A1A;
  color: #F5F7FA;
}

body.dark-mode .form-input,
body.dark-mode textarea {
  background-color: #1A1A1A;
  color: #F5F7FA;
  border-color: #333333;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  letter-spacing: -0.5px;
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6 {
  color: #F5F7FA;
}

p {
  margin-bottom: 1rem;
  color: var(--text-light);
  line-height: 1.8;
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  color: #B8932E;
}

/* ===== NAVBAR ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: #FFFFFF;
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary-color);
}

.navbar-logo img {
  height: 50px;
  width: auto;
  object-fit: contain;
}

.navbar-nav {
  display: flex;
  gap: 2.5rem;
  list-style: none;
  align-items: center;
}

.navbar-nav a {
  color: var(--text-dark);
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  position: relative;
  padding-bottom: 0.5rem;
}

.navbar-nav a:hover,
.navbar-nav a.active {
  color: var(--accent-color);
}

.navbar-nav a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 100%;
  height: 2px;
  background-color: var(--accent-color);
}

.theme-toggle {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--primary-color);
  transition: transform 0.3s ease;
  padding: 0.5rem;
}

.theme-toggle:hover {
  transform: rotate(20deg);
}

/* ===== LANGUAGE SWITCHER ===== */
.language-switcher {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 1rem;
  padding-left: 1rem;
  border-left: 2px solid var(--border-color);
}

.lang-link {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: white !important;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-block;
}

.lang-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(201, 168, 76, 0.3);
  color: white !important;
}

.lang-link::after {
  display: none !important;
}

/* ===== HERO SECTION ===== */
.hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, #0F2A47 100%);
  color: #FFFFFF;
  padding: 8rem 2rem;
  text-align: center;
  min-height: 600px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 400px;
  height: 400px;
  background: rgba(201, 168, 76, 0.05);
  border-radius: 50%;
  transform: translate(100px, -100px);
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  color: #FFFFFF;
  font-weight: 900;
  letter-spacing: -1px;
  position: relative;
  z-index: 1;
}

.hero p {
  font-size: 1.3rem;
  margin-bottom: 2.5rem;
  color: #E0E0E0;
  position: relative;
  z-index: 1;
  font-weight: 400;
}

.cta-button {
  background-color: var(--accent-color);
  color: var(--primary-color);
  padding: 1.1rem 2.8rem;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-block;
  text-decoration: none;
  font-family: 'Cairo', sans-serif;
  position: relative;
  z-index: 1;
  box-shadow: 0 4px 12px rgba(201, 168, 76, 0.3);
}

.cta-button:hover {
  background-color: #B8932E;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(201, 168, 76, 0.4);
}

/* ===== STATS BAR ===== */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  padding: 3.5rem 2rem;
  background-color: var(--bg-light);
  text-align: center;
}

body.dark-mode .stats-bar {
  background-color: #0F1419;
}

.stat-item h3 {
  font-size: 2.8rem;
  color: var(--accent-color);
  margin-bottom: 0.5rem;
  font-weight: 900;
}

.stat-item p {
  color: var(--text-light);
  font-size: 1rem;
  font-weight: 500;
}

/* ===== SECTION STYLES ===== */
section {
  padding: 4.5rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.section-title {
  text-align: center;
  font-size: 2.8rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
  font-weight: 900;
  letter-spacing: -0.5px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-light);
  font-size: 1.1rem;
  margin-bottom: 3rem;
  font-weight: 400;
}

/* ===== CARDS ===== */
.card {
  background-color: #FFFFFF;
  border-radius: 6px;
  padding: 2.5rem;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  border: 1px solid #F0F0F0;
}

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

.card h3 {
  margin-bottom: 1rem;
}

/* ===== SERVICE CARDS ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.service-card {
  background-color: #FFFFFF;
  border-top: 4px solid var(--accent-color);
  border-radius: 6px;
  padding: 2.5rem;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  border: 1px solid #F0F0F0;
}

.service-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-6px);
}

.service-card h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.4rem;
  font-weight: 700;
}

.service-card p {
  color: var(--text-light);
  margin-bottom: 1.5rem;
  line-height: 1.8;
  font-size: 0.95rem;
}

.service-card ul {
  list-style: none;
  padding-right: 1rem;
}

.service-card li {
  color: var(--text-light);
  margin-bottom: 0.75rem;
  position: relative;
  padding-right: 1.5rem;
  font-size: 0.95rem;
}

.service-card li::before {
  content: '✓';
  position: absolute;
  right: 0;
  color: var(--accent-color);
  font-weight: bold;
  font-size: 1.1rem;
}

/* ===== PUBLICATION CARDS ===== */
.publications-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
}

.publication-card {
  background-color: #FFFFFF;
  border-radius: 6px;
  padding: 2.5rem;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  border: 1px solid #F0F0F0;
}

.publication-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-6px);
}

.publication-card .badge {
  display: inline-block;
  background-color: var(--primary-color);
  color: #FFFFFF;
  padding: 0.4rem 1rem;
  border-radius: 3px;
  font-size: 0.8rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.publication-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
  font-weight: 700;
}

.publication-card .year {
  color: var(--accent-color);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.publication-card p {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.read-more {
  color: var(--accent-color);
  font-weight: 600;
  transition: all 0.3s ease;
  font-size: 0.95rem;
}

.read-more:hover {
  color: #B8932E;
  transform: translateX(-4px);
}

/* ===== TIMELINE ===== */
.timeline {
  position: relative;
  padding: 2rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  right: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: var(--accent-color);
}

.timeline-item {
  margin-bottom: 2.5rem;
  position: relative;
}

.timeline-item:nth-child(odd) {
  padding-right: 52%;
}

.timeline-item:nth-child(even) {
  padding-left: 52%;
}

.timeline-item::before {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  background-color: var(--accent-color);
  border: 3px solid #FFFFFF;
  border-radius: 50%;
  top: 0;
  right: 50%;
  transform: translateX(6px);
  box-shadow: 0 0 0 3px var(--accent-color);
}

.timeline-content {
  background-color: var(--bg-light);
  padding: 2rem;
  border-radius: 6px;
  border-left: 3px solid var(--accent-color);
}

body.dark-mode .timeline-content {
  background-color: #1A1A1A;
  border-left-color: var(--accent-color);
}

.timeline-content h4 {
  color: var(--primary-color);
  margin-bottom: 0.75rem;
  font-weight: 700;
}

.timeline-content p {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* ===== SKILLS SECTION ===== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
}

.skill-card {
  background-color: #FFFFFF;
  padding: 2.5rem;
  border-radius: 6px;
  box-shadow: var(--shadow);
  border: 1px solid #F0F0F0;
}

body.dark-mode .skill-card {
  background-color: #1A1A1A;
}

.skill-card h3 {
  margin-bottom: 2rem;
  color: var(--primary-color);
  font-weight: 700;
}

.skill-item {
  margin-bottom: 2rem;
}

.skill-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}

.skill-label span:first-child {
  color: var(--text-dark);
  font-weight: 600;
}

body.dark-mode .skill-label span:first-child {
  color: #F5F7FA;
}

.skill-label span:last-child {
  color: var(--accent-color);
  font-weight: 700;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background-color: #E8E8E8;
  border-radius: 3px;
  overflow: hidden;
}

body.dark-mode .progress-bar {
  background-color: #333333;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  border-radius: 3px;
  width: 0%;
  animation: fillProgress 1s ease-out forwards;
  animation-delay: 0.3s;
}

@keyframes fillProgress {
  to {
    width: var(--progress-width);
  }
}

/* ===== CERTIFICATIONS ===== */
.certifications-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2.5rem;
}

.cert-card {
  background: linear-gradient(135deg, var(--primary-color) 0%, #0F2A47 100%);
  color: #FFFFFF;
  padding: 2.5rem;
  border-radius: 6px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  transition: all 0.3s ease;
}

.cert-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
}

.cert-card h3 {
  color: var(--accent-color);
  margin-bottom: 1rem;
  font-size: 2.5rem;
}

.cert-card h4 {
  color: #FFFFFF;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

/* ===== FORM STYLES ===== */
.contact-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.form-group {
  margin-bottom: 2rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.75rem;
  font-weight: 600;
  color: var(--text-dark);
  font-size: 0.95rem;
}

body.dark-mode .form-group label {
  color: #F5F7FA;
}

.form-input,
textarea {
  width: 100%;
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-family: 'Cairo', sans-serif;
  font-size: 1rem;
  transition: all 0.3s ease;
  background-color: #FFFFFF;
  color: var(--text-dark);
}

.form-input:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.1);
  background-color: #FFFFFF;
}

textarea {
  resize: vertical;
  min-height: 140px;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.info-card {
  background-color: var(--bg-light);
  padding: 2rem;
  border-radius: 6px;
  border-right: 4px solid var(--accent-color);
}

body.dark-mode .info-card {
  background-color: #1A1A1A;
}

.info-card h4 {
  color: var(--primary-color);
  margin-bottom: 0.75rem;
  font-weight: 700;
}

.info-card p {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* ===== FOOTER ===== */
.footer {
  background-color: #FFFFFF;
  border-top: 1px solid var(--border-color);
  padding: 3.5rem 2rem;
  text-align: center;
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-section h4 {
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  font-weight: 700;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.75rem;
}

.footer-section a {
  color: var(--text-light);
  transition: color 0.3s ease;
  font-size: 0.95rem;
}

.footer-section a:hover {
  color: var(--accent-color);
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background-color: var(--bg-light);
  border-radius: 4px;
  transition: all 0.3s ease;
  font-size: 1.2rem;
}

body.dark-mode .social-links a {
  background-color: #1A1A1A;
}

.social-links a:hover {
  background-color: var(--accent-color);
  color: var(--primary-color);
  transform: translateY(-2px);
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 2rem;
  color: var(--text-light);
  font-size: 0.9rem;
}

/* ===== ACCORDION ===== */
.accordion {
  border: 1px solid var(--border-color);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 1rem;
}

body.dark-mode .accordion {
  border-color: #333333;
}

.accordion-header {
  background-color: var(--bg-light);
  padding: 1.5rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  transition: all 0.3s ease;
  user-select: none;
}

body.dark-mode .accordion-header {
  background-color: #1A1A1A;
}

.accordion-header:hover {
  background-color: #EEEEEE;
}

body.dark-mode .accordion-header:hover {
  background-color: #2A2A2A;
}

.accordion-icon {
  color: var(--accent-color);
  transition: transform 0.3s ease;
  font-size: 1.2rem;
}

.accordion-header.active .accordion-icon {
  transform: rotate(180deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background-color: #FFFFFF;
  padding: 0 1.5rem;
}

body.dark-mode .accordion-content {
  background-color: #0F1419;
}

.accordion-header.active ~ .accordion-content {
  max-height: 500px;
  padding: 1.5rem;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeInUp 0.6s ease-out forwards;
  opacity: 0;
}

.fade-in.visible {
  opacity: 1;
  animation: fadeInUp 0.6s ease-out;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }

  .navbar-nav {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .hero {
    padding: 4rem 1rem;
    min-height: 400px;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .services-grid,
  .publications-grid,
  .skills-grid,
  .certifications-grid {
    grid-template-columns: 1fr;
  }

  .contact-section {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .timeline::before {
    right: 0;
  }

  .timeline-item:nth-child(odd),
  .timeline-item:nth-child(even) {
    padding-right: 0;
    padding-left: 2rem;
  }

  .timeline-item::before {
    right: auto;
    left: -7px;
    transform: translateX(0);
  }

  .footer-content {
    grid-template-columns: 1fr;
  }

  section {
    padding: 2.5rem 1rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .navbar-logo img {
    height: 40px;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 14px;
  }

  .navbar {
    padding: 0.75rem;
  }

  .navbar-nav {
    gap: 0.5rem;
  }

  .navbar-logo img {
    height: 35px;
  }

  .hero h1 {
    font-size: 1.5rem;
  }

  .hero p {
    font-size: 0.9rem;
  }

  .cta-button {
    padding: 0.9rem 1.5rem;
    font-size: 0.9rem;
  }

  .stat-item h3 {
    font-size: 2rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .stats-bar {
    gap: 1rem;
  }

  .service-card,
  .card {
    padding: 1.5rem;
  }
}
