* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Arial, sans-serif;
  background: #080b0a;
  color: #ffffff;
  line-height: 1.6;
}

/* Navbar */
.navbar {
  width: 100%;
  padding: 18px 8%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;

  display: flex;
  justify-content: space-between;
  align-items: center;

  background: rgba(8, 11, 10, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(212, 175, 55, 0.18);
}

.logo {
  font-size: 24px;
  font-weight: 800;
  color: #f5f1e6;
  letter-spacing: 0.5px;
}

.nav-links {
  display: flex;
  gap: 26px;
}

.nav-links a {
  color: #d7ddd9;
  text-decoration: none;
  font-size: 15px;
  transition: 0.3s ease;
}

.nav-links a:hover {
  color: #d4af37;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-btn {
  padding: 9px 14px;
  border-radius: 12px;
  border: 1px solid rgba(212, 175, 55, 0.45);
  background: rgba(212, 175, 55, 0.12);
  color: #f5f1e6;
  font-weight: 800;
  cursor: pointer;
  transition: 0.3s ease;
}

.lang-btn:hover {
  background: #d4af37;
  color: #080b0a;
  transform: translateY(-2px);
}

.menu-btn {
  display: none;
  background: transparent;
  color: #ffffff;
  border: none;
  font-size: 28px;
  cursor: pointer;
}

/* Hero */
.hero {
  min-height: 100vh;
  padding: 130px 8% 80px;

  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  align-items: center;
  gap: 50px;

  background:
    radial-gradient(circle at top left, rgba(16, 185, 129, 0.22), transparent 34%),
    radial-gradient(circle at bottom right, rgba(212, 175, 55, 0.16), transparent 34%),
    linear-gradient(135deg, #080b0a 0%, #0b1410 45%, #10140c 100%);
}

.small-title {
  color: #d4af37;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 14px;
}

.hero h1 {
  font-size: 58px;
  line-height: 1.1;
  margin-bottom: 16px;

  background: linear-gradient(135deg, #ffffff, #d4af37, #10b981);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero h2 {
  font-size: 24px;
  color: #d7ddd9;
  margin-bottom: 24px;
  font-weight: 500;
}

.hero-text {
  max-width: 650px;
  color: #b8c2bd;
  font-size: 18px;
  margin-bottom: 34px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  padding: 13px 24px;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 800;
  transition: 0.3s ease;
}

.primary-btn {
  background: linear-gradient(135deg, #0f766e, #d4af37);
  color: #ffffff;
  box-shadow: 0 14px 40px rgba(212, 175, 55, 0.18);
}

.secondary-btn {
  border: 1px solid rgba(212, 175, 55, 0.35);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.045);
}

.btn:hover {
  transform: translateY(-3px);
}

/* Hero Card */
.hero-card {
  width: 100%;
  max-width: 370px;
  margin-left: auto;

  padding: 18px;
  border-radius: 26px;

  background: rgba(255, 255, 255, 0.065);
  border: 1px solid rgba(212, 175, 55, 0.22);
  box-shadow: 0 25px 90px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(18px);
}

.hero-card img {
  width: 100%;
  height: 470px;
  object-fit: cover;
  object-position: center top;
  border-radius: 20px;
  background: #10140c;
}

.card-info {
  padding: 18px 4px 4px;
}

.card-info h3 {
  font-size: 22px;
  color: #f5f1e6;
}

.card-info p {
  color: #b8c2bd;
}

/* Sections */
.section {
  padding: 90px 8%;
  background:
    radial-gradient(circle at top right, rgba(16, 185, 129, 0.08), transparent 30%),
    #080b0a;
}

.section-title {
  margin-bottom: 35px;
}

.section-title p {
  color: #d4af37;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.section-title h2 {
  font-size: 38px;
  color: #f5f1e6;
}

.about-box {
  max-width: 950px;
  padding: 30px;
  border-radius: 22px;

  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(212, 175, 55, 0.18);

  color: #d7ddd9;
  font-size: 18px;
}

.about-box p {
  margin-bottom: 16px;
}

.about-box p:last-child {
  margin-bottom: 0;
}

/* Cards Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* Certificate Cards */
.certificate-card {
  border-radius: 22px;
  overflow: hidden;

  background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.035));
  border: 1px solid rgba(212, 175, 55, 0.16);

  transition: 0.3s ease;
}

.certificate-card:hover {
  transform: translateY(-6px);
  border-color: rgba(212, 175, 55, 0.65);
  box-shadow: 0 20px 70px rgba(212, 175, 55, 0.11);
}

.certificate-card img {
  width: 100%;
  height: 260px;
  object-fit: contain;
  padding: 12px;
  background: #10140c;
}

.certificate-content {
  padding: 24px;
}

.certificate-content h3 {
  font-size: 22px;
  margin-bottom: 12px;
  color: #f5f1e6;
}

.certificate-content p {
  color: #c2ccc7;
  margin-bottom: 9px;
  font-size: 15px;
}

.certificate-content strong {
  color: #ffffff;
}

/* Project Cards */
.project-card {
  border-radius: 22px;
  padding: 24px;

  background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.035));
  border: 1px solid rgba(16, 185, 129, 0.18);

  transition: 0.3s ease;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(16, 185, 129, 0.55);
  box-shadow: 0 20px 70px rgba(16, 185, 129, 0.11);
}

