/* =========================================================
   FONT — Peyda Variable (single file, weight 100–950)
   ========================================================= */
@font-face {
  font-family: 'Peyda';
  src: url('assets/fonts/PeydaWebVF.woff2') format('woff2-variations'),
       url('assets/fonts/PeydaWebVF.woff2') format('woff2');
  font-weight: 100 950;
  font-style: normal;
  font-display: swap;
}

/* =========================================================
   DESIGN TOKENS — derived from the locked Figma system.
   Motion tokens reintroduced this session (refinement pass) —
   were intentionally stripped during the multi-page pivot while
   structure/functionality took priority. Re-added now that all
   9 case studies are structurally complete and Saeed has
   approved moving into animation/interaction.
   ========================================================= */
:root {
  /* Color */
  --color-bg:            #F7F5F2; /* page background */
  --color-surface:       #FCFBF9; /* cards, nav, placeholder fill */
  --color-placeholder:   #F0EEEB; /* image/media placeholder field */
  --color-text-primary:  #1B1B1B;
  --color-text-secondary:#6C6C6C;
  --color-text-muted:    #BFBAB4; /* row numbers, faint numerals */
  --color-border:        #E7E3DD;
  --color-black:         #111111; /* case-study hero backgrounds (intentional exception) */
  --color-white:         #FFFFFF;

  /* Type */
  --font-main: 'Peyda', 'Vazirmatn', sans-serif;
  --fs-display:    4rem;      /* 64px — hero name */
  --fs-h1:         2.75rem;   /* 44px */
  --fs-h2:         1.75rem;   /* 28px — project names */
  --fs-body-lg:    1.125rem;  /* 18px */
  --fs-body:       1rem;      /* 16px */
  --fs-small:      0.875rem;  /* 14px */
  --fs-caption:    0.8125rem; /* 13px — eyebrows, nav */
  --fs-micro:      0.75rem;   /* 12px */
  --fs-tiny:       0.625rem;  /* 10px */

  --fw-regular: 400;
  --fw-medium:  500;
  --fw-semibold:600;
  --fw-bold:    700;

  --lh-tight: 1.1;
  --lh-normal: 1.5;
  --lh-loose: 1.8;

  /* Spacing scale (used for gaps, padding, section rhythm) */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;
  --sp-9: 96px;
  --sp-10: 140px;   /* default breathing room between major sections */
  --sp-10-tight: 96px; /* reduced variant, e.g. list-style sections */

  /* Radius — set to 0 sitewide per Saeed's direction (square edges
     everywhere, especially image/media containers). Tokens kept
     (rather than deleted) so every consumer — hero panel, index
     thumbnails, about photo, gallery cells, related/category cards,
     FAQ container — still reads from one source of truth if this
     ever needs to change again. Fully circular/pill elements (CTA
     buttons, slider dots, FAQ icon, AUTO chip) are NOT driven by
     these tokens — they use explicit 999px/50% values, a different
     UI idiom (buttons/indicators, not card corners), and are
     intentionally left untouched. */
  --radius-lg: 0px;
  --radius-md: 0px;
  --radius-sm: 0px;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 200ms;
  --dur-base: 400ms;
  --dur-slow: 700ms;

  /* Layout */
  --nav-h: 64px;
  --content-max: 1440px;
  --margin-x: 80px;
}

@media (prefers-reduced-motion: reduce) {
  :root { --dur-fast: 0ms; --dur-base: 0ms; --dur-slow: 0ms; }
}

/* =========================================================
   RESET
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text-primary);
  font-family: var(--font-main);
  font-weight: var(--fw-regular);
  line-height: var(--lh-normal);
  -webkit-font-smoothing: antialiased;
}

img, svg, video { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* visible keyboard focus everywhere — accessibility floor */
:focus-visible {
  outline: 2px solid var(--color-text-primary);
  outline-offset: 3px;
}

.container {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--margin-x);
}

/* =========================================================
   NAV — fixed, shared across every page (injected by nav.js)
   ========================================================= */
.nav {
  position: fixed;
  inset-inline: 0;
  top: 0;
  height: var(--nav-h);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  z-index: 100;
  /* Scroll-awareness (animation depth pass): border-bottom stays
     constant at all times — it already provides resting-state
     separation on every page, including case-study pages with a
     black hero directly beneath the nav — only a soft drop shadow
     is added once scrolled, toggled via .is-scrolled in nav.js.
     Contrast never changes, just depth. */
  transition: box-shadow var(--dur-base) var(--ease-out);
}
.nav.is-scrolled {
  box-shadow: 0 12px 24px -16px rgba(17, 17, 17, 0.18);
}
.nav__inner {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--margin-x);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* Lock physical order (lang left, logo right) — RTL flex would
     otherwise reverse DOM order and swap these. Text inside stays RTL. */
  direction: ltr;
}
.nav__logo {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  color: var(--color-text-primary);
  /* Defensive: keeps the logo pinned right even when .nav__links is
     hidden on mobile (space-between with a single remaining flex
     item would otherwise collapse it to the left edge). Harmless
     on desktop where space-between already puts it there. */
  margin-inline-start: auto;
}
.nav__logo svg { height: 28px; width: auto; }
.nav__logo-name {
  font-family: 'Inter', 'Arial', sans-serif;
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.nav__links {
  display: flex;
  gap: var(--sp-5);
  list-style: none;
  margin: 0; padding: 0;
  font-size: var(--fs-caption);
  font-weight: var(--fw-medium);
  color: var(--color-text-secondary);
  direction: rtl; /* restore correct reading order for the Persian labels */
}
.nav__links a {
  position: relative;
  transition: color var(--dur-fast) var(--ease-out);
}
.nav__links a:hover { color: var(--color-text-primary); }
/* Active-section indicator (animation depth pass) — underline, driven
   by scroll-spy in nav.js on the Home page only. Also appears on
   hover everywhere (including case-study pages, where it's just a
   hover cue since there's no section to spy on) for one consistent
   underline language. */
.nav__links a::after {
  content: "";
  position: absolute;
  right: 0;
  left: 0;
  bottom: -8px;
  height: 2px;
  background: var(--color-text-primary);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--dur-base) var(--ease-out);
}
.nav__links a:hover::after,
.nav__links a.is-active::after {
  transform: scaleX(1);
}
.nav__links a.is-active { color: var(--color-text-primary); }

