/* ==========================================================================
   SKYRO — Samad Shukr portfolio
   Monochrome theme. Sections:
   1. Tokens  2. Base  3. Layout & shared  4. Header  5. Hero  6. About
   7. Services  8. Projects  9. Experience  10. Contact
   11. Footer & back-to-top  12. Motion  13. Right-to-left (Arabic, Kurdish)
   ========================================================================== */

/* 1. Tokens
   ----------------------------------------------------------------------- */
:root {
  --bg: #050505;
  --bg-alt: #0b0b0b;
  --surface: #111111;
  --surface-2: #1b1b1b;
  --border: #262626;
  --border-strong: #3a3a3a;
  --text: #a5a5a5;
  --text-strong: #e5e5e5;
  --white: #ffffff;
  --available: #4ade80;

  --ff: "Space Grotesk", system-ui, -apple-system, sans-serif;
  --fs-xs: 1.2rem;
  --fs-sm: 1.4rem;
  --fs-md: 1.6rem;
  --fs-lg: 2rem;
  --fs-xl: clamp(2.6rem, 4vw, 3.6rem);
  --fs-hero: clamp(4.4rem, 8vw, 7.2rem);

  --radius: 0.8rem;
  --radius-lg: 1.2rem;
  --container: 112rem;
  --header-h: 7.2rem;
  --section-y: clamp(7rem, 10vw, 11rem);
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* 2. Base
   ----------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 62.5%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--ff);
  font-size: var(--fs-md);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p, ul, ol, dl, dd, figure {
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4 {
  color: var(--white);
  font-weight: 700;
  line-height: 1.2;
}

ul, ol {
  list-style: none;
}

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

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

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 3px;
}

::selection {
  background: var(--white);
  color: var(--bg);
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1.6rem;
  z-index: 2000;
  padding: 1rem 1.6rem;
  background: var(--white);
  color: var(--bg);
  font-weight: 600;
}

.skip-link:focus {
  top: 1.6rem;
}

/* 3. Layout & shared components
   ----------------------------------------------------------------------- */
.container {
  width: min(100% - 4rem, var(--container));
  margin-inline: auto;
}

.section {
  padding-block: var(--section-y);
}

.section--alt {
  background: var(--bg-alt);
  border-block: 1px solid var(--border);
}

.section__header {
  max-width: 64rem;
  margin-bottom: 5rem;
}

.section__title {
  font-size: var(--fs-xl);
  letter-spacing: -0.01em;
}

.section__lead {
  margin-top: 1.4rem;
  color: var(--text);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.4rem;
  color: var(--text);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 2.4rem;
  height: 1px;
  background: currentColor;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  min-height: 4.6rem;
  padding: 0 2rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}

.btn--primary {
  background: var(--white);
  color: var(--bg);
}

.btn--primary:hover {
  background: var(--text-strong);
  transform: translateY(-2px);
}

.btn--ghost {
  border-color: var(--border-strong);
  background: transparent;
  color: var(--text-strong);
}

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

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-strong);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
  text-underline-offset: 0.5rem;
  transition: color 0.2s, text-decoration-color 0.2s;
}

.text-link:hover {
  color: var(--white);
  text-decoration-color: var(--white);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.tags li {
  padding: 0.3rem 0.9rem;
  border: 1px solid var(--border-strong);
  border-radius: 99rem;
  color: var(--text-strong);
  font-size: var(--fs-xs);
}

/* 4. Header
   ----------------------------------------------------------------------- */
.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}

/* The blur lives on a pseudo-element: backdrop-filter on .header itself
   would trap the fixed full-screen mobile menu inside the header box. */
.header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(5, 5, 5, 0.6);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  transition: background-color 0.3s;
}

.header--scroll {
  border-bottom-color: var(--border);
}