.project-card h3 {
  font-size: 22px;
  margin-bottom: 12px;
  color: #f5f1e6;
}

.project-card p {
  color: #c2ccc7;
  margin-bottom: 9px;
  font-size: 15px;
}

.project-card strong {
  color: #ffffff;
}

/* Buttons inside cards */
.card-btn {
  display: inline-block;
  margin-top: 14px;
  padding: 11px 18px;
  border-radius: 12px;

  background: rgba(212, 175, 55, 0.12);
  color: #f5f1e6;
  text-decoration: none;
  border: 1px solid rgba(212, 175, 55, 0.45);

  transition: 0.3s ease;
}

.card-btn:hover {
  background: #d4af37;
  color: #080b0a;
  transform: translateY(-2px);
}

/* Skills */
.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.skills-list span {
  padding: 12px 18px;
  border-radius: 999px;
  color: #f5f1e6;

  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.18);

  transition: 0.3s ease;
}

.skills-list span:hover {
  transform: translateY(-3px);
  background: rgba(212, 175, 55, 0.12);
  border-color: rgba(212, 175, 55, 0.6);
}

/* Contact */
.contact-section {
  padding-bottom: 110px;
}

.contact-box {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.contact-box a {
  padding: 14px 22px;
  border-radius: 14px;
  text-decoration: none;
  color: #f5f1e6;

  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(212, 175, 55, 0.14));
  border: 1px solid rgba(212, 175, 55, 0.2);

  transition: 0.3s ease;
}

.contact-box a:hover {
  transform: translateY(-3px);
  border-color: #d4af37;
}

/* Footer */
.footer {
  padding: 24px 8%;
  text-align: center;
  color: #b8c2bd;
  background: #080b0a;
  border-top: 1px solid rgba(212, 175, 55, 0.14);
}

/* Arabic Mode */
body.ar {
  direction: rtl;
}

body.ar .hero,
body.ar .section,
body.ar .navbar {
  direction: rtl;
}

body.ar .hero-card {
  margin-left: 0;
  margin-right: auto;
}

body.ar .nav-links {
  direction: rtl;
}

body.ar .hero h1,
body.ar .hero h2,
body.ar .hero-text,
body.ar .about-box,
body.ar .certificate-content,
body.ar .project-card,
body.ar .section-title {
  text-align: right;
}

body.ar .hero-buttons,
body.ar .contact-box,
body.ar .skills-list {
  justify-content: flex-start;
}

/* Tablet */
@media (max-width: 1000px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .hero-card {
    margin: 0;
  }

  body.ar .hero-card {
    margin-right: 0;
  }

  .cards-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero h1 {
    font-size: 46px;
  }

  .hero-card img {
    height: 500px;
    object-fit: cover;
    object-position: center top;
  }
}

/* Mobile */
@media (max-width: 650px) {
  .navbar {
    padding: 16px 6%;
  }

  .logo {
    font-size: 18px;
  }

  .nav-links {
    position: absolute;
    top: 70px;
    right: 6%;
    width: 88%;

    display: none;
    flex-direction: column;
    gap: 16px;

    padding: 22px;
    border-radius: 18px;

    background: rgba(8, 11, 10, 0.98);
    border: 1px solid rgba(212, 175, 55, 0.22);
  }

  body.ar .nav-links {
    right: auto;
    left: 6%;
  }

  .nav-links.active {
    display: flex;
  }

  .menu-btn {
    display: block;
  }

  .hero {
    padding: 115px 6% 65px;
  }

  .hero h1 {
    font-size: 36px;
  }

  .hero h2 {
    font-size: 20px;
  }

  .hero-text {
    font-size: 16px;
  }

  .hero-card {
    max-width: 100%;
  }

  .hero-card img {
    height: 480px;
    object-fit: cover;
    object-position: center top;
  }

  .section {
    padding: 70px 6%;
  }

  .section-title h2 {
    font-size: 30px;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .certificate-card img {
    height: 230px;
  }

  .hero-buttons,
  .contact-box {
    flex-direction: column;
  }

  .btn,
  .contact-box a {
    text-align: center;
  }

  .lang-btn {
    font-size: 14px;
    padding: 8px 12px;
  }
}

/* Small Mobile */
@media (max-width: 420px) {
  .hero-card img {
    height: 440px;
    object-fit: cover;
    object-position: center top;
  }

  .hero h1 {
    font-size: 32px;
  }

  .logo {
    font-size: 16px;
  }
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  color: #f5f1e6;
  letter-spacing: 0.5px;
}

.logo-icon {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid rgba(212, 175, 55, 0.35);
}