/* --- Mobile nav: hamburger toggle + dropdown panel (NEW) ---
   .nav__links is hidden below 900px (see mobile block further down);
   this button takes its place in the same physical slot. Panel drops
   from directly under the fixed nav, sharing the same surface/border
   language as the nav bar itself so it reads as one continuous piece
   of chrome rather than a separate floating element. */
.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
}
.nav__toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-text-primary);
  transition: transform var(--dur-fast) var(--ease-out), opacity var(--dur-fast) var(--ease-out);
}
.nav.is-menu-open .nav__toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.is-menu-open .nav__toggle-bar:nth-child(2) { opacity: 0; }
.nav.is-menu-open .nav__toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav__mobile-menu {
  position: fixed;
  top: var(--nav-h);
  inset-inline: 0;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--dur-base) var(--ease-out);
  z-index: 99;
}
.nav.is-menu-open .nav__mobile-menu { max-height: 260px; }
.nav__mobile-links { list-style: none; margin: 0; padding: 0 var(--sp-5); direction: rtl; }
.nav__mobile-links li { border-bottom: 1px solid var(--color-border); }
.nav__mobile-links li:last-child { border-bottom: none; }
.nav__mobile-links a {
  display: block;
  padding: var(--sp-4) var(--sp-1);
  font-size: var(--fs-body-lg);
  font-weight: var(--fw-medium);
  color: var(--color-text-primary);
  text-align: right;
}
.nav__mobile-links a.is-active { color: var(--color-text-secondary); }

/* =========================================================
   SECTION DIVIDER — breathing room between major sections.
   Ghost-number wayfinding variant removed (was unused, tied
   to the old animation-era wayfinding idea).
   ========================================================= */
.section-divider {
  height: var(--sp-10);
  background: var(--color-bg);
  position: relative;
}
.section-divider--tight { height: var(--sp-10-tight); }
/* --accent previously washed from --color-bg to --color-border via a
   linear-gradient, creating a visible shadow band at the Hero→Index
   and Index→About boundaries. Removed per Saeed — page background
   now stays fully uniform (--color-bg) across Hero/Index/About; only
   the thin 1px hairline below marks the boundary. */
.section-divider--accent::before {
  content: "";
  position: absolute;
  left: var(--margin-x);
  right: var(--margin-x);
  top: 50%;
  height: 1px;
  background: var(--color-border);
  transform: translateY(-50%);
}

/* =========================================================
   HERO — Stage 2 rebuild per the new Figma export ("Home
   page" frame). Two real changes from the old full-viewport
   version: (1) fixed compact height instead of 100vh — this
   is now one section among several on a normal scrolling
   page, not a full-screen intro slide; (2) the illustration
   is a CONTAINED, rounded, inset panel (matches the card
   language used everywhere else — project thumbnails, About
   photo — instead of the old edge-to-edge full-bleed dark
   panel. No CTA button here anymore (dropped per Saeed —
   Project Index and nav links already provide the way in).
   Text order also flipped: name leads, small role label sits
   under it (not above), confirmed against the export.
   ========================================================= */
.hero {
  position: relative;
  padding-top: var(--nav-h);
  height: 723px;
  background: var(--color-bg);
  overflow: hidden;
}
.hero__grid {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--margin-x);
  display: grid;
  grid-template-columns: 48% 1fr;
  column-gap: var(--sp-8);
  align-items: center;
  height: calc(723px - var(--nav-h));
  direction: ltr;
}
.hero__illu-col {
  position: relative;
  height: calc(100% - var(--sp-8) * 2);
  border-radius: var(--radius-lg);
  background: var(--color-black);
  overflow: hidden;
}
.hero__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.hero__content-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-inline-end: var(--margin-x);
  text-align: right;
  direction: rtl;
}
.hero__name { font-size: var(--fs-display); font-weight: var(--fw-bold); line-height: var(--lh-tight); margin: 0; }
.hero__greeting { max-width: 540px; font-size: var(--fs-h1); font-weight: var(--fw-bold); line-height: var(--lh-tight); margin: 0; }
.hero__welcome { margin-top: var(--sp-4); font-size: var(--fs-h2); font-weight: var(--fw-medium); color: var(--color-text-primary); line-height: var(--lh-tight); }
.hero__keywords { margin-top: var(--sp-5); font-size: var(--fs-body); color: var(--color-text-secondary); letter-spacing: 0.02em; }
.hero__eyebrow { margin-top: var(--sp-3); font-size: var(--fs-caption); font-weight: var(--fw-medium); color: var(--color-text-secondary); letter-spacing: 0.05em; }
.hero__deco-line { width: 100%; max-width: 220px; height: 1px; background: var(--color-border); margin: var(--sp-3) 0 0 auto; }
.hero__bio { margin-top: var(--sp-5); max-width: 460px; font-size: var(--fs-body); line-height: var(--lh-loose); color: var(--color-text-secondary); }
.hero__rule { width: 100%; max-width: 460px; height: 1px; background: var(--color-border); margin-top: var(--sp-6); }

