:root {
  --bg: #020617;
  --bg-soft: #020617;
  --card-bg: #020617;
  --accent: #f59e0b; /* ذهبي دافئ */
  --accent-soft: rgba(245, 158, 11, 0.14);
  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --border-subtle: #1f2937;
  --radius: 0.85rem;
  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.7);
  --font-main: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: var(--font-main);
  background:
    radial-gradient(circle at top, #0f172a 0, #020617 40%, #000 100%);
  color: var(--text-main);
}

/* Layout */

.container {
  width: min(1100px, 100% - 2.2rem);
  margin: 0 auto;
}

/* Header */

.site-header {
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(14px);
  background: linear-gradient(to left, rgba(15, 23, 42, 0.96), rgba(3, 7, 18, 0.98));
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 0;
}

.logo {
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  font-size: 0.9rem;
}

.main-nav a {
  color: var(--text-muted);
  text-decoration: none;
  margin-left: 0.6rem;
  font-size: 0.9rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  transition: background 0.18s, color 0.18s, transform 0.12s;
}

.main-nav a:hover {
  background: var(--accent-soft);
  color: var(--text-main);
  transform: translateY(-1px);
}

.main-nav a.active {
  background: var(--accent);
  color: #020617;
}

/* Hero */

.hero {
  padding: 3rem 0 2rem;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2.1rem, 4vw, 2.6rem);
  margin-bottom: 0.5rem;
}

.hero-subtitle {
  color: var(--text-muted);
  margin-bottom: 1.7rem;
  max-width: 620px;
  margin-inline: auto;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.hero-profile {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
}

.hero-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  object-fit: cover;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
}

/* Grid & Cards */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  padding: 1rem 0 3rem;
}

.card {
  background:
    radial-gradient(circle at top right, rgba(248, 250, 252, 0.06), transparent 55%),
    linear-gradient(to bottom right, var(--card-bg), #020617);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}

.card h2 {
  margin-top: 0;
  margin-bottom: 0.75rem;
}

/* Buttons */

.btn {
  display: inline-block;
  border-radius: 999px;
  padding: 0.55rem 1.25rem;
  border: 1px solid transparent;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    transform 0.1s ease,
    box-shadow 0.15s ease,
    border-color 0.15s ease;
}

.btn.primary {
  background: var(--accent);
  color: #020617;
  box-shadow: 0 14px 32px rgba(245, 158, 11, 0.55);
}

.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 40px rgba(245, 158, 11, 0.65);
}

.btn.secondary {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent-soft);
}

.btn.secondary:hover {
  background: var(--accent-soft);
}

.btn.ghost {
  background: transparent;
  border-color: rgba(148, 163, 184, 0.4);
  color: var(--text-muted);
}

.btn.ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn.small {
  font-size: 0.8rem;
  padding: 0.35rem 0.9rem;
}

.btn.tiny {
  font-size: 0.75rem;
  padding: 0.25rem 0.7rem;
}

.download-btn {
  margin-right: 0.75rem;
  background: var(--accent);
  color: #000;
  font-weight: 600;
  padding: 0.45rem 0.9rem;
  border-radius: 0.65rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

html[dir="rtl"] .download-btn {
  margin-left: 0.75rem;
  margin-right: 0;
}

/* Toggle content */

.toggle-content {
  margin-top: 0.8rem;
  padding: 0.7rem 0.8rem;
  border-radius: 0.6rem;
  background: rgba(15, 23, 42, 0.9);
  border: 1px dashed rgba(148, 163, 184, 0.45);
  display: none;
  font-size: 0.9rem;
  line-height: 1.8;
}

.toggle-content.open {
  display: block;
}

/* Tags */

.tags {
  list-style: none;
  padding: 0;
  margin: 0 0 0.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tags li {
  font-size: 0.78rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.7);
}

/* CV page */

.cv-page h1 {
  margin-top: 2rem;
}

.cv-section {
  margin-top: 1.5rem;
  padding: 1rem 1.2rem;
  border-radius: var(--radius);
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(15, 23, 42, 0.9);
}

.cv-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.cv-item {
  margin-top: 0.9rem;
}

.cv-item h3 {
  margin: 0;
  font-size: 1rem;
}

.cv-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0.2rem 0 0.4rem;
}

/* Lists */

ul {
  padding-right: 1.2rem;
}

/* Forms */

form {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.8rem;
}

label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

input,
textarea {
  background: #020617;
  border-radius: 0.55rem;
  border: 1px solid rgba(148, 163, 184, 0.7);
  padding: 0.55rem 0.7rem;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.9rem;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.5);
}

