/* ==========================================================================
   GS Graphx — Portfolio Page Styles (EN + AR)
   Matches GS Graphx dark charcoal (#121518) + lime (#b6f419) design system.
   ========================================================================== */

:root {
  --green: #b6f419 !important;
  --light-green: #b6f419 !important;
  --orange: #f98421 !important;
  --bg: #121518 !important;
  --grey: #262c32 !important;

  --pf-bg: #121518;
  --pf-surface: #171b20;
  --pf-surface-hover: #1c2127;
  --pf-border: rgba(255, 255, 255, 0.09);
  --pf-border-strong: rgba(255, 255, 255, 0.16);
  --pf-text: #f3f5f7;
  --pf-muted: rgba(243, 245, 247, 0.62);
  --pf-faint: rgba(243, 245, 247, 0.38);
  --pf-lime: #b6f419;
  --pf-lime-rgb: 182, 244, 25;
  --pf-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --pf-radius: 18px;
}

/* Override home smooth-scroll lock from style.min.css */
html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body.gs-portfolio-page {
  overflow-y: auto !important;
  overflow-x: clip !important;
  background-color: var(--pf-bg);
  color: var(--pf-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

html[lang="ar"] body.gs-portfolio-page,
html[lang="ar"] body.gs-portfolio-page button,
html[lang="ar"] body.gs-portfolio-page input,
html[lang="ar"] body.gs-portfolio-page textarea {
  font-family: "IBM Plex Sans Arabic", "IBM Plex Sans", sans-serif;
}

html[lang="en"] body.gs-portfolio-page {
  font-family: "IBM Plex Sans", sans-serif;
}

body.gs-portfolio-page.gs-pf-lb-open,
body.gs-portfolio-page.is-modal-open {
  overflow: hidden !important;
}

/* Subtle header backdrop when scrolled */
body.gs-portfolio-page.is-scrolled .gs-site-header.o-header {
  padding-top: clamp(12px, 1.5vw, 18px) !important;
  padding-bottom: clamp(12px, 1.5vw, 18px) !important;
  background: rgba(18, 21, 24, 0.84) !important;
  backdrop-filter: blur(20px) saturate(1.15);
  -webkit-backdrop-filter: blur(20px) saturate(1.15);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.gs-pf-main {
  position: relative;
  flex: 1 0 auto;
  isolation: isolate;
}

.gs-pf-hero {
  position: relative;
  padding: clamp(106px, 11vw, 140px) clamp(20px, 4vw, 58px) clamp(18px, 2.4vw, 28px);
  overflow: hidden;
  background:
    radial-gradient(62% 58% at 50% 0%, rgba(var(--pf-lime-rgb), 0.11) 0%, rgba(var(--pf-lime-rgb), 0.02) 45%, transparent 78%),
    linear-gradient(180deg, #0e1114 0%, var(--pf-bg) 100%);
}

.gs-pf-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(75% 75% at 50% 25%, #000 0%, transparent 100%);
  -webkit-mask-image: radial-gradient(75% 75% at 50% 25%, #000 0%, transparent 100%);
}

.gs-pf-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 1480px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gs-pf-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 16px;
  border-radius: 100px;
  border: 1px solid rgba(var(--pf-lime-rgb), 0.28);
  background: rgba(var(--pf-lime-rgb), 0.07);
  color: var(--pf-lime);
  font-family: "IBM Plex Mono", "IBM Plex Sans Arabic", monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

html[lang="ar"] .gs-pf-eyebrow {
  letter-spacing: 0;
  text-transform: none;
  font-family: "IBM Plex Sans Arabic", sans-serif;
  font-size: 13px;
}

.gs-pf-eyebrow__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--pf-lime);
  box-shadow: 0 0 12px rgba(var(--pf-lime-rgb), 0.9);
}

.gs-pf-hero__title {
  margin: 0;
  font-size: clamp(42px, 6.4vw, 88px);
  line-height: 1.02;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: #ffffff;
  max-width: 16ch;
}

html[lang="en"] .gs-pf-hero__title {
  font-family: "ZimulaStandard", "IBM Plex Sans", sans-serif;
}

html[lang="ar"] .gs-pf-hero__title {
  letter-spacing: -0.01em;
  line-height: 1.16;
  font-weight: 700;
}

.gs-pf-hero__title em {
  font-style: normal;
  color: var(--pf-lime);
}

.gs-pf-hero__lead {
  margin: 22px auto 0;
  max-width: 640px;
  font-size: clamp(15px, 1.3vw, 18px);
  line-height: 1.65;
  color: var(--pf-muted);
  font-weight: 400;
}

.gs-pf-stats {
  margin-top: 32px;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 24px;
  padding: 10px 22px;
  border-radius: 100px;
  border: 1px solid var(--pf-border);
  background: rgba(255, 255, 255, 0.025);
}

.gs-pf-stat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--pf-muted);
}

.gs-pf-stat strong {
  color: #ffffff;
  font-family: "IBM Plex Mono", monospace;
  font-weight: 600;
}

.gs-pf-stat-sep {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
}

/* ==========================================================================
   Filter Tabs Bar
   ========================================================================== */
.gs-pf-filters-wrap {
  position: sticky;
  top: 82px;
  z-index: 60;
  padding: 6px clamp(16px, 4vw, 58px);
  margin-bottom: clamp(18px, 2.4vw, 30px);
  pointer-events: none;
}

.gs-pf-filters {
  pointer-events: auto;
  max-width: fit-content;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px;
  border-radius: 100px;
  background: rgba(18, 21, 24, 0.88);
  backdrop-filter: blur(22px) saturate(1.15);
  -webkit-backdrop-filter: blur(22px) saturate(1.15);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.36);
}

