/*
  Mehyar Abboud – modernized static site
  Features:
  - Sticky top banner navigation
  - Smooth anchor scrolling
  - Modern dark aesthetic with warm accents
  - Decorative circles/triangles and soft glows
  - Hero image black background matched to site black via overlay/blend
*/

:root {
  --font:
    "Josefin Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial,
    sans-serif;
  --bg: #050506;
  --bg2: #0b0c0f;
  --card: rgba(255, 255, 255, 0.06);
  --card2: rgba(255, 255, 255, 0.08);
  --text: #f3f4f6;
  --muted: rgba(243, 244, 246, 0.72);
  --line: rgba(255, 255, 255, 0.12);

  --accent: #f59e0b; /* warm amber */
  --accent2: #22c55e; /* green */
  --accent3: #38bdf8; /* sky */

  --shadow: 0 18px 45px rgba(0, 0, 0, 0.55);
  --radius: 18px;
  --radius2: 26px;

  --container: 1100px;
  --topbar-h: 72px;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
html,
body {
  overflow-x: hidden;
}
body {
  padding-top: var(--topbar-h);
  margin: 0;
  font-family: var(--font);
  line-height: 1.55;
  background: var(--bg);
  color: var(--text);
}

img,
video,
svg {
  max-width: 100%;
}
img,
video {
  display: block;
}

.container {
  width: min(var(--container), calc(100% - 3rem));
  margin: 0 auto;
  padding-inline: 0.35rem;
}

.skip {
  position: absolute;
  left: -999px;
  top: 10px;
  padding: 0.6rem 0.9rem;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  z-index: 9999;
}
.skip:focus {
  left: 10px;
}

/* Topbar */
.topbar {
  position: fixed; /* was sticky */
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;

  backdrop-filter: blur(10px);
  background: rgba(0, 0, 0, 0.18); /* keep readable, still transparent */
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.topbar__inner {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 1mm;
  text-decoration: none;
  line-height: 1;
}

.brand__mark {
  height: 45px;
  width: auto;
  transform: none; /* IMPORTANT: remove the rotate/flip */
  display: block; /* prevents inline-SVG baseline spacing */
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.45));
}

.brand__stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.05rem;
}

.brand__name {
  font-weight: 900;
  letter-spacing: 0.03em;
  color: var(--text);
  font-size: 0.9rem;
  white-space: nowrap;
}

.brand__tag {
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.68rem;
  color: rgba(243, 244, 246, 0.72);
}

.nav {
  display: flex;
  gap: 1.1rem;
  align-items: center;
}
.nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  padding: 0.55rem 0.65rem;
  border-radius: 999px;
  border: 1px solid transparent;
}
.nav a:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}
.nav a.is-active {
  color: var(--text);
  border-color: rgba(245, 158, 11, 0.28);
  background: rgba(245, 158, 11, 0.1);
}

/* Language switcher */
.langswitch {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-left: 0.45rem;
}

.langbtn {
  position: relative;
  text-decoration: none;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;

  display: grid;
  place-items: center;
  cursor: pointer;

  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.langbtn::before {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 999px;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(255, 255, 255, 0.55),
    rgba(255, 255, 255, 0.16) 60%,
    rgba(255, 255, 255, 0) 100%
  );
  opacity: 0.9;
  pointer-events: none;
}

.langbtn img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 999px;
}

.langbtn:hover {
  border-color: rgba(245, 158, 11, 0.55);
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
}

.langbtn.is-active {
  border-color: rgba(34, 197, 94, 0.6);
  background: rgba(34, 197, 94, 0.12);
}

@media (max-width: 920px) {
  .langswitch {
    margin-left: 0;
  }
}
@media (max-width: 720px) {
  .langswitch {
    gap: 0.6rem;
  }
  .langbtn {
    width: 34px;
    height: 34px;
    border-radius: 999px;
  }
  .langbtn img {
    width: 100%;
    height: 100%;
  }
}
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;

  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;

  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.nav-toggle:hover {
  border-color: rgba(245, 158, 11, 0.35);
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 999px;
  margin: 0;
  transition:
    transform 0.18s ease,
    opacity 0.18s ease;
}

