* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Cairo", sans-serif;
}

body {
  background-color: #f9fafb;
  color: #1e293b;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

 /* ===== Header Section ===== */
/* ===== Header Section ===== */
.header {
  text-align: center;
  padding: 50px 20px;
  background: linear-gradient(135deg, #00bfa5, #0096c7);
  color: white;
}

.profile-img {
  width: 380px;
  height: 380px;
  border-radius: 50%;
  border: 5px solid white;
  margin-bottom: 20px;
  transition: transform 0.35s ease, box-shadow 0.3s;
  object-fit: cover;
}

.profile-img:hover {
  transform: scale(1.04) rotate(-0.8deg);
  box-shadow: 0 14px 40px rgba(3, 54, 57, 0.18);
}

.name {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 8px;
}

.title {
  font-size: 20px;
  color: #e0f2f1;
  margin-bottom: 24px;
  opacity: 0.95;
}

.summary {
  max-width: 720px;
  margin: 0 auto;
  font-size: 17px;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.95);
  text-align: center;
}

/* ===== Tablet & Mobile ===== */
@media (max-width: 1024px) {
  .profile-img {
    width: 280px;
    height: 280px;
  }

  .name {
    font-size: 32px;
  }

  .title {
    font-size: 18px;
  }

  .summary {
    font-size: 16px;
  }
}

@media (max-width: 768px) {
  .profile-img {
    width: 250px;
    height: 250px;
  }

  .name {
    font-size: 28px;
  }

  .title {
    font-size: 16px;
  }

  .summary {
    font-size: 15px;
    max-width: 340px;
    padding: 0 10px;
  }
}
/* ===== Main content ===== */
main {
  padding: 36px 20px;
  max-width: 980px;
  margin: auto;
  background: transparent;
}

section {
  margin-bottom: 46px;
}

h3 {
  color: #0096c7;
  border-bottom: 3px solid #00bfa5;
  display: inline-block;
  margin-bottom: 18px;
  padding-bottom: 6px;
  font-size: 22px;
}

/* ===== Section Skills ===== */
.skills-category {
  margin-bottom: 36px;
  padding: 20px;
  background: rgba(241, 245, 249, 0.6);
  border-radius: 16px;
  backdrop-filter: blur(6px);
  border: 1px solid rgba(0, 150, 199, 0.08);
  transition: all 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.skills-category:hover {
  background: rgba(232, 253, 251, 0.85);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 191, 165, 0.14);
}

.skills-category h4 {
  font-size: 20px;
  color: #0077b6;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  position: relative;
}

.skills-category h4::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 32px;
  width: 40px;
  height: 2px;
  background: linear-gradient(to right, #00bfa5, transparent);
  border-radius: 2px;
}

.skills-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: flex-start;
}