.gs-pf-filter {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  border-radius: 100px;
  padding: 11px 20px;
  font-size: 15.5px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition:
    background-color 0.28s var(--pf-ease),
    color 0.28s var(--pf-ease),
    border-color 0.28s var(--pf-ease),
    transform 0.25s var(--pf-ease);
}

.gs-pf-filter:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.07);
}

.gs-pf-filter:focus-visible {
  outline: 2px solid var(--pf-lime);
  outline-offset: 2px;
}

.gs-pf-filter.is-active {
  background: var(--pf-lime);
  color: #0c0e10;
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(var(--pf-lime-rgb), 0.28);
}

.gs-pf-filter__count {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.65);
  transition: background-color 0.28s var(--pf-ease), color 0.28s var(--pf-ease);
}

.gs-pf-filter.is-active .gs-pf-filter__count {
  background: rgba(12, 14, 16, 0.14);
  color: #0c0e10;
}

/* ==========================================================================
   Masonry Gallery Grid
   ========================================================================== */
.gs-pf-stage {
  max-width: 1560px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 58px);
}

.gs-pf-gallery {
  display: flex;
  align-items: flex-start;
  gap: clamp(14px, 1.8vw, 24px);
  transition: opacity 0.22s ease;
}

.gs-pf-col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 1.8vw, 24px);
}

.gs-pf-card {
  position: relative;
  background: var(--pf-surface);
  border: 1px solid var(--pf-border);
  border-radius: var(--pf-radius);
  overflow: hidden;
  cursor: pointer;
  transition:
    transform 0.42s var(--pf-ease),
    border-color 0.35s var(--pf-ease),
    box-shadow 0.42s var(--pf-ease),
    background-color 0.35s var(--pf-ease);
}

.gs-pf-card.is-hidden {
  display: none;
}

.gs-pf-card:hover {
  transform: translateY(-4px);
  border-color: rgba(var(--pf-lime-rgb), 0.42);
  background: var(--pf-surface-hover);
  box-shadow: 0 24px 52px rgba(0, 0, 0, 0.42);
}

.gs-pf-card__media {
  position: relative;
  overflow: hidden;
  background: #0d1013;
}

.gs-pf-card__open {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: inherit;
  color: inherit;
}

.gs-pf-card__open:focus-visible {
  outline: 2px solid var(--pf-lime);
  outline-offset: -2px;
}

.gs-pf-card__media img,
.gs-pf-card__media video {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: transform 0.65s var(--pf-ease);
}

.gs-pf-card:hover .gs-pf-card__media img,
.gs-pf-card:hover .gs-pf-card__media video {
  transform: scale(1.03);
}

/* Website cards: 4:3 frame with smooth slow full-page scroll on hover */
.gs-pf-card[data-cat="web"] .gs-pf-card__media {
  aspect-ratio: 4 / 3;
  container-type: size;
}

.gs-pf-card[data-cat="web"] .gs-pf-card__open {
  position: relative;
  height: 100%;
}

.gs-pf-card[data-cat="web"] .gs-pf-card__media img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  object-fit: unset;
  transform: translateY(0);
  transition: transform 15s linear;
  will-change: transform;
}

.gs-pf-card[data-cat="web"]:hover .gs-pf-card__media img {
  transform: translateY(min(0px, calc(-100% + 100cqh)));
}