/* Hamburger -> X */
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.hero {
  position: relative;
  min-height: 100vh; /* fill the whole viewport */
  margin-top: calc(-1 * var(--topbar-h)); /* pull hero up under header */
  padding-top: var(
    --topbar-h
  ); /* keep hero content from hiding behind header */

  display: grid;
  justify-items: start;
  align-items: center;

  overflow: clip;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-color: var(--bg);
  background-image: url("./assets/images/photo.jpg");
  background-repeat: no-repeat;
  /* slightly more "zoomed out" framing (shows more of the subject) */
  background-position: 55% 38%;
  background-size: cover;
  filter: contrast(1.15) brightness(1.1) saturate(1.02);
}
.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      900px 520px at 70% 35%,
      rgba(56, 189, 248, 0.05),
      transparent 65%
    ),
    radial-gradient(
      760px 520px at 20% 55%,
      rgba(34, 197, 94, 0.04),
      transparent 65%
    ),
    linear-gradient(
      180deg,
      rgba(5, 5, 6, 0.18) 0%,
      rgba(5, 5, 6, 0.06) 50%,
      rgba(5, 5, 6, 0.22) 100%
    );
  pointer-events: none;
}

.hero__fade {
  position: absolute;
  inset: auto 0 0 0;
  height: 140px;
  background: linear-gradient(180deg, transparent, var(--bg));
}

.hero__content {
  position: relative;
  padding: 1.2rem 0 20rem;

  justify-self: start;
  width: 100%;
  padding-left: clamp(1.2rem, 6vw, 5.4rem);
  padding-right: clamp(1.2rem, 4vw, 2.4rem);
}

.hero__layout {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(0.25rem, 0.8vw, 0.45rem); /* was larger */
  align-items: center;
  justify-content: start;
}

.hero__text {
  min-width: 0;

  /* NEW: stop it from spreading toward the middle */
  justify-self: start;
  text-align: left;
  max-width: 560px; /* <-- adjust (480–680px) */
  margin-left: 0;
  margin-right: auto;
}

/* Put the logo at the far-left edge of the hero content */
.hero__logo {
  width: min(460px, 28vw);
  max-width: 460px;
  opacity: 0.98;
  transform: rotate(90deg) scaleX(-1);
  transform-origin: 50% 50%;
  justify-self: start;
  margin-left: 0;
  margin-right: -8em;
  grid-column: 1;
  align-self: center;
}

@media (max-width: 920px) {
  .hero__layout {
    grid-template-columns: 1fr;
  }
  .hero__logo {
    justify-self: start;
    width: min(520px, 86vw);
    margin-top: 1.2rem;
  }
}