.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-6);
  background: transparent;
  border: 1px solid var(--color-text-primary);
  border-radius: 999px;
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  color: var(--color-text-primary);
  margin-top: var(--sp-6);
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.hero__cta:hover { background: var(--color-text-primary); color: var(--color-white); }
.hero__cta-arrow { display: inline-flex; }

.hero__stats { display: flex; justify-content: flex-start; gap: var(--sp-7); margin-top: var(--sp-6); width: 100%; max-width: 460px; }
.hero__stat { text-align: center; }
.hero__stat-num { display: block; font-size: var(--fs-h2); font-weight: var(--fw-bold); }
.hero__stat-label { display: block; margin-top: var(--sp-2); font-size: var(--fs-caption); color: var(--color-text-secondary); }

@media (max-width: 900px) {
  .hero { height: auto; }
  .hero__grid { grid-template-columns: 1fr; height: auto; padding-inline: 0; padding-block: var(--sp-6); }
  .hero__illu-col { height: 320px; margin: 0 var(--sp-5); }
  .hero__content-col { text-align: center; align-items: center; padding: var(--sp-7) var(--sp-5) 0; }
  .hero__greeting, .hero__welcome, .hero__deco-line, .hero__bio, .hero__rule, .hero__stats { margin-inline: auto; }
  .nav__links { display: none; }
  .nav__toggle { display: flex; }
  :root { --margin-x: 24px; }
}

/* =========================================================
   SCROLL REVEAL — reintroduced this session. Elements marked
   [data-reveal] fade/slide up once, the first time they enter
   the viewport (driven by interactions.js). Repeating groups
   (category cards, gallery cells, related cards) get a light
   staggered delay via nth-child below, rather than needing
   per-item inline delays authored into every HTML file.
   ========================================================= */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
}
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

.case-categories__grid > [data-reveal]:nth-child(1) { transition-delay: 0ms; }
.case-categories__grid > [data-reveal]:nth-child(2) { transition-delay: 80ms; }
.case-categories__grid > [data-reveal]:nth-child(3) { transition-delay: 160ms; }
.case-related__grid > [data-reveal]:nth-child(1) { transition-delay: 0ms; }
.case-related__grid > [data-reveal]:nth-child(2) { transition-delay: 80ms; }
.case-related__grid > [data-reveal]:nth-child(3) { transition-delay: 160ms; }
.case-gallery__grid > [data-reveal]:nth-child(1) { transition-delay: 0ms; }
.case-gallery__grid > [data-reveal]:nth-child(2) { transition-delay: 50ms; }
.case-gallery__grid > [data-reveal]:nth-child(3) { transition-delay: 100ms; }
.case-gallery__grid > [data-reveal]:nth-child(4) { transition-delay: 150ms; }
.case-gallery__grid > [data-reveal]:nth-child(5) { transition-delay: 200ms; }
.case-gallery__grid > [data-reveal]:nth-child(6) { transition-delay: 250ms; }
.case-gallery__grid > [data-reveal]:nth-child(7) { transition-delay: 300ms; }
.case-gallery__grid > [data-reveal]:nth-child(8) { transition-delay: 350ms; }
.case-gallery__grid > [data-reveal]:nth-child(9) { transition-delay: 400ms; }
.case-gallery__grid > [data-reveal]:nth-child(10) { transition-delay: 450ms; }
.case-gallery__grid > [data-reveal]:nth-child(11) { transition-delay: 500ms; }
.case-gallery__grid > [data-reveal]:nth-child(12) { transition-delay: 550ms; }
.case-gallery__grid > [data-reveal]:nth-child(13) { transition-delay: 600ms; }
.case-gallery__grid > [data-reveal]:nth-child(14) { transition-delay: 650ms; }
.case-gallery__grid > [data-reveal]:nth-child(15) { transition-delay: 700ms; }
.case-gallery__grid > [data-reveal]:nth-child(16) { transition-delay: 750ms; }

/* =========================================================
   HOVER MEDIA ZOOM — subtle scale-up on the image/placeholder
   fill inside any browsable card. Works identically on live
   <img> and placeholder divs, so it already looks right and
   needs no changes once real assets replace placeholders.
   ========================================================= */
.index-item__thumb-wrap img, .index-item__thumb-wrap .placeholder,
.case-gallery__cell img, .case-gallery__cell .placeholder,
.case-related__card img, .case-related__card .placeholder {
  transition: transform var(--dur-slow) var(--ease-out);
}
.index-item:hover .index-item__thumb-wrap img, .index-item:hover .index-item__thumb-wrap .placeholder,
.case-gallery__cell:hover img, .case-gallery__cell:hover .placeholder,
.case-related__card:hover img, .case-related__card:hover .placeholder {
  transform: scale(1.035);
}
.index-item__name, .index-item__arrow { transition: color var(--dur-fast) var(--ease-out); }
.case-categories__card {
  transition: border-color var(--dur-fast) var(--ease-out),
              transform var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out);
}
.case-categories__card:hover {
  border-color: var(--color-text-primary);
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -14px rgba(17, 17, 17, 0.16);
}

/* Gallery cells (animation depth pass) — soft lift + shadow, layered
   with the existing image-zoom above. Applies identically to flat
   .case-gallery grids and per-category grids (same class, reused),
   including slider cells — the lift pairs naturally with the
   existing pause-on-hover behavior. */
.case-gallery__cell {
  transition: transform var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out);
}
.case-gallery__cell:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px -18px rgba(17, 17, 17, 0.2);
}

/* =========================================================
   PLACEHOLDER — generic media placeholder (crosshair + label)
   ========================================================= */