@media (prefers-reduced-motion: reduce) {
  .gs-pf-card[data-cat="web"] .gs-pf-card__media img {
    transition: none;
  }
}

/* Video container aspect fallback before metadata loads */
.gs-pf-card[data-video="1"] .gs-pf-card__media video {
  min-height: 220px;
  background: #0b0d10;
}

.gs-pf-card__num {
  position: absolute;
  top: 12px;
  inset-inline-start: 12px;
  z-index: 3;
  padding: 4px 10px;
  border-radius: 100px;
  background: rgba(12, 14, 16, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.84);
  pointer-events: none;
}

.gs-pf-card__badge {
  position: absolute;
  bottom: 12px;
  inset-inline-end: 12px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 100px;
  background: rgba(12, 14, 16, 0.84);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(var(--pf-lime-rgb), 0.45);
  color: var(--pf-lime);
  font-family: "IBM Plex Mono", "IBM Plex Sans Arabic", monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  pointer-events: none;
}

html[lang="ar"] .gs-pf-card__badge {
  letter-spacing: 0;
  text-transform: none;
  font-family: "IBM Plex Sans Arabic", sans-serif;
}

.gs-pf-card__meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 18px 17px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.gs-pf-card__info {
  min-width: 0;
  flex: 1 1 auto;
}

.gs-pf-card__tag {
  font-family: "IBM Plex Mono", "IBM Plex Sans Arabic", monospace;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pf-lime);
  margin-bottom: 5px;
}

html[lang="ar"] .gs-pf-card__tag {
  letter-spacing: 0;
  text-transform: none;
  font-family: "IBM Plex Sans Arabic", sans-serif;
  font-size: 11.5px;
}

.gs-pf-card__title {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.38;
  color: #ffffff;
  word-break: break-word;
}

.gs-pf-card__year {
  flex: 0 0 auto;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  color: var(--pf-faint);
  padding-top: 2px;
}

.gs-pf-card__weblink {
  margin-top: 10px;
}

.gs-pf-card__weblink a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: 100px;
  border: 1px solid rgba(var(--pf-lime-rgb), 0.35);
  background: rgba(var(--pf-lime-rgb), 0.07);
  color: var(--pf-lime);
  font-size: 11.5px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.gs-pf-card__weblink a:hover {
  background: var(--pf-lime);
  color: #0c0e10;
  border-color: var(--pf-lime);
}

/* ==========================================================================
   Bottom Project CTA Band
   ========================================================================== */
.gs-pf-cta-band {
  max-width: 1560px;
  margin: clamp(64px, 8vw, 112px) auto 0;
  padding: 0 clamp(16px, 4vw, 58px);
}

.gs-pf-cta-card {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  padding: clamp(36px, 5vw, 64px) clamp(24px, 4vw, 56px);
  background:
    radial-gradient(50% 90% at 85% 20%, rgba(var(--pf-lime-rgb), 0.14) 0%, transparent 70%),
    #171b20;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 36px;
}

.gs-pf-cta-card__copy {
  max-width: 620px;
}

.gs-pf-cta-card__title {
  margin: 0 0 10px;
  font-size: clamp(26px, 3.2vw, 42px);
  line-height: 1.15;
  font-weight: 600;
  color: #ffffff;
}

html[lang="en"] .gs-pf-cta-card__title {
  font-family: "ZimulaStandard", "IBM Plex Sans", sans-serif;
}

.gs-pf-cta-card__text {
  margin: 0;
  font-size: clamp(14.5px, 1.2vw, 16.5px);
  line-height: 1.6;
  color: var(--pf-muted);
}

/* ==========================================================================
   Lightbox Modal
   ========================================================================== */
.gs-pf-lb {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(10, 12, 15, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 84px clamp(16px, 4vw, 88px) 36px;
}

.gs-pf-lb.is-open {
  display: flex;
}

.gs-pf-lb.is-web,
.gs-pf-lb.is-tall {
  justify-content: flex-start;
  overflow-y: auto;
}

.gs-pf-lb__bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10002;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px clamp(16px, 3.5vw, 36px);
  background: linear-gradient(180deg, rgba(10, 12, 15, 0.94) 0%, rgba(10, 12, 15, 0) 100%);
  pointer-events: none;
}

.gs-pf-lb__bar > * {
  pointer-events: auto;
}