.kicker {
  margin: 0 0 0.75rem;
  color: rgba(243, 244, 246, 0.85);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

.hero__title {
  margin: 0 0 0.75rem;
  font-size: clamp(2.3rem, 6vw, 4.1rem);
  line-height: 1.05;
  letter-spacing: 0.1em;

  white-space: nowrap; /* NEW */
}
@media (max-width: 520px) {
  .hero__title {
    white-space: normal;
  }
}
.hero__lead {
  margin: 0;
  max-width: 62ch;
  color: rgba(243, 244, 246, 0.86);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.hero__cta {
  margin-top: 1.6rem;
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.hero__chips {
  margin-top: 2.2rem;
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.chip {
  text-decoration: none;
  color: rgba(243, 244, 246, 0.9);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.7rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(5, 5, 6, 0.35);
  backdrop-filter: blur(8px);
}
.chip:hover {
  border-color: rgba(245, 158, 11, 0.35);
}

/* Decorative shapes */
.decor {
  position: absolute;
  pointer-events: none;
  opacity: 0.85;
  filter: blur(0.2px);
}
.decor--orb {
  width: 420px;
  height: 420px;
  border-radius: 999px;
  left: -160px;
  top: 22%;
  background:
    radial-gradient(
      circle at 30% 30%,
      rgba(245, 158, 11, 0.42),
      transparent 65%
    ),
    radial-gradient(
      circle at 70% 70%,
      rgba(56, 189, 248, 0.28),
      transparent 60%
    );
  filter: blur(1px);
}
.decor--ring {
  width: 360px;
  height: 360px;
  border-radius: 999px;
  right: -150px;
  top: 10%;
  border: 2px solid rgba(34, 197, 94, 0.2);
  box-shadow: 0 0 0 20px rgba(34, 197, 94, 0.03);
}
.decor--tri {
  width: 0;
  height: 0;
  border-left: 210px solid transparent;
  border-right: 210px solid transparent;
  border-bottom: 320px solid rgba(245, 158, 11, 0.12);
  right: 10%;
  bottom: -140px;
  transform: rotate(10deg);
}

/* Sections */
.section {
  padding: 4.2rem 0;
}
.section--dark {
  position: relative;
  background: linear-gradient(180deg, var(--bg), var(--bg2));
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.6rem;
}
.section__head h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  letter-spacing: -0.01em;
}
.muted {
  color: var(--muted);
}

/* Anchor offset for sticky topbar */
.section,
.workcard {
  scroll-margin-top: calc(var(--topbar-h) + 16px);
}

/* Cards */
.card {
  padding: clamp(1rem, 2.2vw, 1.75rem);
  box-sizing: border-box;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card--glass {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.08),
    rgba(255, 255, 255, 0.04)
  );
  backdrop-filter: blur(10px);
}

.prose {
  padding: 1.2rem 1.25rem;
}
.prose p {
  margin-top: 0;
}
.prose h3 {
  margin: 1.2rem 0 0.4rem;
}

.linklike {
  border: 0;
  padding: 0;
  background: transparent;
  color: rgba(245, 158, 11, 0.92);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.linklike:hover {
  text-decoration: underline;
}

.expand {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Work grid */
.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.2rem;
}
.workcard {
  grid-column: span 4;
  overflow: hidden;
  border-radius: var(--radius2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: var(--shadow);
}
.workcard img {
  aspect-ratio: 16 / 10;
  width: 100%;
  object-fit: contain;
  object-position: center;
  background: #000;
  filter: saturate(1.06) contrast(1.06);
}
.workcard__body {
  padding: 1.05rem 1.05rem 1.15rem;
}
.workcard__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem;
}
.workcard__top h3 {
  margin: 0;
  font-size: 1.25rem;
}
.workcard p {
  margin: 0.55rem 0 0;
  color: rgba(243, 244, 246, 0.82);
}

.tag {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(243, 244, 246, 0.85);
  background: rgba(255, 255, 255, 0.04);
}

.workcard__actions {
  margin-top: 1rem;
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  font-weight: 750;
  font-size: 0.95rem;
  padding: 0.78rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  cursor: pointer;
}
.btn:hover {
  border-color: rgba(245, 158, 11, 0.28);
}

.btn--primary {
  background: linear-gradient(
    135deg,
    rgba(245, 158, 11, 0.95),
    rgba(245, 158, 11, 0.75)
  );
  border-color: rgba(245, 158, 11, 0.38);
  color: #111827;
}
.btn--primary:hover {
  filter: brightness(1.02);
}

.btn--secondary {
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.28);
}

.btn--ghost {
  background: transparent;
}

.actions {
  margin-top: 1rem;
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}
.actions--center {
  justify-content: center;
}

/* Back shapes behind work */
.backshape {
  position: absolute;
  inset: auto;
  pointer-events: none;
  z-index: 0;
  opacity: 0.8;
}
.backshape--one {
  width: 540px;
  height: 540px;
  border-radius: 999px;
  left: -260px;
  bottom: -280px;
  background:
    radial-gradient(
      circle at 40% 40%,
      rgba(56, 189, 248, 0.14),
      transparent 60%
    ),
    radial-gradient(
      circle at 70% 70%,
      rgba(245, 158, 11, 0.12),
      transparent 60%
    );
}
.backshape--two {
  width: 420px;
  height: 420px;
  border-radius: 18px;
  right: -220px;
  top: 20%;
  transform: rotate(18deg);
  background: linear-gradient(
    135deg,
    rgba(34, 197, 94, 0.12),
    rgba(245, 158, 11, 0.08)
  );
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.section--dark .container {
  position: relative;
  z-index: 1;
}

/* Contact */
.contact {
  display: grid;
  grid-template-columns: 1.5fr 0.9fr;
  gap: 1.2rem;
  align-items: start;
}
.contact__card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.1rem;
  padding: 1.1rem;
}
.contact__profile {
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  position: relative;
}
.contact__profile::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      500px 260px at 20% 20%,
      rgba(245, 158, 11, 0.15),
      transparent 60%
    ),
    radial-gradient(
      420px 240px at 80% 80%,
      rgba(56, 189, 248, 0.12),
      transparent 60%
    );
  pointer-events: none;
}
.contact__profile img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.contact__info h3 {
  margin: 0.2rem 0 0.35rem;
}