.placeholder {
  position: relative;
  background: var(--color-placeholder);
  border: 1px dashed var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.placeholder::before, .placeholder::after { content: ""; position: absolute; background: var(--color-border); }
.placeholder::before { top: 0; bottom: 0; left: 50%; width: 1px; }
.placeholder::after   { left: 0; right: 0; top: 50%; height: 1px; }
.placeholder__label {
  position: relative;
  z-index: 1;
  font-size: var(--fs-micro);
  color: var(--color-text-secondary);
  background: var(--color-placeholder);
  padding: var(--sp-1) var(--sp-2);
  text-align: center;
}
.placeholder--on-dark { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.18); }
.placeholder--on-dark::before, .placeholder--on-dark::after { background: rgba(255,255,255,0.18); }
.placeholder--on-dark .placeholder__label { color: rgba(255,255,255,0.55); background: transparent; }

/* =========================================================
   PROJECT INDEX — Stage 2 rebuild. Replaces the old full-width
   row-list (image only on hover) with the new paired 2-up
   thumbnail grid confirmed against the "Home page" Figma
   export: every project gets a real, always-visible 632×474
   thumbnail (matching the card language used everywhere else
   on the site — same size as the About photo), with its
   name/number + category tags directly underneath. No more
   black header band — the section intro sits directly on the
   page background. 9 projects → four paired rows + one final
   single row (the odd one out), reading right-to-left in DOM
   order, no direction override needed since paired columns
   are visually interchangeable.
   ========================================================= */
.project-index { background: var(--color-bg); }

.index-intro {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--margin-x);
  padding-block: var(--sp-9) var(--sp-7);
  text-align: right;
}
.index-intro__title { font-size: var(--fs-h1); font-weight: var(--fw-bold); margin: 0; }
.index-intro__desc {
  margin-top: var(--sp-3);
  /* BUG FIX (refinement pass): was margin-inline-start: auto, which
     in this rtl-inherited context pushed the box toward the LEFT
     edge instead of pinning it flush-right under the title — the
     exact "auto-margin on the wrong side" trap documented elsewhere
     on this site (see .case-brief__text). margin-inline-end: auto
     absorbs space on the physical-left side instead, keeping the
     box flush right. */
  margin-inline-end: auto;
  max-width: 560px;
  font-size: var(--fs-body);
  color: var(--color-text-secondary);
}

.index-grid {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--margin-x);
  display: flex;
  flex-direction: column;
}
.index-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-7);
  padding-block: var(--sp-8);
  border-bottom: 1px solid var(--color-border);
}
.index-row:first-child { padding-top: 0; }
.index-row--single { grid-template-columns: 1fr 1fr; }
.index-row--single .index-item { grid-column: 1; }

.index-item { display: block; }
.index-item__thumb-wrap {
  position: relative;
  aspect-ratio: 632 / 474;
  border-radius: var(--radius-md);
  overflow: hidden;
}
.index-item__thumb-wrap .placeholder,
.index-item__thumb-wrap img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.index-item__meta {
  margin-top: var(--sp-4);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  direction: rtl;
  gap: var(--sp-4);
}
.index-item__name-block { display: flex; align-items: baseline; gap: var(--sp-2); flex-shrink: 0; }
.index-item__num { font-size: var(--fs-caption); color: var(--color-text-muted); font-weight: var(--fw-medium); }
.index-item__name { font-size: var(--fs-h2); font-weight: var(--fw-bold); color: var(--color-text-primary); white-space: nowrap; }
.index-item__cats {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: var(--sp-3);
  font-size: var(--fs-small);
  color: var(--color-text-secondary);
  text-align: left;
}
.index-item__arrow { flex-shrink: 0; color: var(--color-text-muted); }
.index-item:hover .index-item__name { color: var(--color-text-primary); }
.index-item:hover .index-item__arrow { color: var(--color-text-primary); }

@media (max-width: 900px) {
  .index-intro { padding-block: var(--sp-7) var(--sp-6); }
  .index-intro__title { font-size: 2.25rem; }
  .index-row { grid-template-columns: 1fr; gap: var(--sp-6); padding-block: var(--sp-6); }
  .index-row--single .index-item { grid-column: 1; }
  /* Categories reintroduced (full mobile pass) — desktop's single-row
     flex (name / cats / arrow, space-between) is too cramped at this
     width, so name+arrow keep their row and categories wrap onto a
     second line below, spanning full width regardless of DOM order. */
  .index-item__meta {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas: "name arrow" "cats cats";
    row-gap: var(--sp-2);
  }
  .index-item__name-block { grid-area: name; }
  .index-item__arrow { grid-area: arrow; }
  .index-item__cats {
    grid-area: cats;
    display: block;
    text-align: right;
    justify-content: normal;
  }
}

/* =========================================================
   FAQ / "GET TO KNOW ME" ACCORDION — new section, added between
   Project Index and About & Contact per Saeed's reference video
   (a black-background FAQ accordion seen on another portfolio
   site). Structure/behavior matched as closely as possible:
   single rounded container holding N stacked rows (not separate
   cards), hairline dividers between rows, single-item-open
   accordion, +/× icon rotation, smooth grid-based height
   animation (no JS height measurement). Black background — same
   intentional palette exception as case-study heroes and the
   Related-projects strip, so no section-divider hairline is
   needed before/after this section; the color shift itself marks
   the boundary (same convention used at Hero→case-hero and
   case-related→footer elsewhere in the codebase).
   Content is placeholder — draft questions written for Saeed's
   review at the content-writing stage, not final copy.
   ========================================================= */
