﻿:root {
  --ink: #0f1b1f;
  --ink-muted: #5a6770;
  --mint: #8ff1d3;
  --sea: #1a346c;
  --sun: #8a1739;
  --sand: #f6f1e8;
  --night: #1a346c;
  --berry: #8a1739;
  --navy: #1a346c;
  --card: rgba(255, 255, 255, 0.9);
  --stroke: rgba(26, 52, 108, 0.08);
  --shadow: 0 18px 50px rgba(15, 24, 40, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Plus Jakarta Sans", "SF Pro Text", "Segoe UI", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top, rgba(138, 23, 57, 0.14), transparent 60%),
    linear-gradient(150deg, rgba(26, 52, 108, 0.12) 0%, rgba(138, 23, 57, 0.08) 45%, #f7f3ed 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  text-align: start;
}

body[dir="rtl"] {
  font-family: "Tajawal", "Plus Jakarta Sans", "Segoe UI", sans-serif;
}

.background-shape {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.background-shape::before,
.background-shape::after {
  content: "";
  position: absolute;
  width: 50vw;
  height: 50vw;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.28;
}

.background-shape::before {
  background: var(--berry);
  top: -10vw;
  left: -8vw;
}

.background-shape::after {
  background: var(--navy);
  bottom: -14vw;
  right: -6vw;
}

header {
  position: relative;
  z-index: 1;
  padding: 56px 8vw 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(12, 50, 60, 0.08);
  border-radius: 999px;
  color: var(--sea);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
  width: max-content;
  min-width: max-content;
  flex: 0 0 auto;
}

body[dir="rtl"] .badge {
  letter-spacing: 0;
  text-transform: none;
}

.badge span {
  display: inline-flex;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sun);
  box-shadow: 0 0 0 4px rgba(247, 196, 106, 0.3);
}

.lang-switch {
  display: inline-flex;
  background: rgba(15, 27, 31, 0.08);
  border-radius: 999px;
  padding: 4px;
  gap: 4px;
}

body[dir="rtl"] .lang-switch {
  direction: ltr;
}

.lang-switch button {
  border: none;
  background: transparent;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink-muted);
  transition: all 0.2s ease;
}

.lang-switch button.active {
  background: var(--night);
  color: #f4faf8;
}

h1 {
  margin: 0;
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

body[dir="rtl"] h1 {
  letter-spacing: 0;
}

.lead {
  max-width: 620px;
  color: var(--ink-muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

main {
  position: relative;
  z-index: 1;
  padding: 24px 8vw 64px;
  display: grid;
  gap: 32px;
}

.project-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.project-card {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 24px;
  padding: 24px;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 80px rgba(5, 20, 24, 0.2);
}

.project-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 1.25rem;
  font-weight: 700;
  gap: 12px;
}

.status-pill {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(84, 209, 200, 0.2);
  color: var(--sea);
}

.project-meta {
  color: var(--ink-muted);
  line-height: 1.6;
  font-size: 0.95rem;
}

.project-actions {
  margin-top: auto;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: var(--night);
  color: #f4faf8;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.button-icon {
  display: inline-flex;
  transition: transform 0.2s ease;
}

body[dir="rtl"] .button-icon {
  transform: scaleX(-1);
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(8, 20, 24, 0.2);
  background: #0f323c;
}

.button.secondary {
  background: transparent;
  border-color: rgba(15, 27, 31, 0.2);
  color: var(--ink);
}

.button.secondary:hover {
  background: rgba(15, 27, 31, 0.06);
  box-shadow: none;
}

.footer {
  position: relative;
  z-index: 1;
  padding: 0 8vw 48px;
  color: var(--ink-muted);
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.95rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 8px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.7);
  border-radius: 18px;
  padding: 18px 20px;
  border: 1px solid rgba(12, 50, 60, 0.1);
}

.stat-card h3 {
  margin: 0 0 6px;
  font-size: 1.1rem;
}

.stat-card p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.9rem;
}

@media (max-width: 640px) {
  header,
  main,
  .footer {
    padding-left: 6vw;
    padding-right: 6vw;
  }

  .project-card {
    padding: 20px;
  }
}

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

header,
.project-card,
.stat-card {
  animation: fadeUp 0.8s ease forwards;
}

.project-card:nth-child(2) {
  animation-delay: 0.08s;
}

.stat-card:nth-child(2) {
  animation-delay: 0.12s;
}

.stat-card:nth-child(3) {
  animation-delay: 0.16s;
}