.skills-tags span {
  background: white;
  color: #00796b;
  padding: 11px 20px;
  border-radius: 50px;
  font-weight: 600;
  transition:
    background 0.6s ease,
    color 0.6s ease,
    transform 0.4s cubic-bezier(0.2, 0.8, 0.4, 1),
    box-shadow 0.5s ease,
    border-color 0.5s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
  border: 1px solid #e2e8f0;
  font-size: 15px;
  letter-spacing: -0.2px;
  max-width: 180px;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.skills-tags span:hover {
  transform: translateY(-1px) scale(1.02);
  background: linear-gradient(135deg, #00bfa5, #0096c7);
  color: white;
  box-shadow: 0 8px 22px rgba(0, 150, 199, 0.32);
  border-color: transparent;
  cursor: pointer;
}

/* ===== Mobile Optimization ===== */
@media (max-width: 768px) {
  .skills-tags span {
    max-width: 140px;
    font-size: 14px;
    padding: 10px 16px;
  }

  .skills-category {
    padding: 16px;
  }

  .skills-category h4::after {
    display: none;
  }
}

@media (max-width: 480px) {
  .skills-tags span {
    max-width: 120px;
    font-size: 13px;
    padding: 8px 12px;
  }

  .skills-category h4 {
    font-size: 18px;
  }
}

/* ===== Section Projects ===== */
.projects {
  margin-top: 50px;
}

.project-card {
  margin-top: 15px;
  background: linear-gradient(to bottom right, #ffffff, #f8fbfc);
  padding: 28px;
  border-radius: 18px;
  transition: all 0.45s cubic-bezier(0.18, 0.89, 0.32, 1.28);
  border: 1px solid rgba(0, 150, 199, 0.08);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.04);
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background: linear-gradient(to bottom, #00bfa5, #0096c7);
  opacity: 0;
  transition: opacity 0.6s ease;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 36px rgba(0, 150, 199, 0.18);
  border-color: rgba(0, 150, 199, 0.2);
  cursor: pointer;
}

.project-card:hover::before {
  opacity: 1;
}

.project-card h4 {
  font-size: 20px;
  color: #0077b6;
  margin-bottom: 12px;
  font-weight: 700;
  position: relative;
  display: inline-block;
}

.project-card h4::after {
  content: '';
  display: block;
  width: 32px;
  height: 3px;
  background: #00bfa5;
  margin-top: 6px;
  border-radius: 2px;
}

.project-card p {
  font-size: 16px;
  color: #475569;
  line-height: 1.8;
  margin-top: 8px;
}

/* ===== Section Experience ===== */
.experience {
  margin-top: 80px;
}

.experience h3 {
  text-align: center;
  font-size: 26px;
  color: #0077b6;
  margin-bottom: 50px;
  position: relative;
}

.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: #00bfa5;
  transform: translateX(-50%);
  z-index: 1;
}

.timeline-item {
  position: relative;
  width: 100%;
  margin-bottom: 50px;
  padding: 0 20px;
  box-sizing: border-box;
  cursor: pointer;
}

.timeline-item:nth-child(odd) {
  padding-right: calc(50% + 30px);
  padding-left: 20px;
  text-align: right;
}

.timeline-item:nth-child(even) {
  padding-left: calc(50% + 30px);
  padding-right: 20px;
  text-align: left;
}

.timeline-dot {
  position: absolute;
  top: 40px;
  left: 50%;
  width: 24px;
  height: 24px;
  background: #fff;
  border: 3px solid #00bfa5;
  border-radius: 50%;
  transform: translateX(-50%);
  z-index: 2;
  box-shadow: 0 0 0 4px rgba(0, 191, 165, 0.1);
  transition: all 0.3s ease;
}

.timeline-item:hover .timeline-dot {
  background: #00bfa5;
  transform: translateX(-50%) scale(1.1);
}

.timeline-content {
  background: #f9fafb;
  padding: 25px;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: all 0.4s ease;
  border: 1px solid #e2e8f0;
}

.timeline-item:hover .timeline-content {
  transform: translateY(-6px);
  box-shadow: 0 8px 20px rgba(0, 191, 165, 0.2);
  background: #e8fdfb;
}

.timeline-content h4 {
  color: #0077b6;
  font-size: 18px;
  margin-bottom: 10px;
  font-weight: 700;
}

.timeline-content p {
  font-size: 15px;
  color: #475569;
  line-height: 1.7;
}

/* ===== Section Certificates ===== */
.certificates {
  margin-top: 60px;
  ;
}

.certificates-grid {
  margin-top: 15px;
  ;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 20px;
}

.certificate-card {
  background: #f1f5f9;
  padding: 25px;
  border-radius: 15px;
  text-align: center;
  transition: all 0.4s ease;
  border: 2px solid transparent;
  height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

.certificate-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 25px rgba(0, 150, 199, 0.15);
  border-color: #00bfa5;
  background: #e8fdfb;
}

.certificate-card i {
  font-size: 38px;
  color: #00bfa5;
  margin-bottom: 15px;
  transition: color 0.3s;
}

.certificate-card:hover i {
  color: #0096c7;
}

.certificate-card h4 {
  color: #0077b6;
  font-size: 18px;
  margin-bottom: 8px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
}

.certificate-card p {
  font-size: 15px;
  color: #475569;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== Section Social ===== */
.contact h3 {
  text-align: center;
  margin-bottom: 28px;
}

.social-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.social-links li {
  margin: 0;
}

.social-links a {
  text-decoration: none;
  color: #0b5160;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-radius: 14px;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  background: rgba(241, 245, 249, 0.7);
  border: 1px solid rgba(0, 150, 199, 0.08);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
}

.social-links a i {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #0077b6;
  background: white;
  border-radius: 10px;
  transition: all 0.4s ease-in-out;
  flex-shrink: 0;
}

.social-links a:hover {
  transform: translateX(0) translateY(-3px);
  background: rgba(232, 253, 251, 0.9);
  color: #0077b6;
  box-shadow: 0 8px 20px rgba(0, 150, 199, 0.18);
  border-color: rgba(0, 150, 199, 0.25);
}

.social-links a:hover i {
  color: white;
  background: linear-gradient(135deg, #00bfa5, #0096c7);
  transform: scale(1.08);
}

/* ===== Mobile Responsive ===== */
@media (max-width: 768px) {
  .social-links a {
    padding: 12px 16px;
    gap: 12px;
  }

  .social-links a i {
    width: 28px;
    height: 28px;
    font-size: 16px;
  }
}

/* ===== Footer ===== */
.footer {
  background: linear-gradient(135deg, #0077b6, #0096c7);
  color: white;
  text-align: center;
  padding: 24px 20px;
  font-size: 15px;
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.2);
}

.footer p {
  margin: 0;
  letter-spacing: 0.5px;
  line-height: 1.8;
}

/* ===== Back to top button ===== */
#backToTop {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, #00bfa5, #0096c7);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: none;
  box-shadow: 0 6px 20px rgba(0, 150, 199, 0.35);
  transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 1000;
  opacity: 0;
  transform: translateY(10px) scale(0.95);
}

#backToTop.show {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transform: translateY(0) scale(1);
}

#backToTop:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 25px rgba(0, 150, 199, 0.5);
  background: linear-gradient(135deg, #0096c7, #00bfa5);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .skills-grid span {
    padding: 8px 12px;
  }

  h3 {
    font-size: 20px;
  }

  .certificate-card {
    padding: 20px;
  }

  .certificate-card h4 {
    font-size: 16px;
  }

  .certificate-card i {
    font-size: 32px;
  }

  .timeline::before {
    left: 20px;
  }

  .timeline-item:nth-child(odd),
  .timeline-item:nth-child(even) {
    padding-left: 45px !important;
    padding-right: 10px !important;
    text-align: right !important;
  }

  .timeline-dot {
    left: 20px !important;
  }

  .timeline {
    padding-left: 20px;
  }

  .timeline-content {
    padding: 15px;
  }

  .timeline-content h4 {
    font-size: 16px;
  }

  .timeline-content p {
    font-size: 14px;
  }
}