.faq { background: var(--color-black); padding-block: var(--sp-10); }
.faq__intro {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--margin-x);
  padding-bottom: var(--sp-7);
  text-align: right;
}
.faq__intro .hero__eyebrow { color: rgba(255,255,255,0.55); }
.faq__intro .hero__deco-line { background: rgba(255,255,255,0.18); margin-inline: 0 auto; }
.faq__title {
  margin-top: var(--sp-3);
  font-size: var(--fs-h1);
  font-weight: var(--fw-bold);
  color: var(--color-white);
}

.faq__list {
  max-width: 860px;
  margin-inline: auto;
  padding-inline: var(--margin-x);
}
.faq__item {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
}
.faq__item:first-child { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.faq__item:last-child { border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.faq__item + .faq__item { border-top: none; }

.faq__question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
  padding: var(--sp-5) var(--sp-6);
  background: none;
  border: none;
  text-align: right;
  font-family: inherit;
  font-size: var(--fs-body-lg);
  font-weight: var(--fw-medium);
  color: var(--color-white);
  transition: background var(--dur-fast) var(--ease-out);
}
.faq__item:hover .faq__question { background: rgba(255,255,255,0.02); }

.faq__icon {
  position: relative;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.22);
  transition: transform var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out);
}
.faq__icon::before, .faq__icon::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  background: rgba(255,255,255,0.85);
  transition: transform var(--dur-base) var(--ease-out);
}
.faq__icon::before { width: 12px; height: 1px; transform: translate(-50%, -50%); }
.faq__icon::after { width: 1px; height: 12px; transform: translate(-50%, -50%); }
.faq__item.is-open .faq__icon { transform: rotate(45deg); border-color: rgba(255,255,255,0.4); }

/* Smooth height animation via CSS grid — 0fr → 1fr on the wrapper,
   with a single overflow:hidden child. Avoids JS scrollHeight
   measurement (fragile if answer copy changes length later). */
.faq__answer-wrap {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--dur-slow) var(--ease-out);
}
.faq__answer-inner { overflow: hidden; }
.faq__answer {
  margin: 0;
  padding: 0 var(--sp-6) var(--sp-5);
  max-width: 640px;
  margin-inline-start: auto;
  font-size: var(--fs-body);
  line-height: var(--lh-loose);
  color: rgba(255,255,255,0.55);
  opacity: 0;
  transition: opacity var(--dur-fast) var(--ease-out);
}
.faq__item.is-open .faq__answer-wrap { grid-template-rows: 1fr; }
.faq__item.is-open .faq__answer { opacity: 1; transition: opacity var(--dur-base) var(--ease-out) var(--dur-fast); }

.faq__list > [data-reveal]:nth-child(1) { transition-delay: 0ms; }
.faq__list > [data-reveal]:nth-child(2) { transition-delay: 60ms; }
.faq__list > [data-reveal]:nth-child(3) { transition-delay: 120ms; }
.faq__list > [data-reveal]:nth-child(4) { transition-delay: 180ms; }
.faq__list > [data-reveal]:nth-child(5) { transition-delay: 240ms; }

@media (max-width: 900px) {
  .faq { padding-block: var(--sp-8); }
  .faq__intro, .faq__list { padding-inline: var(--sp-5); }
  .faq__title { font-size: 2.25rem; }
  .faq__question { padding: var(--sp-4) var(--sp-4); font-size: var(--fs-body); }
  .faq__answer { padding-inline: var(--sp-4); }
}

/* =========================================================
   ABOUT & CONTACT — Stage 2 recompose per the new Figma
   export. No longer a full-height 65/35 split with the photo
   stretching the whole section — content now reads as a
   compact stacked block (bio → approach → rule → availability
   → email → LinkedIn → CTA) on the right, with the portrait
   photo sized to the SAME 632×474 block used for project
   thumbnails (visual consistency with the Index grid above
   it) and bottom-aligned against the text column rather than
   spanning the full section height.
   LinkedIn line + CTA button confirmed KEPT (Saeed, this
   session) even though the Figma export didn't show them —
   don't drop these on a future Figma-vs-doc conflict without
   checking back first.
   ========================================================= */
.about { background: var(--color-bg); padding-block: var(--sp-9) var(--sp-10); }
.about__inner {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--margin-x);
  display: grid;
  grid-template-columns: 1fr 632px;
  column-gap: var(--sp-9);
  align-items: start;
  direction: ltr;
}
.about__content-col { direction: rtl; text-align: right; }
.about__photo-col {
  position: relative;
  width: 632px;
  height: 474px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-black);
}
.about__photo-col img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  /* Source photo is square (2891x2891); this slot is 4:3 landscape, so the
     browser crops vertically. Default 50% center would crop into the
     hairline — biased toward the top instead so there's a touch of
     headroom above the head and the crop reads as a natural headshot. */
  object-position: center 8%;
}
.about__photo-col .placeholder { position: absolute; inset: 0; }
.about__text { margin-top: var(--sp-5); max-width: 460px; font-size: var(--fs-body); line-height: var(--lh-loose); color: var(--color-text-secondary); }
.about__content-col .hero__name { margin-top: var(--sp-5); font-size: var(--fs-h1); }
.about__rule { width: 100%; max-width: 460px; height: 1px; background: var(--color-border); margin-top: var(--sp-6); }
.about__contact-row { display: flex; align-items: baseline; gap: var(--sp-3); margin-top: var(--sp-3); }
.about__contact-row:first-of-type { margin-top: var(--sp-5); }
.about__contact-label { font-size: var(--fs-caption); color: var(--color-text-secondary); flex-shrink: 0; }
.about__contact-value { font-size: var(--fs-body); font-weight: var(--fw-medium); color: var(--color-text-primary); transition: opacity var(--dur-fast) var(--ease-out); }
.about__contact-value:hover { opacity: 0.6; }

