/* Alawi Althuraya portfolio. Brand: navy #0A1630, panel #111F3D, blue #3B82F6, teal #2DD4BF, silver #E5EAF3, muted #94A3B8. */
:root {
  --bg: #0A1630;
  --panel: #111F3D;
  --panel-2: #172a52;
  --line: rgba(229, 234, 243, .1);
  --line-2: rgba(229, 234, 243, .2);
  --blue: #3B82F6;
  --teal: #2DD4BF;
  --text: #E5EAF3;
  --muted: #94A3B8;
  --display: 'Sora', system-ui, sans-serif;
  --body: 'Inter', system-ui, sans-serif;
  --gutter: 16px;
  --max: 1200px;
  color-scheme: dark;
}
html[lang="ar"] {
  --display: 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --body: 'IBM Plex Sans Arabic', system-ui, sans-serif;
}
@media (min-width: 768px) { :root { --gutter: 32px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 16px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
html[lang="ar"] body { line-height: 1.85; }
img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }
a { color: inherit; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3 { margin: 0; font-family: var(--display); color: var(--text); }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 6px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 10; padding: 10px 14px; background: var(--text); color: var(--bg); border-radius: 8px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.ltr { direction: ltr; unicode-bidi: isolate; }

/* ---------- header ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; font: 600 1.0625rem/1.2 var(--display); letter-spacing: -.01em; white-space: nowrap; }
.brand svg { width: 34px; height: 34px; flex: none; }
.nav { display: none; }
.nav a { color: var(--muted); text-decoration: none; font-size: .9375rem; padding: 12px 6px; }
.nav a:hover { color: var(--text); }
.lang { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--line-2); border-radius: 999px; text-decoration: none; font-size: .9375rem; font-weight: 500; white-space: nowrap; }
.lang:hover { border-color: var(--text); }
.lang[lang="ar"] { font-family: 'IBM Plex Sans Arabic', var(--body); }
.lang[lang="en"] { font-family: 'Inter', system-ui, sans-serif; }
@media (min-width: 900px) {
  .nav { display: flex; gap: 20px; }
}

/* ---------- buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 22px; border-radius: 10px; font: 700 1.1875rem/1.2 var(--body); text-decoration: none; text-align: center; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-primary { background: var(--blue); color: var(--bg); }
.btn-primary:hover { background: #60a5fa; }
.btn-ghost { border: 1px solid var(--line-2); color: var(--text); font-weight: 600; font-size: 1.0625rem; }
.btn-ghost:hover { border-color: var(--text); }

/* ---------- hero: name and work sit on one axis, like bars on a chart ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "name" "bars" "axis" "labels" "text";
  padding-block: 28px 72px;
}
.hero-name { grid-area: name; padding-bottom: 28px; }
.hero h1 { font-weight: 700; font-size: clamp(2.75rem, 12.5vw, 7rem); line-height: 1.02; letter-spacing: -.04em; }
.hero h1 span { display: block; }
html[lang="ar"] .hero h1 { letter-spacing: 0; line-height: 1.3; font-size: clamp(3rem, 15vw, 6.5rem); }
.bars { grid-area: bars; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 10px; height: clamp(230px, 70vw, 440px); }
.bar { position: relative; display: block; height: 100%; overflow: hidden; border: 1px solid var(--line-2); border-bottom: 0; border-radius: 12px 12px 0 0; background: var(--panel); animation: rise 1s cubic-bezier(.2, .75, .2, 1) both; }
.bar:nth-child(1) { height: 50%; animation-delay: .15s; }
.bar:nth-child(2) { height: 75%; animation-delay: .3s; }
.bar:nth-child(3) { animation-delay: .45s; }
.bar img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.bar:hover img { transform: scale(1.04); }
.bar::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10, 22, 48, .55), transparent 45%); pointer-events: none; }
@keyframes rise { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
.axis { grid-area: axis; height: 2px; background: linear-gradient(90deg, var(--blue), var(--teal)); }
html[dir="rtl"] .axis { background: linear-gradient(-90deg, var(--blue), var(--teal)); }
.labels { grid-area: labels; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding-top: 10px; color: var(--muted); font-size: .8125rem; line-height: 1.35; }
.hero-text { grid-area: text; padding-top: 36px; display: grid; gap: 20px; }
.statement { font: 600 clamp(1.375rem, 4.6vw, 2rem)/1.3 var(--display); letter-spacing: -.02em; max-width: 22em; }
html[lang="ar"] .statement { letter-spacing: 0; line-height: 1.6; }
.lede { color: var(--muted); font-size: 1.0625rem; max-width: 36em; }
.hero .actions { margin-top: 8px; }
@media (min-width: 960px) {
  .hero {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
    grid-template-areas: "name bars" "axis axis" "text labels";
    column-gap: 56px;
    padding-block: 48px 120px;
  }
  .hero-name { align-self: end; padding-bottom: 20px; }
  .bars { gap: 14px; height: 460px; }
  .labels { gap: 14px; padding-top: 12px; align-self: start; }
  .hero-text { padding-top: 32px; }
}

/* ---------- sections ---------- */
.section { padding-block: 72px; border-top: 1px solid var(--line); }
@media (min-width: 960px) { .section { padding-block: 112px; } }
.sec-head { max-width: 48rem; margin-bottom: 40px; display: grid; gap: 16px; justify-items: start; }
.section h2 { font-weight: 700; font-size: clamp(1.875rem, 6vw, 3rem); line-height: 1.15; letter-spacing: -.03em; }
html[lang="ar"] .section h2 { letter-spacing: 0; line-height: 1.45; }
.section h3 { font-weight: 600; font-size: 1.25rem; line-height: 1.35; letter-spacing: -.01em; }
html[lang="ar"] .section h3 { letter-spacing: 0; line-height: 1.6; }
.lead { color: var(--muted); font-size: 1.125rem; max-width: 42em; }
.sub { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin: 56px 0 20px; }
.note { color: var(--muted); font-size: .875rem; }
.tag { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; font-size: .8125rem; font-weight: 600; line-height: 1.3; }
.tag-client { color: #8db7fa; background: rgba(59, 130, 246, .12); border: 1px solid rgba(59, 130, 246, .45); }
.tag-concept { color: var(--teal); background: rgba(45, 212, 191, .1); border: 1px solid rgba(45, 212, 191, .4); }
.tag-practice { color: var(--text); background: rgba(229, 234, 243, .06); border: 1px solid var(--line-2); }

/* ---------- client case study ---------- */
.case { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; }
@media (min-width: 960px) { .case { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; gap: 64px; } }
.case-text { display: grid; gap: 20px; justify-items: start; }
.deliver { display: grid; gap: 12px; margin-block: 4px 8px; }
.deliver li { position: relative; padding-inline-start: 30px; }
.deliver li::before { content: ""; position: absolute; inset-inline-start: 0; top: .42em; width: 16px; height: 12px; background:
  linear-gradient(var(--blue), var(--blue)) 0 100% / 4px 5px no-repeat,
  linear-gradient(#34acd9, #34acd9) 6px 100% / 4px 8px no-repeat,
  linear-gradient(var(--teal), var(--teal)) 12px 100% / 4px 12px no-repeat; }
html[dir="rtl"] .deliver li::before { transform: scaleX(-1); }
.mock { position: relative; padding-bottom: 14%; }
.browser { border: 1px solid var(--line-2); border-radius: 14px; overflow: hidden; background: var(--panel); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .7); }
.browser-bar { display: flex; align-items: center; gap: 6px; height: 32px; padding-inline: 12px; border-bottom: 1px solid var(--line); }
.browser-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); flex: none; }
.browser-bar span { min-width: 0; margin-inline-start: 8px; padding: 2px 10px; border-radius: 6px; background: rgba(229, 234, 243, .06); color: var(--muted); font-size: .75rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: ltr; }
.phone { position: absolute; inset-inline-end: 5%; bottom: 0; width: 26%; min-width: 92px; border: 5px solid #22355f; border-radius: 22px; overflow: hidden; background: #000; box-shadow: 0 24px 60px rgba(0, 0, 0, .55); }
@media (min-width: 600px) { .phone { border-width: 7px; border-radius: 28px; } }

/* ---------- media grids ---------- */
.grid-ads { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 760px) { .grid-ads { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; } }
.work { margin: 0; display: grid; gap: 10px; align-content: start; min-width: 0; }
.shot { display: block; width: 100%; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--panel); cursor: zoom-in; color: inherit; font: inherit; }
.shot img { width: 100%; transition: transform .4s ease; }
.shot:hover img { transform: scale(1.025); }
.work figcaption { display: grid; gap: 6px; justify-items: start; font-size: .9375rem; line-height: 1.4; }
.work figcaption strong { font-weight: 600; }
.work .tag { font-size: .75rem; padding: 4px 10px; }
.reels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 760px) { .reels { grid-template-columns: repeat(auto-fill, minmax(0, 250px)); gap: 20px; } }
.reels video { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 16px; border: 1px solid var(--line-2); background: #000; }

.split { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 32px; }
@media (min-width: 960px) { .split { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 760px) { .grid-2 { gap: 20px; } }
.work video { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 14px; border: 1px solid var(--line-2); background: #000; }
.package { grid-column: 1 / -1; display: grid; gap: 16px; align-content: start; padding: 24px; border: 1px dashed rgba(45, 212, 191, .45); border-radius: 14px; }
@media (min-width: 760px) { .package { grid-column: auto; } }
.sectors { display: flex; flex-wrap: wrap; gap: 8px; }
.sectors li { padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 999px; font-size: .875rem; color: var(--text); }

/* ---------- data ---------- */
.feature { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
@media (min-width: 960px) { .feature { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 40px; align-items: start; } }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 10px; min-width: 0; }
.panel .shot { border-radius: 10px; background: #fff; }
.meta { display: grid; gap: 14px; justify-items: start; align-content: start; }
.meta p { color: var(--muted); }
.tools { display: flex; flex-wrap: wrap; gap: 6px; }
.tools li { padding: 3px 10px; border-radius: 6px; background: rgba(59, 130, 246, .14); color: #a9c8fb; font-size: .8125rem; font-weight: 600; direction: ltr; }
.meta .work { width: 100%; margin-top: 6px; }
.pair { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; margin-top: 64px; }
@media (min-width: 860px) { .pair { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; } }
.pair > article { display: grid; gap: 18px; align-content: start; min-width: 0; }

/* ---------- about ---------- */
.cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; }
@media (min-width: 860px) { .cols { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; } }
.cols > div { display: grid; gap: 14px; align-content: start; padding-top: 20px; border-top: 2px solid var(--line-2); }
.cols > div:nth-child(1) { border-top-color: var(--blue); }
.cols > div:nth-child(2) { border-top-color: #34acd9; }
.cols > div:nth-child(3) { border-top-color: var(--teal); }
.list { display: grid; gap: 8px; color: var(--muted); }
.list li { color: var(--text); }
.cols p { color: var(--text); }
.ai-note { margin-top: 48px; max-width: 46rem; font: 600 clamp(1.125rem, 3.4vw, 1.375rem)/1.5 var(--display); letter-spacing: -.01em; }
html[lang="ar"] .ai-note { letter-spacing: 0; line-height: 1.8; }
.certs { margin-top: 64px; }
.certs h3 { margin-bottom: 20px; }
.cert-list { display: grid; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .cert-list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; } }
.cert-list li { display: grid; gap: 2px; padding-block: 14px; border-bottom: 1px solid var(--line); }
.cert-list span { color: var(--muted); font-size: .9375rem; }

/* ---------- contact ---------- */
.contact { display: grid; gap: 24px; justify-items: start; padding: 40px 24px; border-radius: 20px; background: var(--panel); border: 1px solid var(--line); position: relative; overflow: hidden; }
@media (min-width: 760px) { .contact { padding: 64px; } }
.contact .lead { color: var(--muted); }
.contact-mark { position: absolute; inset-inline-end: -40px; bottom: -40px; width: 240px; height: 240px; opacity: .08; pointer-events: none; }
html[dir="rtl"] .contact-mark { transform: scaleX(-1); }

footer { padding-block: 40px 56px; color: var(--muted); font-size: .875rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center; }
footer a { color: var(--text); display: inline-flex; align-items: center; min-height: 44px; padding-inline: 4px; }

/* ---------- viewer ---------- */
.viewer { width: min(1400px, 96vw); max-width: 96vw; max-height: 94vh; padding: 0; border: 1px solid var(--line-2); border-radius: 14px; background: var(--panel); color: var(--text); }
.viewer::backdrop { background: rgba(4, 9, 22, .86); }
.viewer-inner { display: grid; gap: 10px; padding: 10px; }
.viewer img { width: auto; max-width: 100%; max-height: calc(94vh - 90px); margin-inline: auto; border-radius: 8px; object-fit: contain; }
.viewer-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 2px 4px 4px; font-size: .875rem; }
.viewer-bar p { color: var(--muted); min-width: 0; }
.viewer-links { display: flex; gap: 8px; }
.viewer-links a, .viewer-links button { min-height: 40px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line-2); background: transparent; color: var(--text); font: 600 .875rem/1 var(--body); text-decoration: none; display: inline-flex; align-items: center; cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bar { animation: none; }
  .bar img, .shot img { transition: none; }
}