.contact__links {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin-top: 0.8rem;
}
.link {
  color: rgba(245, 158, 11, 0.92);
  text-decoration: none;
  border-bottom: 1px solid rgba(245, 158, 11, 0);
}
.link:hover {
  border-bottom-color: rgba(245, 158, 11, 0.55);
}

.contact__aside .card {
  padding: 1.1rem;
}
.copybox {
  padding: 0.9rem;
  border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.18);
}
.copybox p {
  margin: 0;
}

/* Footer */
.footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.22);
}
.footer__inner {
  padding: 1.6rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.footer a {
  text-decoration: none;
}

/* Full-width hero used on detail pages (teaching / composition / collaboration) */
.pagehero {
  position: relative;
  min-height: 100vh;

  /* cancel the body padding so the image reaches the very top */
  margin-top: calc(-1 * var(--topbar-h));
  padding-top: var(--topbar-h);
  display: grid;
  place-items: center;
  overflow: clip;
}
.pagehero__bg {
  position: absolute;
  inset: 0;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  background-color: var(--bg);
  filter: contrast(1.05) brightness(0.78) saturate(0.95);
}
.pagehero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(5, 5, 6, 0.62) 0%,
    rgba(5, 5, 6, 0.46) 45%,
    rgba(5, 5, 6, 0.72) 100%
  );
  pointer-events: none;
}
.pagehero__layout {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(1rem, 4vw, 2.8rem);
  align-items: center;
}
.pagehero__logo {
  width: min(320px, 30vw);
  max-width: 360px;
  opacity: 0.95;
  transform: rotate(90deg) scaleX(-1);
  transform-origin: 50% 50%;
  filter: drop-shadow(0 18px 44px rgba(0, 0, 0, 0.55));
  pointer-events: none;
  margin-right: -10rem;
}
@media (max-width: 920px) {
  .pagehero__layout {
    grid-template-columns: 1fr;
  }
  .pagehero__logo {
    width: min(520px, 86vw);
    margin-right: 0;
    justify-self: center;
  }
}

.pagehero__content {
  position: relative;
  padding: 5rem 0 3.6rem;
}
/* Detail pages */
.page {
  padding: 2.6rem 0 4.4rem;
}
.page__hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.2rem;
  align-items: start;
}
.page__hero--single {
  grid-template-columns: 1fr;
}
.page__hero .card {
  padding: 1.25rem;
}
.page__hero h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(2rem, 4vw, 2.8rem);
}
.page__hero p {
  margin: 0;
  color: rgba(243, 244, 246, 0.82);
}

