
:root {
  --bg: #0b0f0e;
  --bg-soft: #101715;
  --card: #131b18;
  --card-hover: #18231e;
  --text: #edf4ef;
  --muted: #9aa9a0;
  --green: #8ee6a5;
  --green-dark: #4caf70;
  --border: rgba(190, 220, 199, 0.12);
  --font: "Manrope", sans-serif;
  --mono: "DM Mono", monospace;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.7;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

.container {
  width: min(1120px, calc(100% - 48px));
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* NAVIGATION */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(11, 15, 14, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -2px;
}

.logo span {
  color: var(--green);
}

.nav-links,
.nav-actions {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a,
.social-links a {
  color: var(--muted);
  font-size: 0.85rem;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.social-links a:hover {
  color: var(--green);
}

.nav-actions {
  gap: 16px;
}

.language-select {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
}

.nav-cta {
  color: var(--green);
  font-size: 0.85rem;
  font-weight: 700;
}

/* HERO */

.hero {
  min-height: 650px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 50px;
  padding-top: 80px;
  padding-bottom: 90px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--green);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 1px;
  margin-bottom: 28px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 14px var(--green);
}

.hero-intro {
  color: var(--muted);
  font-size: 1.1rem;
  margin-bottom: 6px;
}

.hero h1 {
  font-size: clamp(3.8rem, 8vw, 6.5rem);
  line-height: 0.98;
  letter-spacing: -6px;
  font-weight: 800;
}

.hero h1 span {
  color: var(--green);
}

.hero-description {
  max-width: 520px;
  color: var(--muted);
  font-size: 1.05rem;
  margin-top: 28px;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.button {
  min-height: 48px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  border-radius: 7px;
  padding: 12px 20px;
  font-size: 0.88rem;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--green);
  color: #0b1710;
}

.button-primary:hover {
  background: #a7f2b8;
}

.button-secondary {
  color: var(--text);
  border-color: var(--border);
  background: transparent;
}

.button-secondary:hover {
  background: var(--card);
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 44px;
}

/* HERO VISUAL */

.hero-visual {
  min-height: 390px;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: radial-gradient(circle at 50% 45%, #1b3024 0%, #101815 48%, #0c1210 100%);
}

.visual-glow {
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: var(--green);
  opacity: 0.12;
  filter: blur(90px);
}

.visual-grid {
  position: absolute;
  inset: 0;
  opacity: 0.13;
  background-image:
    linear-gradient(rgba(142, 230, 165, 0.3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(142, 230, 165, 0.3) 1px, transparent 1px);
  background-size: 35px 35px;
  mask-image: linear-gradient(to bottom, black, transparent);
}

.terminal {
  position: relative;
  z-index: 1;
  width: min(370px, 85%);
  background: rgba(8, 14, 11, 0.92);
  border: 1px solid rgba(142, 230, 165, 0.25);
  border-radius: 12px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
  transform: rotate(-3deg);
}

.terminal-top {
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.7rem;
}

.terminal-dots {
  display: flex;
  gap: 5px;
}

.terminal-dots i {
  width: 7px;
  height: 7px;
  display: block;
  border-radius: 50%;
  background: #52685a;
}

.terminal-dots i:first-child {
  background: #d97777;
}

.terminal-dots i:nth-child(2) {
  background: #d6b76d;
}

.terminal-dots i:nth-child(3) {
  background: var(--green-dark);
}

.terminal-body {
  padding: 22px;
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 2;
}

.terminal-green {
  color: var(--green);
}

.terminal-output {
  color: #a7b8ad;
  padding-left: 18px;
}

.cursor {
  color: var(--green);
  animation: blink 1s infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.visual-tag {
  position: absolute;
  z-index: 2;
  color: var(--green);
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 1px;
  background: rgba(11, 15, 14, 0.8);
  border: 1px solid var(--border);
  padding: 8px 12px;
  border-radius: 5px;
}

.tag-top {
  top: 35px;
  right: 25px;
}

.tag-bottom {
  bottom: 30px;
  left: 25px;
}

/* SECTIONS */

.section {
  padding-top: 110px;
  padding-bottom: 110px;
}

.section-alt {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding-top: 100px;
  padding-bottom: 100px;
}

.section-heading {
  margin-bottom: 42px;
}

.eyebrow {
  display: block;
  color: var(--green);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 1.5px;
  margin-bottom: 14px;
}

.section-heading h2,
.contact-layout h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.15;
  letter-spacing: -1.5px;
}

.section-subtitle {
  color: var(--muted);
  margin-top: 14px;
  max-width: 580px;
}

.about-content {
  max-width: 850px;
}

.about-content p {
  color: var(--muted);
  font-size: 1.08rem;
  margin-bottom: 20px;
  line-height: 1.95;
}

.about-content p:first-child {
  color: var(--text);
  font-size: 1.18rem;
}

/* EXPERTISE */

.expertise-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.expertise-card {
  position: relative;
  padding: 30px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.expertise-card:hover {
  background: var(--card-hover);
  transform: translateY(-3px);
}

.card-number {
  position: absolute;
  top: 25px;
  right: 25px;
  color: #53665a;
  font-family: var(--mono);
  font-size: 0.75rem;
}

.card-icon {
  color: var(--green);
  font-size: 2rem;
  margin-bottom: 18px;
}

.expertise-card h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.expertise-card p,
.project-card p {
  color: var(--muted);
  font-size: 0.9rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.tag-list span,
.project-tech {
  color: var(--green);
  background: rgba(142, 230, 165, 0.07);
  border: 1px solid rgba(142, 230, 165, 0.13);
  border-radius: 5px;
  padding: 5px 9px;
  font-family: var(--mono);
  font-size: 0.67rem;
}

/* EXPERIENCE */

.timeline {
  border-top: 1px solid var(--border);
}

.timeline-item {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 35px;
  padding: 30px 0;
  border-bottom: 1px solid var(--border);
}

.timeline-date {
  color: var(--green);
  font-family: var(--mono);
  font-size: 0.75rem;
  padding-top: 5px;
}

.timeline-content h3 {
  font-size: 1.2rem;
}

.company {
  color: var(--green);
  font-size: 0.9rem;
  margin: 4px 0 12px;
}

.timeline-content p:last-child {
  max-width: 700px;
  color: var(--muted);
  font-size: 0.9rem;
}

/* PROJECTS */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.project-card {
  display: block;
  padding: 28px;
  min-height: 260px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  background: var(--card-hover);
  border-color: rgba(142, 230, 165, 0.4);
}

.project-top {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
}

.project-top span:last-child {
  color: var(--green);
  font-size: 1.1rem;
}

.project-symbol {
  color: var(--green);
  font-size: 2rem;
  margin: 22px 0 10px;
}

.project-card h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.project-tech {
  display: inline-block;
  margin-top: 20px;
}

.text-link {
  display: inline-block;
  color: var(--green);
  font-size: 0.9rem;
  font-weight: 700;
  margin-top: 28px;
}

/* EDUCATION */

.education-card {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  align-items: center;
  gap: 35px;
  padding: 35px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.education-card h3 {
  font-size: 1.05rem;
}

.education-card p {
  color: var(--muted);
  margin-top: 8px;
}

.education-date {
  display: block;
  color: var(--green);
  font-family: var(--mono);
  font-size: 0.75rem;
  margin-top: 15px;
}

.education-divider {
  width: 1px;
  height: 90px;
  background: var(--border);
}

/* CONTACT */

.contact-section {
  background:
    radial-gradient(ellipse at 15% 80%, rgba(66, 143, 89, 0.1), transparent 45%),
    var(--bg);
  border-top: 1px solid var(--border);
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  gap: 70px;
  align-items: start;
}

.contact-layout h2 span {
  color: var(--green);
}

.contact-description {
  max-width: 470px;
  color: var(--muted);
  margin-top: 22px;
}

.contact-email {
  display: inline-block;
  color: var(--green);
  font-weight: 700;
  margin-top: 30px;
  overflow-wrap: anywhere;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 28px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.contact-form label {
  font-size: 0.82rem;
  font-weight: 700;
  margin-top: 8px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 13px 14px;
  color: var(--text);
  background: #0b110e;
  border: 1px solid var(--border);
  border-radius: 6px;
  outline: none;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--green-dark);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #66766b;
}

.form-button {
  margin-top: 12px;
}

.form-note,
.form-status {
  color: var(--muted);
  font-size: 0.75rem;
}

.form-status {
  color: var(--green);
}

/* FOOTER */

.footer {
  border-top: 1px solid var(--border);
  padding: 25px 0;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-content p,
.footer-content > span {
  color: var(--muted);
  font-size: 0.75rem;
}

/* RTL / ARABIC */

html[dir="rtl"] body {
  font-family: "Manrope", sans-serif;
}

html[dir="rtl"] .hero h1 {
  letter-spacing: 0;
}

html[dir="rtl"] .timeline-item {
  direction: rtl;
}

html[dir="rtl"] .card-number {
  right: auto;
  left: 25px;
}

html[dir="rtl"] .terminal {
  direction: ltr;
  text-align: left;
}

html[dir="rtl"] .social-links,
html[dir="rtl"] .hero-buttons {
  flex-direction: row;
}

html[dir="rtl"] .contact-form {
  text-align: right;
}

/* RESPONSIVE */

@media (max-width: 800px) {
  .nav {
    flex-wrap: wrap;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .nav-links {
    order: 3;
    width: 100%;
    justify-content: center;
    gap: 20px;
  }

  .nav-actions {
    margin-left: auto;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 45px;
    padding-top: 75px;
  }

  .hero-visual {
    min-height: 340px;
  }

  .contact-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 600px) {
  .container {
    width: min(100% - 32px, 1120px);
  }

  .nav {
    gap: 12px;
  }

  .nav-links {
    gap: 14px;
    justify-content: space-between;
  }

  .nav-links a {
    font-size: 0.75rem;
  }

  .nav-cta {
    display: none;
  }

  .hero {
    min-height: auto;
    padding-top: 65px;
    padding-bottom: 70px;
  }

  .hero h1 {
    font-size: clamp(3.3rem, 15vw, 5rem);
    letter-spacing: -3px;
  }

  .hero-description {
    font-size: 0.95rem;
  }

  .hero-visual {
    min-height: 300px;
  }

  .section,
  .section-alt {
    padding-top: 75px;
    padding-bottom: 75px;
  }

  .expertise-grid,
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .education-card {
    grid-template-columns: 1fr;
    gap: 25px;
    padding: 25px;
  }

  .education-divider {
    width: 100%;
    height: 1px;
  }

  .contact-form {
    padding: 20px;
  }

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