.header--scroll::before {
  background: rgba(5, 5, 5, 0.94);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.nav__brand {
  display: grid;
  gap: 0.2rem;
  color: var(--white);
}

.nav__wordmark {
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.04em;
}

.nav__tagline {
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
}

.nav__list {
  display: flex;
  align-items: center;
  gap: 3.2rem;
}

.nav__link {
  position: relative;
  font-size: var(--fs-sm);
  transition: color 0.2s;
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.6rem;
  width: 100%;
  height: 1px;
  background: var(--white);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.nav__link:hover,
.nav__link.is-active {
  color: var(--white);
}

.nav__link.is-active::after {
  transform: scaleX(1);
}

.nav__langs {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.3rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.nav__langs a {
  padding: 0.3rem 0.8rem;
  border-radius: 0.5rem;
  font-size: 1.3rem;
  transition: background-color 0.2s, color 0.2s;
}

.nav__langs a:hover {
  color: var(--white);
}

.nav__langs a[aria-current="page"] {
  background: var(--white);
  color: var(--bg);
}

.nav__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1.4rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--white);
  font-size: var(--fs-sm);
  font-weight: 600;
  transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}

.nav__cta:hover {
  border-color: var(--white);
  background: var(--white);
  color: var(--bg);
}

.nav__toggle {
  display: none;
  padding: 0.4rem;
  border: 0;
  background: none;
  color: var(--white);
  font-size: 2.6rem;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 900px) {
  .nav__toggle {
    display: block;
    position: relative;
    z-index: 2;
  }

  .nav__brand {
    position: relative;
    z-index: 2;
  }

  .nav__menu {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    background: var(--bg);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
  }

  .nav__menu--open {
    opacity: 1;
    visibility: visible;
  }

  .nav__list {
    flex-direction: column;
    gap: 2.8rem;
  }

  .nav__link {
    font-size: 2.4rem;
    font-weight: 500;
  }

  .nav__cta {
    margin-top: 1rem;
    padding: 1.2rem 2.4rem;
    font-size: var(--fs-md);
  }

  body.menu-open {
    overflow: hidden;
  }
}

/* 5. Hero
   ----------------------------------------------------------------------- */
.hero {
  padding-top: var(--header-h);
}

.hero__wrapper {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(26rem, 0.75fr);
  grid-template-areas:
    "content visual"
    "stats stats";
  align-items: center;
  gap: 5rem 7rem;
  min-height: calc(100svh - var(--header-h));
  padding-block: 5rem;
}

.hero__content {
  grid-area: content;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 2.4rem;
  padding: 0.5rem 1.2rem 0.5rem 1rem;
  border: 1px solid var(--border-strong);
  border-radius: 99rem;
  color: var(--text-strong);
  font-size: 1.3rem;
  font-weight: 500;
}

.status__dot {
  position: relative;
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  background: var(--available);
}

.status__dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--available);
  animation: ping 2s var(--ease) infinite;
}

@keyframes ping {
  0% { transform: scale(1); opacity: 0.6; }
  80%, 100% { transform: scale(2.6); opacity: 0; }
}

.hero__title {
  margin-bottom: 1.4rem;
  font-size: var(--fs-hero);
  line-height: 0.98;
  letter-spacing: -0.02em;
}

.hero__role {
  margin-bottom: 2rem;
  color: var(--text-strong);
  font-size: 1.9rem;
  font-weight: 600;
}

.hero__description {
  max-width: 54rem;
  margin-bottom: 3.2rem;
  color: var(--text-strong);
  font-size: 1.7rem;
  line-height: 1.7;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
}

.hero__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.6rem 2.4rem;
  margin-top: 2.8rem;
}

.socials {
  display: flex;
  gap: 0.8rem;
}

.social {
  display: grid;
  place-items: center;
  width: 4rem;
  height: 4rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-strong);
  font-size: 1.8rem;
  transition: border-color 0.2s, color 0.2s, transform 0.2s;
}

.social:hover {
  border-color: var(--white);
  color: var(--white);
  transform: translateY(-2px);
}

.hero__visual {
  position: relative;
  grid-area: visual;
  justify-self: end;
  width: 100%;
  max-width: 38rem;
}