.gallery__item--centered {
  max-width: 820px; /* keeps it nicely sized on big screens */
  margin: 0 auto; /* centers */
  padding: 0 16px 18px; /* keeps it away from page margins + adds space under */
}

.gallery__caption {
  margin-top: 12px;
  text-align: center;
  line-height: 1.35;
  font-size: 1rem;
  opacity: 0.95;
}

.gallery__caption-title {
  font-weight: 700;
}

.gallery {
  margin-top: 1.2rem;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
}
.gallery__item {
  grid-column: span 6;
  overflow: hidden;
  border-radius: var(--radius2);
  background: #000;
}
.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: #000;
  aspect-ratio: 16/10;
}
.gallery__item video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: #000;
  aspect-ratio: 16/10;
  display: block;
}

/* Zoomable gallery (lightbox) */
.gallery__item img {
  cursor: zoom-in;
}
.project__media img {
  cursor: zoom-in;
}
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: none;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(10px);
}
.lightbox.is-open {
  display: block;
}
.lightbox__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(5, 5, 6, 0.55);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
}
html.rtl .lightbox__close {
  right: auto;
  left: 16px;
}
.lightbox__close:hover {
  border-color: rgba(245, 158, 11, 0.45);
}
.lightbox__stage {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 72px 20px 28px;
}
.lightbox__frame {
  width: min(1100px, 96vw);
  height: min(78vh, 760px);
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.35);
  overflow: hidden;
  box-shadow: var(--shadow);
  touch-action: none;
}
.lightbox__img {
  touch-action: none;
  user-select: none;
  -webkit-user-drag: none;
  will-change: transform;
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* We drive zoom/pan via an explicit transform matrix in JS */
  transform-origin: 0 0;
  cursor: default;
}

/* Cursor states on the frame (better UX than “magnifier”) */
.lightbox__frame.is-zoomed {
  cursor: grab;
}
.lightbox__frame.is-panning,
.lightbox__frame.is-zoomed:active {
  cursor: grabbing;
}

.lightbox__img.is-dragging {
  cursor: grabbing;
}

.placeholder {
  padding: 1.2rem;
  border-radius: var(--radius2);
  border: 1px dashed rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.03);
  grid-column: span 6;
}

/* Responsive */
@media (max-width: 980px) {
  .workcard {
    grid-column: span 6;
  }
  .contact {
    grid-template-columns: 1fr;
  }
  .contact__card {
    grid-template-columns: 180px 1fr;
  }
  .page__hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  :root {
    --topbar-h: 66px;
  }
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .nav {
    position: fixed;
    top: var(--topbar-h);
    right: 1rem;
    left: 1rem;
    padding: 0.8rem;
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(5, 5, 6, 0.88);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow);
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
  }
  .nav.is-open {
    display: flex;
  }
  .nav a {
    padding: 0.7rem 0.8rem;
  }

  .hero__content {
    padding: 4.4rem 0 3.2rem;
  }

  /* Mobile hero alignment */
  .hero__layout {
    justify-items: center;
  }
  .hero__logo {
    justify-self: center;
    width: min(440px, 82vw);
    max-width: 440px;
    margin-top: 0.8rem;
  }
  .hero__text {
    justify-self: center;
    text-align: center;
    max-width: 46ch;
    margin-left: 0;
    margin-right: 0;
  }
  .hero__cta {
    justify-content: center;
  }
  .hero__chips {
    justify-content: center;
  }
  .hero__chips {
    justify-content: center;
  }
  .decor--orb {
    width: 320px;
    height: 320px;
    left: -180px;
    top: 30%;
  }
  .decor--ring {
    width: 280px;
    height: 280px;
    right: -140px;
    top: 8%;
  }
  .decor--tri {
    border-left-width: 160px;
    border-right-width: 160px;
    border-bottom-width: 260px;
    right: -10%;
  }

  .grid {
    gap: 0.95rem;
  }
  .workcard {
    grid-column: span 12;
  }
  .gallery__item,
  .placeholder {
    grid-column: span 12;
  }
  .contact__card {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* Social icons + contact form */
.social {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 0.6rem;
}
.social__link {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(244, 243, 243, 0.22);
  color: rgba(245, 158, 11, 0.92);
  text-decoration: none;
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}
.social__link:hover {
  transform: translateY(-2px) rotate(-2deg) scale(1.04);
  border-color: rgba(245, 158, 11, 0.55);
  background: rgba(245, 158, 11, 0.88);
  color: rgba(112, 62, 0, 0.95);
  box-shadow: 0 16px 40px rgba(184, 112, 112, 0.55);
}
.social__link svg {
  width: 22px;
  height: 30px;
}

.contactgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.1rem;
}
@media (max-width: 900px) {
  .contactgrid {
    grid-template-columns: 1fr;
  }
}