@media (max-width: 900px) {
  .about { padding-block: var(--sp-7); }
  .about__inner { grid-template-columns: 1fr; direction: rtl; row-gap: var(--sp-7); padding-inline: var(--sp-5); }
  .about__photo-col { width: 100%; height: auto; aspect-ratio: 632 / 474; }
  .about__content-col { text-align: center; align-items: center; }
  .about__text, .about__rule { margin-inline: auto; }
  .about__contact-row { justify-content: center; }
}

/* =========================================================
   CASE STUDY TEMPLATE — Stage 3 rebuild. VAMCO is the first
   real page built from this template (own vamco.html, no
   longer embedded in the Home page) and it becomes the literal
   template for cases 2–9: generic .case-* class names, not
   .vamco-*. Two structural changes from the old embedded
   version, per the new Figma export: (1) gallery simplified
   from a 5-row VARIED grid (full/half/triple/asym/cinematic)
   to UNIFORM stacked 16:9 rows — same system for every future
   case study, only row count varies per project; (2) no more
   page-local prev/next footer — every case-study page just
   ends into the shared site footer (nav.js/footer.js), same
   as Home. .case-hero__media now also supports a real <img>
   (VAMCO has one), not just the placeholder — future case
   studies without assets yet fall back to placeholder--on-dark.
   ========================================================= */
.case-hero { position: relative; height: 600px; background: var(--color-black); overflow: hidden; }
.case-hero__grid { display: grid; grid-template-columns: 50% 1fr; height: 100%; direction: ltr; }
.case-hero__media { position: relative; overflow: hidden; }
.case-hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.case-hero__media .placeholder--on-dark { position: absolute; inset: 0; border-width: 0 1px 0 0; }
.case-hero__content {
  direction: rtl;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  text-align: right;
  padding-inline-end: var(--sp-6);
  padding-inline-start: max(var(--margin-x), calc((100vw - var(--content-max)) / 2 + var(--margin-x)));
}
.case-hero__eyebrow-row { font-size: var(--fs-caption); color: rgba(255,255,255,0.55); line-height: var(--lh-normal); }
.case-hero__eyebrow-row span { display: block; }
.case-hero__title { margin-top: var(--sp-4); font-size: clamp(3rem, 7vw, 6rem); font-weight: var(--fw-bold); line-height: var(--lh-tight); color: var(--color-white); letter-spacing: 0.01em; }
.case-hero__subtitle { margin-top: var(--sp-4); font-size: var(--fs-h2); font-weight: var(--fw-regular); line-height: var(--lh-normal); color: rgba(255,255,255,0.85); }
.case-hero__rule { width: 100%; max-width: 340px; height: 1px; background: rgba(255,255,255,0.18); margin-top: var(--sp-5); }
.case-hero__meta { margin-top: var(--sp-4); font-size: var(--fs-small); color: rgba(255,255,255,0.55); }

.case-brief { background: var(--color-surface); padding-block: var(--sp-9); }
.case-brief__grid { max-width: var(--content-max); margin-inline: auto; padding-inline: var(--margin-x); display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-8); direction: ltr; }
.case-brief__col { direction: rtl; text-align: right; }
.case-brief__heading { font-size: var(--fs-caption); font-weight: var(--fw-medium); color: var(--color-text-secondary); letter-spacing: 0.03em; }
.case-brief__text { margin-top: var(--sp-4); max-width: 480px; margin-inline-end: auto; font-size: var(--fs-body-lg); line-height: var(--lh-loose); color: var(--color-text-secondary); }
.case-brief__list { margin-top: var(--sp-4); list-style: none; padding: 0; display: flex; flex-direction: column; gap: var(--sp-3); }
.case-brief__list li { font-size: var(--fs-body); color: var(--color-text-primary); }

.case-gallery { background: var(--color-bg); padding-block: var(--sp-9); }
.case-gallery__header { max-width: var(--content-max); margin-inline: auto; padding-inline: var(--margin-x); padding-bottom: var(--sp-6); text-align: right; font-size: var(--fs-caption); font-weight: var(--fw-medium); color: var(--color-text-secondary); letter-spacing: 0.03em; }
.case-gallery__grid { max-width: var(--content-max); margin-inline: auto; padding-inline: var(--margin-x); display: flex; flex-direction: column; gap: var(--sp-5); }
.case-gallery__cell {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  aspect-ratio: 16 / 9;
}
.case-gallery__cell .placeholder,
.case-gallery__cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* --- Mixed-media row/cell modifiers (NEW) — for case-study galleries that
   combine static images with wide-format animated banners (GIF/video) at
   aspect ratios that don't fit the standard uniform 16:9 stack. First used
   on Boolooz's Black Friday section, which mixes 5 static 16:9 images with
   8 animated GIFs — six of them ultra-wide 4:1 banner exports, one 16:9,
   one near-square. Reuses .case-gallery__cell's existing hover-lift/zoom,
   border-radius, and reveal-stagger behavior automatically — only the
   aspect-ratio and row grouping are new. Generic, not section-specific:
   available for any future case study with a similar asset mix. */
.case-gallery__cell--banner { aspect-ratio: 4 / 1; }
.case-gallery__cell--square { aspect-ratio: 1 / 1; }

.case-gallery__row {
  display: grid;
  gap: var(--sp-4);
}
.case-gallery__row--pair { grid-template-columns: 1fr 1fr; }
/* 9fr/16fr split: at this ratio a 1:1 cell and a 16:9 cell land at the
   same rendered height automatically (9/25 width == (16/25 width)/16*9),
   so the row aligns cleanly without any manual height math. */
.case-gallery__row--asym { grid-template-columns: 9fr 16fr; }