.gs-pf-lb__counter {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  color: var(--pf-muted);
  padding: 7px 14px;
  border-radius: 100px;
  background: rgba(18, 21, 24, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.gs-pf-lb__close {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 100px;
  background: rgba(18, 21, 24, 0.88);
  border: 1px solid rgba(var(--pf-lime-rgb), 0.45);
  color: var(--pf-lime);
  font-family: "IBM Plex Mono", "IBM Plex Sans Arabic", sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

html[lang="ar"] .gs-pf-lb__close {
  letter-spacing: 0;
  text-transform: none;
  font-family: "IBM Plex Sans Arabic", sans-serif;
  font-size: 13px;
}

.gs-pf-lb__close:hover {
  background: var(--pf-lime);
  color: #0c0e10;
  border-color: var(--pf-lime);
}

.gs-pf-lb__nav {
  position: fixed;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  z-index: 10001;
  display: flex;
  justify-content: space-between;
  padding: 0 clamp(10px, 2vw, 24px);
  pointer-events: none;
  direction: ltr;
}

.gs-pf-lb__nav button {
  pointer-events: auto;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(18, 21, 24, 0.85);
  color: #ffffff;
  font-size: 18px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.gs-pf-lb__nav button:hover {
  background: var(--pf-lime);
  color: #0c0e10;
  border-color: var(--pf-lime);
  transform: scale(1.06);
}

.gs-pf-lb__media {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 100%;
}

.gs-pf-lb__media img,
.gs-pf-lb__media video {
  display: block;
  max-width: min(88vw, 1320px);
  max-height: 76vh;
  object-fit: contain;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0c0e11;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

.gs-pf-lb.is-web .gs-pf-lb__media img {
  width: min(88vw, 1320px) !important;
  max-width: 88vw !important;
  max-height: none !important;
  height: auto !important;
  object-fit: unset !important;
}

.gs-pf-lb.is-tall .gs-pf-lb__media img {
  width: min(82vw, 1040px) !important;
  max-width: 82vw !important;
  max-height: none !important;
  height: auto !important;
  object-fit: unset !important;
}

.gs-pf-lb__actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.gs-pf-lb__visit--top {
  margin-top: 0;
  padding: 9px 18px;
  font-size: 12px;
}

.gs-pf-lb__visit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 11px 24px;
  border-radius: 100px;
  background: var(--pf-lime);
  color: #0c0e10;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.25s var(--pf-ease), box-shadow 0.25s ease;
}

.gs-pf-lb__visit:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(var(--pf-lime-rgb), 0.3);
}

.gs-pf-lb__caption-wrap {
  margin-top: 18px;
  text-align: center;
  max-width: 720px;
}

.gs-pf-lb__tag {
  font-family: "IBM Plex Mono", "IBM Plex Sans Arabic", monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pf-lime);
  margin-bottom: 4px;
}

html[lang="ar"] .gs-pf-lb__tag {
  letter-spacing: 0;
  text-transform: none;
  font-family: "IBM Plex Sans Arabic", sans-serif;
}

.gs-pf-lb__caption {
  font-size: 17px;
  font-weight: 500;
  color: #ffffff;
}

/* ==========================================================================
   Footer & Modal refinements for standalone portfolio page
   ========================================================================== */
body.gs-portfolio-page .o-footer {
  margin-top: clamp(64px, 7vw, 100px);
  padding-top: clamp(64px, 7vw, 96px);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
  .gs-pf-filters-wrap {
    position: relative;
    top: 0;
    padding: 0 14px;
    margin-bottom: 28px;
  }

  .gs-pf-filters {
    max-width: 100%;
    width: 100%;
    border-radius: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 8px;
  }

  .gs-pf-filter {
    justify-content: space-between;
    padding: 12px 15px;
    font-size: 15px;
  }

  .gs-pf-filter[data-filter="all"],
  .gs-pf-filter[data-filter="print"] {
    grid-column: 1 / -1;
    justify-content: center;
  }

  .gs-pf-stage {
    padding: 0 12px;
  }

  .gs-pf-gallery,
  .gs-pf-col {
    gap: 10px;
  }

  .gs-pf-card {
    border-radius: 14px;
  }

  .gs-pf-card__meta {
    padding: 11px 12px 13px;
  }

  .gs-pf-card__title {
    font-size: 13px;
  }

  .gs-pf-card__num {
    top: 8px;
    inset-inline-start: 8px;
    font-size: 9.5px;
    padding: 3px 8px;
  }

  .gs-pf-lb {
    padding: 76px 14px 28px;
  }

  .gs-pf-lb__nav button {
    width: 38px;
    height: 38px;
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .gs-pf-gallery,
  .gs-pf-col {
    gap: 8px;
  }
}