.contactpill {
  display: flex;
  align-items: center;
  justify-content: flex-start; /* keep them together */
  gap: 1cm;
}
.contactpill a {
  color: rgba(245, 158, 11, 0.92);
  text-decoration: none;
  font-weight: 650;
}
.contactpill a:hover {
  color: var(--text);
}
.copybtn {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.18);
  color: rgba(243, 244, 246, 0.9);
  border-radius: 12px;
  padding: 0.45rem 0.6rem;
  cursor: pointer;
}
.copybtn:hover {
  border-color: rgba(245, 158, 11, 0.35);
}

.form {
  display: grid;
  gap: 0.75rem;
}
.input {
  width: 100%;
  border-radius: 16px;
  padding: 0.85rem 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 0.98rem;
}
.input:focus {
  outline: none;
  border-color: rgba(245, 158, 11, 0.45);
  box-shadow: 0 0 0 6px rgba(245, 158, 11, 0.1);
}
textarea.input {
  min-height: 150px;
  resize: vertical;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  padding: 0.7rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(5, 5, 6, 0.82);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.55);
  color: rgba(245, 158, 11, 0.92);
  font-weight: 650;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
  z-index: 9999;
}
.toast.is-on {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

/* About page background */
.page--bg-about {
  position: relative;
}
.page--bg-about::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image: url("./assets/images/photo.jpg");
  background-size: cover;
  background-position: 55% 30%;
  filter: contrast(1.05) saturate(1.02) brightness(0.78);
}
.page--bg-about::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(
      900px 520px at 70% 35%,
      rgba(56, 189, 248, 0.04),
      transparent 65%
    ),
    radial-gradient(
      760px 520px at 20% 55%,
      rgba(34, 197, 94, 0.03),
      transparent 65%
    ),
    linear-gradient(
      180deg,
      rgba(5, 5, 6, 0.62) 0%,
      rgba(5, 5, 6, 0.4) 45%,
      rgba(5, 5, 6, 0.72) 100%
    );
}

/* RTL (Arabic) */
html.rtl body {
  direction: rtl;
}
html.rtl .nav {
  flex-direction: row-reverse;
}
html.rtl .brand {
  flex-direction: row-reverse;
}
html.rtl .section__head,
html.rtl .prose,
html.rtl .page__hero,
html.rtl .card {
  text-align: right;
}
html.rtl .hero__text,
html.rtl .pagehero__text {
  flex: 0 1 auto;
  text-align: right;
  margin: 0;
  max-width: 560px;
}
html.rtl .hero__cta {
  justify-content: flex-end;
}

/* RTL: keep hero logo close to hero text */
html.rtl .hero__layout,
html.rtl .pagehero__layout {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
}
html.rtl .hero__logo,
html.rtl .pagehero__logo {
  flex: 0 0 auto;
  margin: 0;
}
html.rtl .hero__text,
html.rtl .pagehero__text {
  flex: 0 1 auto;
  max-width: 560px;
}