.hero__visual-frame {
  position: absolute;
  inset: -1.2rem 1.2rem 4rem -1.2rem;
  border: 1px solid var(--border-strong);
  pointer-events: none;
}

.hero__img {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--border-strong);
  object-fit: cover;
  object-position: center 28%;
  filter: grayscale(100%);
  transition: filter 0.6s var(--ease);
}

.hero__visual:hover .hero__img {
  filter: grayscale(0%);
}

.hero__caption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.4rem 1rem;
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: var(--fs-xs);
}

.hero__stats {
  grid-area: stats;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--border);
}

.hero__stat {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 0.4rem;
  padding: 2rem 2rem 0;
}

.hero__stat:first-child {
  padding-inline-start: 0;
}

.hero__stat + .hero__stat {
  border-inline-start: 1px solid var(--border);
}

.hero__stat dd {
  color: var(--white);
  font-size: 3.6rem;
  font-weight: 700;
  line-height: 1;
}

.hero__stat dt {
  font-size: var(--fs-sm);
}

@media (max-width: 900px) {
  .hero__wrapper {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "content"
      "stats"
      "visual";
    min-height: auto;
    gap: 4.4rem;
    padding-block: 4rem 6rem;
  }

  .hero__visual {
    justify-self: center;
    max-width: 32rem;
  }

  .hero__stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero__stat,
  .hero__stat:first-child {
    padding-block: 2rem;
    padding-inline: 0 1.6rem;
    border-bottom: 1px solid var(--border);
  }

  .hero__stat:nth-child(even) {
    padding-inline-start: 1.6rem;
  }

  .hero__stat:nth-child(odd) {
    border-inline-start: 0;
  }
}

@media (max-width: 520px) {
  .hero__stat dd {
    font-size: 3rem;
  }

  .hero__stat dt {
    font-size: var(--fs-xs);
  }

  .hero__actions .btn {
    flex: 1 1 auto;
  }
}

/* 6. About
   ----------------------------------------------------------------------- */
.about {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 6rem;
  align-items: start;
}

.about__title {
  margin-bottom: 2rem;
  font-size: var(--fs-lg);
  line-height: 1.35;
}

.about__content p {
  margin-bottom: 1.6rem;
  color: var(--text-strong);
  line-height: 1.75;
}

.about__facts {
  display: grid;
}

.about__fact {
  display: grid;
  grid-template-columns: 12rem minmax(0, 1fr);
  gap: 1.6rem;
  padding-block: 1.6rem;
  border-top: 1px solid var(--border);
  font-size: var(--fs-sm);
}

.about__fact:last-child {
  border-bottom: 1px solid var(--border);
}

.about__fact dt {
  color: var(--white);
  font-weight: 600;
}

@media (max-width: 900px) {
  .about {
    grid-template-columns: minmax(0, 1fr);
    gap: 3.6rem;
  }
}

@media (max-width: 520px) {
  .about__fact {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.4rem;
  }
}

/* 7. Services
   ----------------------------------------------------------------------- */
.services {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
}

.service {
  display: flex;
  flex-direction: column;
  padding: 3rem 2.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: border-color 0.3s, transform 0.3s var(--ease);
}

.service:hover {
  border-color: var(--border-strong);
  transform: translateY(-4px);
}

.service__icon {
  display: grid;
  place-items: center;
  width: 4.8rem;
  height: 4.8rem;
  margin-bottom: 2.4rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--white);
  font-size: 2.2rem;
}

.service__title {
  margin-bottom: 1rem;
  font-size: var(--fs-lg);
}

.service__description {
  margin-bottom: 2.4rem;
  color: var(--text-strong);
  font-size: var(--fs-sm);
  line-height: 1.7;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: auto;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.chips li {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--text-strong);
  font-size: 1.3rem;
  font-weight: 500;
}

.chips img {
  width: 1.6rem;
  height: 1.6rem;
}

