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

:root {
  --light: #ddd9d1;
  --sage: #c3c3ba;
  --charcoal: #454545;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--charcoal);
  background: #fff;
  line-height: 1.6;
}

html[dir="rtl"] body {
  font-family: "Segoe UI", Tahoma, system-ui, sans-serif;
}

html[dir="rtl"] #about p,
html[dir="rtl"] .project-card p {
  max-width: none;
}

header {
  padding: 3rem 1.5rem 2rem;
  text-align: center;
  background: var(--light);
}

.logo {
  max-width: 140px;
  width: 35%;
  height: auto;
}

.tagline {
  margin-top: 0.5rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: var(--charcoal);
  opacity: 0.75;
}

nav {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 1rem;
}

nav a {
  color: var(--charcoal);
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  padding: 0.5rem 0.25rem;
}

nav a:hover {
  text-decoration: underline;
}

#lang-toggle {
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  color: var(--charcoal);
  background: #fff;
  border: 1px solid var(--charcoal);
  border-radius: 999px;
  cursor: pointer;
}

#lang-toggle:hover {
  background: var(--sage);
}

main {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

section {
  margin-bottom: 4rem;
}

section h2 {
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--sage);
  font-weight: 600;
}

#about p {
  max-width: 65ch;
  color: #333;
  margin-bottom: 1rem;
}

#about p:last-child {
  margin-bottom: 0;
}

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

.project-card {
  border: 1px solid var(--sage);
  border-radius: 8px;
  overflow: hidden;
}

.project-video {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  max-width: 100%;
  background: linear-gradient(135deg, var(--sage), var(--light));
  background-size: cover;
  background-position: center;
  cursor: pointer;
  border: 0;
  padding: 0;
  display: block;
}

.project-video .play-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, transform 0.15s ease;
}

.project-video .play-badge::after {
  content: "";
  border-style: solid;
  border-width: 10px 0 10px 16px;
  border-color: transparent transparent transparent #fff;
  margin-inline-start: 4px;
}

.project-video:hover .play-badge {
  background: rgba(0, 0, 0, 0.8);
  transform: translate(-50%, -50%) scale(1.08);
}

/* Full-screen video lightbox */
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.25rem;
}

.video-modal[hidden] {
  display: none;
}

.video-modal-frame {
  position: relative;
  width: 100%;
  max-width: 1100px;
  aspect-ratio: 16 / 9;
}

.video-modal-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-modal-close {
  position: absolute;
  top: 1rem;
  inset-inline-end: 1.25rem;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}

.video-modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.project-card h3,
.project-card p {
  padding: 0 1rem;
}

.project-card h3 {
  margin-top: 0.75rem;
}

.project-card p {
  margin-bottom: 1rem;
  color: #555;
  font-size: 0.9rem;
}

#contact a {
  color: var(--charcoal);
  font-weight: 600;
}

footer {
  text-align: center;
  padding: 1.5rem;
  color: #888;
  font-size: 0.85rem;
  background: var(--light);
}

@media (max-width: 600px) {
  header {
    padding: 2rem 1rem 1.5rem;
  }

  .logo {
    width: 45%;
    max-width: 110px;
  }

  main {
    padding: 2rem 1rem;
  }

  section {
    margin-bottom: 2.5rem;
  }

  section h2 {
    font-size: 1.15rem;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  nav a,
  #lang-toggle {
    font-size: 0.85rem;
  }

  .video-modal {
    padding: 0.75rem;
  }

  .video-modal-close {
    top: 0.5rem;
    inset-inline-end: 0.5rem;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
  }

  .project-video .play-badge {
    width: 46px;
    height: 46px;
  }
}