@media (max-width: 720px) {
  html.rtl .nav {
    flex-direction: column;
  }
  html.rtl .hero__layout,
  html.rtl .pagehero__layout {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.9rem;
  }
  html.rtl .hero__text,
  html.rtl .pagehero__text {
    text-align: center;
    max-width: 46ch;
  }
  html.rtl .hero__cta {
    justify-content: center;
  }
}
/* Projects list */
.projects {
  margin-top: 2.2rem;
}
.projectlist {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 1rem;
}
.project {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1rem;
  padding: 1rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.project__media {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.25);
  width: 140px;
  height: 100px;
  display: grid;
  place-items: center;
}
.project__media img,
.project__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.project__meta {
  min-width: 0;
}
.project__date {
  font-weight: 800;
  letter-spacing: 0.06em;
  color: rgba(243, 244, 246, 0.8);
  font-size: 0.82rem;
  text-transform: uppercase;
}
.project__title {
  margin: 0.35rem 0 0.35rem;
}
.project__desc {
  margin: 0;
  color: rgba(243, 244, 246, 0.78);
}
@media (max-width: 720px) {
  .project {
    grid-template-columns: 1fr;
  }
  .project__media {
    width: 100%;
    height: 180px;
  }
}

/* Mobile hero centering */
@media (max-width: 720px) {
  .hero__content {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .hero__layout {
    justify-items: center;
  }
  .hero__logo {
    justify-self: center;
    width: min(420px, 82vw);
  }
  .hero__text {
    text-align: center;
    justify-self: center;
    margin-right: auto;
    margin-left: auto;
    max-width: 44ch;
  }
  .hero__cta {
    justify-content: center;
  }
  .hero__chips {
    justify-content: center;
  }
  .hero__chips {
    justify-content: center;
  }
}

/* Projects list (text-only) */
.projectlist--plain {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.project--plain {
  display: block;
  padding: 1.1rem 1.15rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(5, 5, 6, 0.28);
  backdrop-filter: blur(8px);
}
.project--plain .project__date {
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: rgba(243, 244, 246, 0.82);
  margin-bottom: 0.35rem;
}
.project--plain .project__title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}
.project--plain .project__desc {
  margin: 0;
  color: rgba(243, 244, 246, 0.78);
  line-height: 1.5;
}

html,
body {
  overflow-x: hidden;
}

/* RTL support (Arabic) */
html.rtl body {
  direction: rtl;
}
html.rtl .topbar__inner {
  flex-direction: row-reverse;
}
html.rtl .nav__list {
  flex-direction: row-reverse;
}
html.rtl .hero__layout,
html.rtl .pagehero__layout {
  direction: ltr;
} /* keep grid order stable */
html.rtl .hero__text,
html.rtl .pagehero__text {
  text-align: right;
}
html.rtl .hero__logo,
html.rtl .pagehero__logo {
  justify-self: start;
} /* force logo to left */
@media (max-width: 920px) {
  html.rtl .hero__cta,
  html.rtl .hero__chips {
    justify-content: flex-end;
  }
}

/* Local gallery video (poster -> play) */
.localcard {
  width: 100%;
}

.localposter {
  position: relative;
  width: 100%;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  cursor: pointer;
  aspect-ratio: 2048 / 1169; /* matches your crop */
}

.localposter img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.localposter::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.22);
}

.localplay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 1;
}

.localplay::before {
  content: "";
  width: 78px;
  height: 78px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
  display: block;
}

.localplay::after {
  content: "";
  position: absolute;
  width: 0;
  height: 0;
  margin-left: 6px;
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
  border-left: 22px solid #fff;
}

.localframe {
  position: relative;
  width: 100%;
  aspect-ratio: 2048 / 1169;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #000;
}

.localframe video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain; /* NO CROPPING */
  display: block;
}

/* Score + Audio gallery card */
.scorecard {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(5, 5, 6, 0.35);
  backdrop-filter: blur(8px);
  overflow: hidden;
}