.chips i {
  font-size: 1.6rem;
  line-height: 1;
}

@media (max-width: 1000px) {
  .services {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* 8. Projects
   ----------------------------------------------------------------------- */
.projects .section__header {
  margin-bottom: 3.2rem;
}

.projects .filters {
  margin-bottom: 3.2rem;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.filter {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1.4rem;
  border: 1px solid var(--border-strong);
  border-radius: 99rem;
  background: transparent;
  color: var(--text-strong);
  font-size: var(--fs-sm);
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.filter:hover {
  border-color: var(--white);
}

.filter.is-active {
  border-color: var(--white);
  background: var(--white);
  color: var(--bg);
}

.filter__count {
  opacity: 0.6;
  font-size: var(--fs-xs);
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 30rem), 1fr));
  gap: 1.6rem;
}

.app {
  position: relative;
  display: flex;
  gap: 1.4rem;
  padding: 1.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: border-color 0.2s, background-color 0.2s;
}

.app:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
}

.app[hidden] {
  display: none;
}

.app__icon {
  flex: 0 0 auto;
  width: 5.2rem;
  height: 5.2rem;
  border: 1px solid var(--border);
  border-radius: 1.1rem;
  background: var(--white); /* some logos are dark artwork on transparency */
  object-fit: cover;
}

/* Shown in place of an app icon that fails to load */
.icon-fallback {
  display: grid;
  place-items: center;
  color: var(--white);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, #2a2a2a, #151515);
}

.app__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.app__name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.8rem;
  font-size: var(--fs-md);
}

.app__role {
  padding: 0.1rem 0.7rem;
  border: 1px solid var(--border-strong);
  border-radius: 99rem;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.app__meta {
  margin-top: 0.2rem;
  color: var(--text);
  font-size: var(--fs-xs);
}

.app__description {
  margin-top: 0.8rem;
  color: var(--text-strong);
  font-size: 1.35rem;
  line-height: 1.55;
}

.app--featured {
  border-color: var(--border-strong);
}

.app__flag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
  color: var(--white);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.app__tags {
  margin-top: 1rem;
}

.app__links--note {
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  font-weight: 500;
}

.app--link {
  cursor: pointer;
}

.app__main-link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.app--link:hover .app__main-link {
  text-decoration: underline;
  text-underline-offset: 0.4rem;
}

.app__main-link:focus-visible {
  outline: none;
}

.app:has(.app__main-link:focus-visible) {
  outline: 2px solid var(--white);
  outline-offset: 3px;
}

.app__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.6rem;
  margin-top: auto;
  padding-top: 1.2rem;
  font-size: var(--fs-xs);
  font-weight: 600;
}

.app__links a {
  position: relative; /* above the card-wide link */
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--text-strong);
  transition: color 0.2s;
}

.app__links a:hover {
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 0.3rem;
}

.apps__more {
  display: flex;
  margin: 3.2rem auto 0;
}

.apps__more[hidden] {
  display: none;
}

/* 9. Experience
   ----------------------------------------------------------------------- */
.experience {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
  gap: 6rem;
}

.timeline-block__title {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 3.2rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--border);
  font-size: var(--fs-lg);
}

.timeline-block__title i {
  color: var(--text);
  font-weight: 400;
}

.timeline {
  position: relative;
  display: grid;
  gap: 3.2rem;
  padding-inline-start: 2.8rem;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0.6rem;
  bottom: 0.6rem;
  inset-inline-start: 0.4rem;
  width: 1px;
  background: var(--border-strong);
}

.timeline__item {
  position: relative;
}

.timeline__item::before {
  content: "";
  position: absolute;
  top: 0.55rem;
  inset-inline-start: -2.8rem;
  width: 0.9rem;
  height: 0.9rem;
  border: 1px solid var(--white);
  border-radius: 50%;
  background: var(--bg);
}

.timeline__item:first-child::before {
  background: var(--white);
}