.note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 0.9rem 0;
  margin-top: 2rem;
  background: rgba(3, 7, 18, 0.98);
}

.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* Responsive */

@media (max-width: 720px) {
  .site-header .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .main-nav a {
    margin-left: 0.3rem;
  }

  .site-footer .container {
    flex-direction: column;
    text-align: center;
  }
}

/* Media block layouts (images + text) */
.media-block {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  margin-top: 0.9rem;
  flex-wrap: wrap;
}

.media-block--reverse {
  flex-direction: row-reverse;
}

.media-image {
  flex: 0 0 260px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.media-image img {
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.4);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.55);
  object-fit: cover;
}

.media-image-small {
  max-height: 150px;
  object-fit: contain;
}

.media-text {
  flex: 1 1 260px;
}

/* Responsive tweak for media blocks */
@media (max-width: 720px) {
  .media-block,
  .media-block--reverse {
    flex-direction: column;
  }

  .media-image {
    flex: 0 0 auto;
  }
}

/* Award card layout */
.award-layout {
  display: flex;
  gap: 2rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.award-card {
  flex: 0 0 360px;
  max-width: 100%;
  padding: 1rem;
  border-radius: 1rem;
  background:
    radial-gradient(circle at top left, rgba(248, 250, 252, 0.08), transparent 60%),
    linear-gradient(to bottom right, #020617, #020617);
  border: 1px solid rgba(148, 163, 184, 0.5);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.75);
}

.award-card img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0.75rem;
}

.award-text {
  flex: 1 1 260px;
  font-size: 0.95rem;
  line-height: 1.9;
}

/* Experience card with badge */
.exp-layout {
  display: flex;
  gap: 2rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 1.1rem;
}

.exp-card {
  position: relative;
  flex: 0 0 380px;
  max-width: 100%;
  padding: 1.1rem;
  border-radius: 1.1rem;
  background:
    radial-gradient(circle at top left, rgba(248, 250, 252, 0.09), transparent 60%),
    linear-gradient(to bottom right, #020617, #020617);
  border: 1px solid rgba(148, 163, 184, 0.55);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
  overflow: hidden;
}

.exp-images {
  display: flex;
  gap: 1rem;
  align-items: stretch;
}

.exp-image-main {
  flex: 1;
}

.exp-image-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.45);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.75);
}

.exp-image-doc {
  flex: 1.3;
}

.exp-image-doc img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: #f9fafb;
  padding: 0.6rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.85);
}

.exp-text {
  flex: 1 1 260px;
  font-size: 0.95rem;
  line-height: 1.9;
}

/* Profile highlight card */
.profile-layout {
  display: flex;
  gap: 2rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.profile-card {
  position: relative;
  flex: 0 0 320px;
  max-width: 100%;
  padding: 1.1rem;
  border-radius: 1.2rem;
  background:
    radial-gradient(circle at top left, rgba(248, 250, 252, 0.09), transparent 60%),
    linear-gradient(to bottom right, #020617, #020617);
  border: 1px solid rgba(148, 163, 184, 0.55);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
  overflow: hidden;
}

.profile-photo img {
  width: 100%;
  height: 100%;
  max-height: 360px;
  object-fit: cover;
  display: block;
  border-radius: 1rem;
}

.profile-badge {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(248, 250, 252, 0.6);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.85);
  font-size: 0.78rem;
  color: #e5e7eb;
  white-space: nowrap;
}

.profile-text {
  flex: 1 1 260px;
  font-size: 0.95rem;
  line-height: 1.9;
}

.whatsapp-btn {
  background: #25d366;
  color: #fff;
  font-weight: 600;
  padding: 0.55rem 1.1rem;
  border-radius: 0.65rem;
  display: inline-block;
  margin-top: 1rem;
}

.call-btn {
  background: #0ea5e9;
  color: #fff;
  font-weight: 600;
  padding: 0.55rem 1.1rem;
  border-radius: 0.65rem;
  display: inline-block;
  margin-top: 0.75rem;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .award-layout {
    flex-direction: column;
    align-items: stretch;
  }

  .award-card {
    margin: 0 auto 0.75rem;
    max-width: 320px;
  }

  .exp-layout {
    flex-direction: column;
    align-items: stretch;
  }

  .exp-card {
    margin: 0 auto 1rem;
    max-width: 380px;
  }

  .exp-images {
    flex-direction: column;
  }

  .profile-layout {
    flex-direction: column;
    align-items: stretch;
  }

  .profile-card {
    margin: 0 auto 1rem;
    max-width: 360px;
  }

  .profile-badge {
    bottom: 0.6rem;
    right: 0.6rem;
  }
}