@media (max-width: 900px) {
  .case-gallery__row--pair,
  .case-gallery__row--asym { grid-template-columns: 1fr; }
  /* Banner cells keep their native 4:1 ratio on mobile too — these
     GIF exports have text and logo elements near the left/right
     edges (see Boolooz Black Friday), so cropping to 16:9 here was
     cutting real content off both sides. Full-width-but-short reads
     better than cropped. */
}

.case-gallery__auto-chip { position: absolute; top: var(--sp-3); left: var(--sp-3); z-index: 2; font-size: var(--fs-tiny); font-weight: var(--fw-medium); letter-spacing: 0.05em; color: var(--color-text-secondary); background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 999px; padding: 3px var(--sp-2); }
.case-gallery__dots { position: absolute; bottom: var(--sp-3); left: 50%; transform: translateX(-50%); z-index: 2; display: flex; gap: 6px; }
.case-gallery__dots span { width: 5px; height: 5px; border-radius: 50%; background: var(--color-text-muted); cursor: pointer; transition: background var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out); }
.case-gallery__dots span:hover { transform: scale(1.3); }
.case-gallery__dots span.is-active { background: var(--color-text-primary); }

/* --- Slider arrow controls (animation depth + interaction pass) ---
   Circular buttons, left/right edges, vertically centered. Reuses the
   same surface/border language as the AUTO chip so it reads as part of
   the same UI family rather than a new visual idiom. */
.case-gallery__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  opacity: 0.88;
  transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.case-gallery__arrow:hover { opacity: 1; background: var(--color-text-primary); color: var(--color-white); transform: translateY(-50%) scale(1.06); }
.case-gallery__arrow svg { width: 18px; height: 18px; }
.case-gallery__arrow--prev { right: var(--sp-3); }
.case-gallery__arrow--next { left: var(--sp-3); }

/* --- Drag / swipe cursor affordance --- */
.case-gallery__slides { cursor: grab; touch-action: pan-y; }
.case-gallery__slides.is-dragging { cursor: grabbing; }
.case-gallery__slide img { -webkit-user-drag: none; user-select: none; }


/* --- Gallery slider cell — structure defined in the previous pass,
   real interaction (auto-advance, pause-on-hover, manual dots) now
   wired up by interactions.js. It finds every .case-gallery__cell--
   slider on the page and drives it independently — one shared
   script for all slider instances sitewide, not per-page JS. */
.case-gallery__slides { position: absolute; inset: 0; }
.case-gallery__slide { position: absolute; inset: 0; }
.case-gallery__slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.case-gallery__slide:not(:first-child) { display: none; }

/* --- Attribution / scope caption (NEW) — shared component for any
   case study needing a one-line ownership or credit note directly
   under the hero (e.g. TFIT's UI/UX-team caption, Taris/Automotive's
   collaborative-credit line). Kept deliberately plain — quiet,
   factual, not a design moment. */
.case-caption {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--margin-x);
  padding-block: var(--sp-4) 0;
  text-align: right;
  font-size: var(--fs-small);
  color: var(--color-text-secondary);
  line-height: var(--lh-normal);
}

/* --- Related projects strip (NEW) — closes every case study before
   the shared footer. Black band matching the case-hero tone, three
   square cards. Card targets are auto-selected as "next 3 projects in
   the locked presentation order, wrapping around" — same low-
   maintenance linking convention as the Project Index. */
.case-related { background: var(--color-black); padding-block: var(--sp-8); }
.case-related__header {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--margin-x);
  padding-bottom: var(--sp-6);
  text-align: right;
  font-size: var(--fs-caption);
  font-weight: var(--fw-medium);
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.03em;
}
.case-related__grid {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--margin-x);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-5);
}
.case-related__card {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-md);
  overflow: hidden;
}
.case-related__card .placeholder,
.case-related__card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.case-related__label {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  z-index: 2;
  padding: var(--sp-4);
  background: linear-gradient(to top, rgba(0,0,0,0.72), transparent);
  color: var(--color-white);
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
  text-align: right;
  /* Animation depth pass: label sits slightly lower at rest, slides
     up into place on hover — ties the reveal motion to hover intent
     instead of being permanently static, pairing with the existing
     image-zoom on the same card. Stays fully readable at rest (the
     gradient scrim is unchanged) — this is a position shift, not a
     visibility toggle. */
  transform: translateY(8px);
  transition: transform var(--dur-slow) var(--ease-out);
}
.case-related__card:hover .case-related__label {
  transform: translateY(0);
}

/* --- Category directory + per-category galleries (NEW) — for case
   studies large enough to split into distinct sub-sections (TFIT
   first; Boolooz/Automotive planned once TFIT is approved). Sits
   between Hero and Brief & Approach so the visitor sees the
   structure immediately. Not black — black is reserved for Hero and
   the closing Related strip per the locked palette exception, so
   this uses the regular surface/border tones instead. */