.timeline__date {
  display: block;
  margin-bottom: 0.6rem;
  color: var(--text);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.timeline__title {
  font-size: 1.8rem;
}

.timeline__org {
  margin-top: 0.2rem;
  color: var(--text-strong);
  font-size: var(--fs-sm);
  font-weight: 500;
}

.timeline__description {
  margin-top: 0.8rem;
  font-size: var(--fs-sm);
  line-height: 1.7;
}

.experience__cv {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.6rem 2.4rem;
  margin-top: 4rem;
}

@media (max-width: 900px) {
  .experience {
    grid-template-columns: minmax(0, 1fr);
    gap: 5rem;
  }
}

/* 10. Contact
   ----------------------------------------------------------------------- */
.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 6rem;
  align-items: center;
}

.contact__title {
  margin-bottom: 1.6rem;
  font-size: var(--fs-xl);
  letter-spacing: -0.01em;
}

.contact__lead {
  max-width: 46rem;
  margin-bottom: 3rem;
  color: var(--text-strong);
}

.contact__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
}

.contact__list {
  display: grid;
  gap: 1.2rem;
}

.contact__item {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  padding: 1.6rem 2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--white);
  font-weight: 500;
  overflow-wrap: anywhere;
  transition: border-color 0.2s, transform 0.2s;
}

.contact__item:hover {
  border-color: var(--border-strong);
  transform: translateX(4px);
}

.contact__item i {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 4.4rem;
  height: 4.4rem;
  border-radius: var(--radius);
  background: var(--surface-2);
  font-size: 2rem;
}

.contact__item span {
  display: grid;
}

.contact__item small {
  color: var(--text);
  font-size: var(--fs-xs);
  font-weight: 400;
}

@media (max-width: 900px) {
  .contact {
    grid-template-columns: minmax(0, 1fr);
    gap: 4rem;
  }
}

/* 11. Footer & back-to-top
   ----------------------------------------------------------------------- */
.footer {
  padding-block: 3.2rem;
  font-size: var(--fs-sm);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.6rem;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 2.4rem;
}

.footer__links a {
  transition: color 0.2s;
}

.footer__links a:hover {
  color: var(--white);
}

.to-top {
  position: fixed;
  right: 2.4rem;
  bottom: 2.4rem;
  z-index: 900;
  display: grid;
  place-items: center;
  width: 4.6rem;
  height: 4.6rem;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: rgba(17, 17, 17, 0.9);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--white);
  font-size: 2rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(1rem);
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s var(--ease), border-color 0.2s;
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.to-top:hover {
  border-color: var(--white);
}

@media (max-width: 520px) {
  .to-top {
    right: 1.6rem;
    bottom: 1.6rem;
  }
}

/* 12. Motion
   ----------------------------------------------------------------------- */
.js .reveal {
  opacity: 0;
  transform: translateY(2.4rem);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

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

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation: none !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

/* 13. Right-to-left pages (Arabic & Kurdish)
   ----------------------------------------------------------------------- */
html[dir="rtl"] {
  --ff: "Space Grotesk", "Noto Sans Arabic", system-ui, sans-serif;
}

html[dir="rtl"] body {
  line-height: 1.8;
}

/* Letter-spacing breaks joined Arabic-script letters apart. */
html[dir="rtl"] *,
html[dir="rtl"] *::before {
  letter-spacing: 0 !important;
}

html[dir="rtl"] .nav__link::after {
  transform-origin: right;
}

html[dir="rtl"] .hero__visual-frame {
  inset: -1.2rem -1.2rem 4rem 1.2rem;
}

html[dir="rtl"] .contact__item:hover {
  transform: translateX(-4px);
}

html[dir="rtl"] .ri-arrow-right-up-line,
html[dir="rtl"] .ri-arrow-right-line {
  display: inline-block;
  transform: scaleX(-1);
}

/* Keep "6+", "25K+" reading left-to-right inside RTL text. */
html[dir="rtl"] .hero__stat dd {
  direction: ltr;
  text-align: right;
}
