:root {
  --main-color: rgb(13, 27, 42);
  --secondary-color: rgb(27, 38, 59);
  --accent-color: rgb(65, 90, 119);
  --light-color: rgb(119, 141, 169);
  --highlight-color: rgb(241, 196, 15);
}

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

.dynamic-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: linear-gradient(135deg, var(--main-color), var(--secondary-color), var(--accent-color), var(--light-color));
  background-size: 400% 400%;
  animation: gradientAnimation 20s ease infinite;
}

@keyframes gradientAnimation {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.back-to-home {
  position: fixed;
  top: 15px;
  left: 15px;
  background: rgba(0, 0, 0, 0.5);
  padding: 10px;
  border-radius: 50%;
  transition: transform 0.3s ease, background-color 0.3s ease;
  z-index: 100;
}

.back-to-home img {
  width: 30px;
  height: 30px;
  opacity: 0.8;
}

.back-to-home:hover {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 0.2);
}

section {
  padding: 60px 20px;
  text-align: center;
  color: rgb(255, 255, 255);
}

.intro-section {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
  background: rgba(0, 0, 0, 0.3);
}

.intro-content {
  max-width: 800px;
  padding: 20px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 10px;
}

.intro-tagline {
  font-size: 2rem;
  margin-bottom: 10px;
  animation: fadeIn 2s ease forwards;
}

.intro-description {
  font-size: 1.2rem;
  line-height: 1.5;
}

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

.projects-section {
  background: rgba(0, 0, 0, 0.2);
}

.projects-section h2 {
  font-size: 2rem;
  margin-bottom: 30px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.project-card {
  background: rgba(0, 0, 0, 0.4);
  border: 2px solid rgb(140, 58, 43);
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.project-card:hover {
  transform: scale(1.05);
}

.project-card img {
  width: 100%;
  height: auto;
}

.project-info {
  padding: 15px;
  text-align: right;
}

.timeline-section {
  background: rgba(0, 0, 0, 0.3);
}

.timeline-section h2 {
  font-size: 2rem;
  margin-bottom: 30px;
}

.timeline {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  padding: 20px 0;
}

.timeline:before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  width: 4px;
  height: 100%;
  background: rgb(140, 58, 43);
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  width: 50%;
  padding: 20px;
  text-align: right;
}

.timeline-item:nth-child(odd) {
  left: 0;
  text-align: left;
}

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

.timeline-marker {
  position: absolute;
  top: 20px;
  width: 20px;
  height: 20px;
  background: var(--highlight-color);
  border: 3px solid #8c3a2b;
  border-radius: 50%;
  z-index: 1;
}

.timeline-item:nth-child(odd) .timeline-marker {
  right: -10px;
}

.timeline-item:nth-child(even) .timeline-marker {
  left: -10px;
}

.timeline-content {
  background: rgba(0, 0, 0, 0.5);
  padding: 15px;
  border-radius: 5px;
  position: relative;
  transition: background-color 0.3s ease;
}

.timeline-content:hover {
  background: rgba(0, 0, 0, 0.7);
}

.timeline-content h3 {
  margin-bottom: 10px;
  font-size: 1.5rem;
}

.extra-content-section {
  background: rgba(0, 0, 0, 0.2);
}

.extra-content-section h2 {
  font-size: 2rem;
  margin-bottom: 30px;
}

.extra-content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.content-card {
  background: rgba(0, 0, 0, 0.4);
  border: 2px solid rgb(140, 58, 43);
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.content-card:hover {
  transform: scale(1.05);
}

.content-card img {
  width: 100%;
  height: auto;
}

.content-info {
  padding: 15px;
  text-align: right;
}

.footer {
  direction: rtl; 
  background: rgba(37, 2, 51, 0.8);
  padding: 20px;
  text-align: center;
  font-size: 1rem;
  border-top: 2px solid rgb(140, 58, 43);
  color: var(--highlight-color);
}

.footer a{ 
  color: rgb(255, 87, 51);
  font-weight: bold;
}