.scorecard__top {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1rem;
  flex-wrap: wrap;
}

.scoremeta {
  min-width: 220px;
}
.scoretitle {
  margin: 0;
  font-size: 1.1rem;
}

.scoreaudio {
  width: min(520px, 100%);
}

.scoreviewer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.9rem 1rem 1rem;
}

.scorecanvaswrap {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
}

/* Canvas scales to container without cropping */
.scorecanvas {
  width: 100%;
  height: auto;
  display: block;
}

.scorecontrols {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding-top: 0.8rem;
}

.scorecontrols__spacer {
  flex: 1;
}

/* Arabic / RTL support */
html[dir="rtl"] body {
  direction: rtl;
}

/* Keep overall layout consistent with EN/DE (only text direction changes) */
html[dir="rtl"] .topbar__inner {
  flex-direction: row;
}

/* Hero + page-hero: keep the logo/text spacing identical to EN/DE */
html[dir="rtl"] .hero__layout,
html[dir="rtl"] .pagehero__layout {
  direction: ltr; /* keep grid order stable */
}

html[dir="rtl"] .hero__text,
html[dir="rtl"] .pagehero__text,
html[dir="rtl"] .page__hero,
html[dir="rtl"] .pagehero,
html[dir="rtl"] .hero,
html[dir="rtl"] main {
  direction: rtl;
  text-align: right;
}

/* Arabic headlines wrap nicer */
html[dir="rtl"] .hero__title {
  white-space: normal;
}

/* keep certain things LTR if needed */
.ltr {
  direction: ltr;
  unicode-bidi: bidi-override;
}
/* === FIX: Mobile home hero centering + readable text panel === */
@media (max-width: 920px) {
  /* the desktop hero logo uses a negative margin for overlap; cancel it on smaller screens */
  .hero__logo {
    margin-right: 0 !important;
  }
}

@media (max-width: 720px) {
  /* Center the hero logo/mark on mobile (and neutralize any leftover offsets/transforms) */
  .hero__layout {
    justify-items: center;
  }
  .hero__logo {
    justify-self: center !important;
    margin: 0 auto 0.8rem !important;
    max-width: 440px;
    width: min(440px, 82vw);
  }

  /* Dark, translucent text panel for readability over the hero image */
  .hero__text {
    background: rgba(246, 172, 0, 0.058);
    border: 1px solid rgba(255, 255, 255, 0);
    border-radius: 18px;
    padding: 0.85rem 1rem;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
  }

  /* Keep Arabic/RTL mobile hero identical in layout (only text direction changes) */
  html.rtl .hero__logo,
  html[dir="rtl"] .hero__logo {
    justify-self: center !important;
    margin: 0 auto 0.8rem !important;
  }
  html.rtl .hero__text,
  html[dir="rtl"] .hero__text {
    text-align: center;
  }
}

body.no-scroll {
  overflow: hidden;
}

/* ---------- Fullscreen PDF modal (view-only UI) ---------- */
.pdfmodal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(10px, 2vw, 22px);
  background: rgba(0, 0, 0, 0.72);
}

.pdfmodal.is-open {
  display: flex;
}

.pdfmodal__panel {
  width: min(1100px, 100%);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  background: var(--bg2);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  overflow: hidden;
}

.pdfmodal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.pdfmodal__title {
  font-weight: 700;
  letter-spacing: 0.2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pdfmodal__controls {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.pdfmodal__spacer {
  flex: 1;
}

.pdfmodal__viewport {
  flex: 1;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: rgba(255, 255, 255, 0.03);
  padding: 14px;
  cursor: grab;
  touch-action: none;
}

.pdfmodal__viewport.is-dragging {
  cursor: grabbing;
}

.pdfmodal__canvas {
  display: block;
  margin: 0 auto;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

/* Make the preview feel clickable */
.scorecanvaswrap {
  cursor: zoom-in;
}
