:root {
  --color-bone: #f1ead9;
  --color-bone-soft: #dad1bc;
  --color-gold: #c0a068;
  --color-gold-deep: #8c7038;
  --color-gold-soft: #d6bf92;
  --color-ink: #121316;
  --color-ink-800: #17181c;
  --font-display: "Cormorant Garamond", "Times New Roman", serif;
  --font-arabic: "El Messiri", "Cormorant Garamond", serif;
  --font-body: Inter, ui-sans-serif, system-ui, sans-serif;
  --ease-luxe: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-luxe: 0 1px 0 rgba(241, 234, 217, 0.06) inset, 0 8px 32px rgba(0, 0, 0, 0.35);
  --radius: 10px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100svh;
  color: var(--color-bone);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  background: var(--color-ink);
}

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

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

.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  animation: bg-zoom 22s var(--ease-luxe) forwards;
}

.bg__veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(80% 60% at 50% 20%, rgba(192, 160, 104, 0.14), transparent 55%),
    linear-gradient(180deg, rgba(18, 19, 22, 0.55) 0%, rgba(18, 19, 22, 0.78) 45%, rgba(24, 15, 9, 0.92) 100%);
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 2;
  opacity: 0.04;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.bio-card {
  position: relative;
  z-index: 1;
  width: min(100%, 28rem);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4rem) 1.25rem 2.5rem;
}

.lang {
  display: flex;
  justify-content: center;
  gap: 0.35rem;
  margin-bottom: 1.35rem;
}

.lang__btn {
  min-width: 2.6rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid rgba(241, 234, 217, 0.2);
  border-radius: var(--radius);
  background: rgba(18, 19, 22, 0.45);
  color: rgba(241, 234, 217, 0.7);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s, color 0.25s;
}

.lang__btn:hover {
  border-color: rgba(192, 160, 104, 0.55);
  color: var(--color-gold-soft);
}

.lang__btn.is-active {
  background: linear-gradient(180deg, rgba(192, 160, 104, 0.95), rgba(140, 112, 56, 0.95));
  border-color: rgba(192, 160, 104, 0.7);
  color: var(--color-ink);
}

html[dir="rtl"] body {
  font-family: var(--font-arabic), var(--font-body);
}

html[dir="rtl"] .profile__name,
html[dir="rtl"] .profile__tagline,
html[dir="rtl"] .map__title,
html[dir="rtl"] .link__label {
  font-family: var(--font-arabic);
}

html[dir="rtl"] .link,
html[dir="rtl"] .projects li {
  text-align: right;
}

html[dir="rtl"] .projects li {
  padding-left: 0;
  padding-right: 1rem;
}

html[dir="rtl"] .projects li::before {
  left: auto;
  right: 0;
}

.profile {
  text-align: center;
  margin-bottom: 1.35rem;
}

.profile__avatar {
  width: 5.5rem;
  height: 5.5rem;
  margin: 0 auto 1.1rem;
  object-fit: contain;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.45));
}

.profile__name {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 1.2rem + 1.8vw, 2.15rem);
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.15;
  color: var(--color-bone);
}

.profile__tagline {
  margin: 0.55rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 1rem + 1vw, 1.45rem);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-gold-soft);
}

.profile__desc {
  margin: 0.95rem auto 0;
  max-width: 24rem;
  color: rgba(241, 234, 217, 0.78);
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.65;
}

.projects {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem 0.85rem;
  margin: 0 0 1.5rem;
  padding: 1rem 0 0;
  list-style: none;
  border-top: 1px solid rgba(241, 234, 217, 0.12);
}

.projects li {
  position: relative;
  padding-left: 1rem;
  color: rgba(241, 234, 217, 0.78);
  font-size: 0.82rem;
  font-weight: 300;
}

.projects li::before {
  content: "✦";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--color-gold);
  font-size: 0.65rem;
  line-height: 1.5;
}

.links {
  display: grid;
  gap: 0.7rem;
}

.link {
  display: grid;
  grid-template-columns: 2rem 1fr;
  align-items: center;
  gap: 0.85rem;
  padding: 0.95rem 1.1rem;
  border: 1px solid rgba(241, 234, 217, 0.18);
  border-radius: var(--radius);
  background: rgba(18, 19, 22, 0.45);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-luxe);
  text-align: left;
  transition:
    transform 0.35s var(--ease-luxe),
    border-color 0.3s,
    background 0.3s,
    box-shadow 0.3s;
}

.link:hover,
.link:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(192, 160, 104, 0.65);
  background: rgba(33, 21, 13, 0.72);
  box-shadow: 0 10px 36px -10px rgba(192, 160, 104, 0.35);
  outline: none;
}

.link--primary {
  border-color: rgba(192, 160, 104, 0.55);
  background: linear-gradient(180deg, rgba(192, 160, 104, 0.95), rgba(140, 112, 56, 0.95));
  color: var(--color-ink);
}

.link--primary:hover,
.link--primary:focus-visible {
  background: linear-gradient(180deg, var(--color-gold-soft), var(--color-gold));
  border-color: var(--color-gold-soft);
  box-shadow: 0 12px 40px -12px rgba(192, 160, 104, 0.55);
}

.link__icon {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  color: var(--color-gold-soft);
}

.link--primary .link__icon {
  color: var(--color-ink);
}

.link__icon svg {
  width: 1.25rem;
  height: 1.25rem;
  display: block;
}

.link__text {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.link__label {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.link__hint {
  font-size: 0.82rem;
  font-weight: 300;
  opacity: 0.72;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link--primary .link__hint {
  opacity: 0.78;
  color: var(--color-ink-800);
}

.map {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(241, 234, 217, 0.12);
}

.map__head {
  text-align: center;
  margin-bottom: 0.9rem;
}

.map__eyebrow {
  margin: 0 0 0.4rem;
  color: var(--color-gold-soft);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.map__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 500;
  color: var(--color-bone);
}

.map__addr {
  margin: 0.45rem 0 0;
  color: rgba(241, 234, 217, 0.65);
  font-size: 0.82rem;
  font-weight: 300;
}

.map__frame {
  overflow: hidden;
  border: 1px solid rgba(241, 234, 217, 0.18);
  border-radius: var(--radius);
  background: rgba(18, 19, 22, 0.55);
  box-shadow: var(--shadow-luxe);
  aspect-ratio: 16 / 11;
}

.map__frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  filter: grayscale(0.25) contrast(1.05) saturate(0.85);
}

.map__open {
  display: inline-flex;
  justify-content: center;
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(192, 160, 104, 0.4);
  border-radius: var(--radius);
  color: var(--color-gold-soft);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: background 0.3s, border-color 0.3s, color 0.3s;
}

.map__open:hover {
  background: rgba(192, 160, 104, 0.12);
  border-color: var(--color-gold);
  color: var(--color-bone);
}

.foot {
  margin-top: 2rem;
  text-align: center;
  color: rgba(241, 234, 217, 0.4);
  font-size: 0.75rem;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.8s var(--ease-luxe), transform 0.8s var(--ease-luxe);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

.reveal--delay-1 { transition-delay: 0.08s; }
.reveal--delay-2 { transition-delay: 0.16s; }
.reveal--delay-3 { transition-delay: 0.24s; }

@keyframes bg-zoom {
  from { transform: scale(1.08); }
  to { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .bg img,
  .reveal {
    animation: none !important;
    transition: none !important;
    opacity: 1;
    transform: none;
  }
}