.case-categories {
  background: var(--color-surface);
  padding-block: var(--sp-7);
  border-block: 1px solid var(--color-border);
}
.case-categories__intro {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--margin-x);
  padding-bottom: var(--sp-5);
  text-align: right;
  font-size: var(--fs-caption);
  font-weight: var(--fw-medium);
  color: var(--color-text-secondary);
  letter-spacing: 0.03em;
}
.case-categories__grid {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--margin-x);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-4);
}
.case-categories__card {
  display: block;
  padding: var(--sp-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  text-align: right;
}
.case-categories__num {
  display: block;
  font-size: var(--fs-caption);
  color: var(--color-text-muted);
  font-weight: var(--fw-medium);
}
.case-categories__name {
  display: block;
  margin-top: var(--sp-2);
  font-size: var(--fs-body-lg);
  font-weight: var(--fw-bold);
  color: var(--color-text-primary);
}
.case-categories__desc {
  display: block;
  margin-top: var(--sp-2);
  font-size: var(--fs-small);
  color: var(--color-text-secondary);
  line-height: var(--lh-normal);
}

/* Per-category section — reuses .case-gallery__grid/.case-gallery__cell
   verbatim for the actual image cells (no new cell-level CSS needed),
   only the wrapper/heading are new. Each category is a self-contained
   .case-category block with its own anchor id for the directory links. */
.case-category {
  background: var(--color-bg);
  padding-block: var(--sp-8);
  /* Anchor-scroll fix: without this, clicking a directory card lands
     the section flush at the viewport top, hidden behind the fixed
     nav (64px). Same root cause likely affects the Home page's
     #hero/#index/#about anchors too — worth revisiting sitewide in
     the refinement pass, scoped here for now since this is the
     feature directly in front of Saeed. */
  scroll-margin-top: var(--nav-h);
}
.case-category + .case-category { border-top: 1px solid var(--color-border); }
.case-category__header {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--margin-x);
  padding-bottom: var(--sp-6);
  text-align: right;
}
.case-category__eyebrow {
  display: block;
  font-size: var(--fs-caption);
  font-weight: var(--fw-medium);
  color: var(--color-text-secondary);
  letter-spacing: 0.03em;
}
.case-category__name {
  display: block;
  margin-top: var(--sp-2);
  font-size: var(--fs-h2);
  font-weight: var(--fw-bold);
  color: var(--color-text-primary);
}

@media (max-width: 900px) {
  .case-hero { height: auto; min-height: 480px; }
  .case-hero__grid { grid-template-columns: 1fr; height: auto; }
  .case-hero__media { height: 320px; }
  .case-hero__content { align-items: center; text-align: center; padding: var(--sp-6) var(--sp-5); }
  .case-hero__rule { margin-inline: auto; }
  .case-brief__grid { grid-template-columns: 1fr; gap: var(--sp-6); }
  .case-brief__text { margin-inline: auto; }
  .case-caption { text-align: center; }
  .case-related__grid { grid-template-columns: 1fr; }
  .case-categories__grid { grid-template-columns: 1fr; }
  /* Touch targets: 36px arrows and 5px dots are fine for a mouse
     cursor but too small to tap reliably. Arrows grow to the 44px
     floor; dots keep their visual size but gain generous invisible
     padding so the actual tappable area meets the same floor,
     using a transparent box-shadow to expand the hit area without
     changing the dot's own layout/spacing. */
  .case-gallery__arrow { width: 44px; height: 44px; }
  .case-gallery__arrow svg { width: 20px; height: 20px; }
  /* Default 6px gap between 5px dots (11px pitch) is too tight for any
     real touch hit-zone without adjacent zones overlapping and causing
     taps to register on the wrong dot — widen the gap first, then give
     each dot a hit-zone sized to fit the new pitch with a safety margin.
     box-shadow doesn't expand tappable area (visual only); a ::before
     sized to the actual box does, since taps within it register on the
     host span. */
  .case-gallery__dots { gap: var(--sp-4); }
  .case-gallery__dots span { position: relative; }
  .case-gallery__dots span::before {
    content: "";
    position: absolute;
    top: 50%; left: 50%;
    width: 18px;
    height: 28px;
    transform: translate(-50%, -50%);
  }
}

/* =========================================================
   SITE FOOTER — shared across every page (Home + every case
   study). Injected by footer.js. Built from the new Figma
   spec (Page 3, closing band): single-line thank-you centered
   near the top of the band, social labels bottom-left,
   name + logo mark bottom-right. Replaces the old per-page
   About & Contact-only closing band.
   ========================================================= */
.site-footer {
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
  position: relative;
  height: 208px;
}
.site-footer__inner {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--margin-x);
  height: 100%;
  position: relative;
}
.site-footer__thanks {
  position: absolute;
  top: 44px;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  font-size: 1.3125rem; /* 21px */
  font-weight: var(--fw-medium);
  color: var(--color-text-primary);
  text-align: center;
  white-space: nowrap;
}
.site-footer__social {
  position: absolute;
  bottom: 44px;
  /* Left (was right pre-redesign) — matches the nav's logo-on-the-right
     convention, kept from the redesign since it's a real consistency
     fix, not part of what Saeed asked to revert. */
  left: var(--margin-x);
  display: flex;
  gap: var(--sp-4);
  direction: rtl;
}
.site-footer__social a {
  font-size: var(--fs-micro);
  color: var(--color-text-secondary);
  letter-spacing: 0.05em;
  transition: color var(--dur-fast) var(--ease-out);
}
.site-footer__social a:hover { color: var(--color-text-primary); }
.site-footer__signature {
  position: absolute;
  bottom: 44px;
  /* Right (was left pre-redesign) — see note above. */
  right: var(--margin-x);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  direction: ltr;
}
.site-footer__signature-name {
  font-size: 1.25rem; /* 20px */
  font-weight: var(--fw-medium);
  color: var(--color-text-secondary);
}
.site-footer__signature-logo { display: flex; align-items: center; color: var(--color-text-primary); }
.site-footer__signature-logo svg { height: 24px; width: auto; }

@media (max-width: 900px) {
  .site-footer { height: auto; padding-block: var(--sp-7); }
  .site-footer__inner { padding-inline: var(--sp-5); }
  .site-footer__thanks { position: static; transform: none; margin-bottom: var(--sp-6); white-space: normal; }
  .site-footer__social, .site-footer__signature { position: static; }
  .site-footer__inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--sp-4); }
}
