/* The palette and type match the portfolio homepage (assets/css/site.css). */
:root {
  color-scheme: dark;
  --bg: #06070d;
  --bg-soft: #0a0c15;
  --bg-card: #0e1019;
  --ink: #e7e9f0;
  --muted: #a3aac0;
  --line: rgba(255, 255, 255, .10);
  --indigo: #818cf8;
  --cyan: #22d3ee;
  --grad: linear-gradient(120deg, var(--indigo), var(--cyan));
  --font: 'Plus Jakarta Sans', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 94px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.65 var(--font); }
body.modal-open { overflow: hidden; }
button, input { font: inherit; }
button { color: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; }
::selection { background: #22d3ee47; color: #fff; }
.shell { width: min(1280px, calc(100% - 96px)); margin-inline: auto; }
.ui-icon { width: 19px; height: 19px; flex: none; vertical-align: middle; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; inset: 8px auto auto 8px; z-index: 50; background: var(--bg-card); padding: 12px; transform: translateY(-160%); }
.skip-link:focus { transform: none; }
.eyebrow { margin: 0 0 18px; color: var(--cyan); font: 500 .75rem/1.5 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.eyebrow::before { content: "// "; }
.gradient-text { background: var(--grad); background-clip: text; color: transparent; }
.brand { direction: ltr; display: inline-block; font: 600 1.4rem/1 var(--mono); letter-spacing: -.05em; }
.brand span { color: var(--cyan); }
.site-header { position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--line); background: #06070dce; backdrop-filter: blur(18px) saturate(150%); }
.header-inner, .desktop-nav, .header-actions { display: flex; align-items: center; }
.header-inner { justify-content: space-between; min-height: 76px; gap: 20px; }
.desktop-nav { gap: clamp(17px, 3vw, 40px); font-size: .9rem; }
.desktop-nav a { color: var(--muted); }
.desktop-nav a:hover, .desktop-nav .current { color: var(--ink); }
.desktop-nav .current { position: relative; }
.desktop-nav .current::after { content: ""; position: absolute; inset: auto 0 -6px; height: 2px; border-radius: 5px; background: var(--grad); }
.header-actions { gap: 13px; }
.lang-switcher { display: flex; gap: 2px; direction: ltr; padding: 3px; border: 1px solid var(--line); border-radius: 60px; background: #ffffff06; }
.lang-switcher button { padding: 5px 9px; min-width: 31px; border: 0; border-radius: 60px; background: none; color: var(--muted); font: 600 .72rem/1.45 var(--mono); }
.lang-switcher button[aria-pressed="true"] { background: var(--grad); color: #05060c; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 9px; padding: 13px 21px; border: 1px solid var(--line); border-radius: 60px; background: #ffffff06; font-size: .88rem; font-weight: 700; transition: background .2s, box-shadow .2s, border-color .2s; }
.button:hover { border-color: #22d3ee80; background-color: #22d3ee13; }
.button-dark, .contact-button { background: var(--grad); color: #05060c; border-color: transparent; box-shadow: 0 13px 28px -15px #22d3eec0; }
.button-dark:hover, .contact-button:hover { box-shadow: 0 15px 30px -10px #22d3eeb0; }
.contact-button { padding: 9px 16px; font-size: .82rem; }
.menu-toggle { display: none; background: #ffffff09; border: 1px solid var(--line); padding: 9px; border-radius: 9px; }
.menu-toggle span { display: block; width: 19px; height: 2px; border-radius: 2px; margin: 4px 0; background: currentColor; }
.mobile-nav { padding: 16px 24px 24px; gap: 10px; flex-direction: column; border-top: 1px solid var(--line); }
.mobile-nav a { padding: 8px 0; }

.hero-area { position: relative; isolation: isolate; overflow: clip; }
.hero-area::before {
  position: absolute; content: ""; inset: 0; z-index: -2;
  background: radial-gradient(ellipse at 75% 29%, #6366f132, transparent 57%),
              radial-gradient(ellipse at 16% 67%, #22d3ee13, transparent 49%);
}
.hero-area::after {
  position: absolute; content: ""; inset: 0; z-index: -1;
  background-image: linear-gradient(#ffffff0b 1px, transparent 1px), linear-gradient(90deg,#ffffff0b 1px,transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(ellipse at 60% 43%, #000 12%, transparent 75%);
}
.hero { min-height: clamp(590px, 78svh, 760px); padding-block: 66px; display: grid; grid-template-columns: minmax(0,.86fr) minmax(0,1.32fr); gap: clamp(30px, 5vw, 84px); align-items: center; }
.hero-copy h1 { margin: 0; font-size: clamp(3.25rem, 6vw, 6rem); font-weight: 800; letter-spacing: -.071em; line-height: 1.03; }
.hero-description { max-width: 38ch; margin: 23px 0 28px; color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.13rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-actions .ui-icon { width: 15px; height: 15px; }
.hero-stats { display: flex; gap: 23px; margin-top: 29px; flex-wrap: wrap; }
.hero-stats div { display: flex; align-items: baseline; gap: 8px; }
.hero-stats strong { font: 600 1.1rem var(--mono); color: var(--ink); }
.hero-stats span { font-size: .8rem; color: var(--muted); }
.hero-stage { min-width: 0; position: relative; }
.showcase-frame {
  position: relative; padding: 8px; border: 1px solid #9aa8fa4a; border-radius: 24px;
  background: linear-gradient(145deg,#1a2038,#101524 60%,#101a24);
  box-shadow: 0 34px 85px -26px #000d, 0 0 55px -22px #818cf873, inset 0 1px 0 #ffffff16;
}
.stage-bar { min-height: 39px; display: grid; grid-template-columns: 1fr auto 1fr; gap: 7px; align-items: center; padding: 0 10px 5px; color: #a8b1cc; font: 500 .66rem var(--mono); }
.stage-bar .eyebrow { margin: 0; font-size: inherit; }
.stage-bar .eyebrow::before { content: none; }
.stage-dots { direction: ltr; display: flex; gap: 5px; }
.stage-dots i { width: 7px; height: 7px; border-radius: 50%; background: #8490b7; }
.stage-dots i:first-child { background: var(--indigo); }
.stage-dots i:last-child { background: var(--cyan); }
.stage-bar > :last-child { justify-self: end; }
.hero-window {
  display: block; position: relative; overflow: hidden; isolation: isolate; width: 100%; padding: 0;
  aspect-ratio: 16 / 9; border: 1px solid #ffffff16; border-radius: 15px; background: #080c17; text-align: start;
}
.hero-window img { width: 100%; height: 100%; object-fit: cover; transition: transform .75s var(--ease); }
.hero-window:hover img { transform: scale(1.035); }
.hero-window::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg,#050810f5 0%,#05081050 34%,transparent 63%); }
.stage-caption { position: absolute; z-index: 1; inset: auto 4% 7%; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.stage-caption strong { font-size: clamp(1rem, 2vw, 1.7rem); line-height: 1.2; color: white; }
.stage-caption small { display: block; margin-top: 5px; color: #d0dcf3; font-size: .75rem; }
.stage-play, .film-play { display: grid; place-items: center; border-radius: 50%; color: #05060c; background: var(--grad); box-shadow: 0 6px 24px #05081180; }
.stage-play { width: clamp(40px,5.2vw,65px); aspect-ratio: 1; flex: none; }
.stage-play .ui-icon, .film-play .ui-icon { fill: currentColor; }
.hero-preview-nav { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 7px; padding-top: 8px; }
.preview-tab { display: flex; align-items: center; gap: 7px; min-width: 0; min-height: 46px; padding: 5px 7px; text-align: start; color: var(--muted); border-radius: 10px; border: 1px solid transparent; background: #ffffff04; font-size: .72rem; line-height: 1.3; }
.preview-tab img { width: 34px; height: 26px; flex: none; object-fit: cover; border-radius: 4px; }
.preview-tab.active, .preview-tab:hover { background: #818cf823; border-color: #818cf851; color: var(--ink); }

.section-space { padding-block: 72px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px 32px; margin-bottom: 28px; }
.section-heading .eyebrow { margin-bottom: 8px; }
.section-heading h2, .contact-section h2 { margin: 0; font-size: clamp(2rem,4vw,3.45rem); font-weight: 800; line-height: 1.1; letter-spacing: -.05em; }
.section-heading > p { margin: 0; max-width: 36ch; color: var(--muted); }
.films-section { border-block: 1px solid var(--line); background: radial-gradient(ellipse at 35% 0,#818cf81d,transparent 64%),var(--bg-soft); }
.film-grid { display: grid; gap: 14px; grid-template-columns: repeat(4,minmax(0,1fr)); }
.film-spotlight { grid-template: repeat(3, 1fr) / minmax(0, 2.35fr) minmax(0, 1fr); margin-bottom: 18px; }
.film-card { position: relative; min-width: 0; display: grid; padding: 0; text-align: start; align-content: start; background: var(--bg-card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; transition: border-color .2s; }
.film-card:hover, .project-card:hover { border-color: #818cf893; }
.film-thumbnail { display: block; position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-soft); }
.film-thumbnail img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.film-card:hover img { transform: scale(1.035); }
.film-play { position: absolute; inset: auto auto 10px 10px; width: 34px; aspect-ratio: 1; }
.film-play .ui-icon { width: 15px; height: 15px; }
.film-info { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; padding: 13px 15px; }
.film-info strong { font-size: .95rem; line-height: 1.3; overflow-wrap: anywhere; }
.film-duration { flex: none; color: var(--muted); font: 500 .73rem var(--mono); }
.film-spotlight .film-card:first-child { grid-row: span 3; align-content: stretch; }
.film-spotlight .film-card:first-child .film-thumbnail { height: 100%; }
.film-spotlight .film-card:first-child .film-thumbnail::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg,#080c1bf0,transparent 55%); }
.film-spotlight .film-card:first-child .film-info { position: absolute; z-index: 2; inset: auto 0 0; justify-content: end; padding: 22px; }
.film-spotlight .film-card:first-child strong { display: none; }
.film-spotlight .film-card:first-child .film-play { z-index: 2; bottom: 17px; left: 19px; width: 44px; }
.film-spotlight .film-card:not(:first-child) { grid-template-columns: minmax(74px, 40%) 1fr; align-items: center; align-content: center; padding: 9px; gap: 10px; }
.film-spotlight .film-card:not(:first-child) .film-thumbnail { border-radius: 8px; }
.film-spotlight .film-card:not(:first-child) .film-info { display: grid; justify-content: start; padding: 0; gap: 5px; }
.film-spotlight .film-card:not(:first-child) .film-play { width: 24px; inset: auto auto 5px 5px; }
.film-spotlight .film-card:not(:first-child) .film-play .ui-icon { width: 12px; }
.more-films > summary { display: flex; align-items: center; justify-content: center; list-style: none; gap: 10px; cursor: pointer; width: fit-content; margin-inline: auto; }
summary::-webkit-details-marker { display: none; }
.more-films[open] > summary { margin-bottom: 18px; }
.more-films[open] > summary .ui-icon { transform: rotate(45deg); }
.project-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.collection-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 13px; margin: 0 0 12px; padding: 12px; border: 1px solid var(--line); border-radius: 18px; background: var(--bg-soft); }
.filters { display: flex; gap: 4px; flex-wrap: wrap; }
.filter { display: flex; align-items: center; gap: 7px; padding: 8px 12px; border: 1px solid transparent; border-radius: 60px; background: none; color: var(--muted); font-size: .8rem; }
.filter.active { background: #818cf81f; border-color: #818cf84f; color: var(--ink); }
.filter:hover:not(.active) { background: #ffffff08; color: var(--ink); }
.filter .ui-icon, .search-box .ui-icon { width: 15px; height: 15px; }
.filter-count { font: .7rem var(--mono); color: #aeb8ff; }
.search-box { display: flex; align-items: center; gap: 8px; padding: 6px 11px; min-width: 190px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: #ffffff04; }
.search-box:focus-within { border-color: var(--indigo); }
.search-box input { min-width: 0; width: 100%; color: var(--ink); outline: none; border: 0; background: transparent; font-size: .86rem; }
.search-box kbd { font: .73rem var(--mono); color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 2px 5px; }
.result-line { margin: 0 0 17px; color: var(--muted); font: .75rem var(--mono); }
.project-card { --card-accent: var(--cyan); min-width: 0; display: flex; flex-direction: column; border: 1px solid var(--line); background: var(--bg-card); border-radius: 18px; overflow: hidden; transition: border-color .2s; }
.project-card[data-category="nostalgia"] { --card-accent: #aab3ff; }
.project-card[data-category="media"] { --card-accent: #7ddedc; }
.project-card:target { border-color: var(--cyan); }
.project-visual { position: relative; display: block; width: 100%; padding: 17px 17px 0; aspect-ratio: 16 / 10; border: 0; overflow: hidden; background: radial-gradient(ellipse at 48% 5%,color-mix(in srgb,var(--card-accent) 22%,transparent),transparent 77%),#111525; }
.project-visual img { width: 100%; height: 100%; object-fit: cover; object-position: center top; border-radius: 9px 9px 0 0; box-shadow: 0 4px 16px #0008; transition: transform .6s var(--ease); }
.project-visual:hover img { transform: translateY(-3px); }
.phone-visual img { width: auto; max-width: 85%; height: 108%; margin-inline: auto; object-fit: contain; border: 4px solid #06070d; border-radius: 12px; }
.visual-action { position: absolute; inset: auto 10px 10px auto; display: grid; place-items: center; width: 34px; height: 34px; color: #fff; border: 1px solid #ffffff40; border-radius: 9px; background: #0a0d19dc; }
.visual-action > span { display: none; }
.visual-action .ui-icon { width: 16px; height: 16px; }
.project-copy { flex: 1; display: flex; flex-direction: column; min-width: 0; padding: 20px; }
.category-badge { color: var(--card-accent); font: 500 .68rem var(--mono); letter-spacing: .045em; text-transform: uppercase; }
.project-copy h3 { margin: 7px 0 4px; font-size: clamp(1.3rem,2.2vw,1.65rem); line-height: 1.22; letter-spacing: -.04em; overflow-wrap: anywhere; }
.project-tagline { margin: 0 0 10px; color: #d7dcef; font-size: .9rem; font-weight: 600; }
.project-description { margin: 0 0 15px; color: var(--muted); font-size: .94rem; }
.feature-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 15px; }
.feature-tags span { padding: 2px 7px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); font-size: .73rem; }
.project-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px 13px; margin-top: auto; padding-top: 13px; border-top: 1px solid var(--line); font-size: .84rem; font-weight: 700; }
.project-link, .project-launch { display: inline-flex; align-items: center; gap: 5px; }
.project-link:hover, .project-launch:hover { color: var(--cyan); }
.project-actions .ui-icon, .project-demos .ui-icon { width: 14px; height: 14px; }
.project-launch { color: var(--muted); }
.video-link { margin-inline-start: auto; border: 1px solid #818cf84f; border-radius: 60px; padding: 5px 9px; color: #c6ceff; background: #818cf814; font-size: .78rem; white-space: nowrap; }
.video-link:hover { background: #818cf830; }
.video-link .ui-icon { margin-inline-end: 3px; }
.project-demos { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); font-size: .82rem; color: var(--muted); }
.project-demos summary, .project-demos a { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.project-demos summary { cursor: pointer; list-style: none; }
.project-demos > div { padding-top: 10px; display: grid; gap: 8px; }
.project-demos a:hover { color: var(--cyan); }
.empty-state { text-align: center; padding: 48px 15px; }
.empty-state p { color: var(--muted); }
.anchor-target { display: block; height: 0; }
.contact-section { margin-bottom: 52px; padding: clamp(27px,6vw,70px); overflow: hidden; border: 1px solid #818cf837; border-radius: 24px; background: radial-gradient(ellipse at 86% 0,#818cf840,transparent 60%),radial-gradient(ellipse at 98% 100%,#22d3ee20,transparent 63%),var(--bg-card); }
.contact-section p:not(.eyebrow) { max-width: 50ch; color: var(--muted); }
.site-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; border-top: 1px solid var(--line); padding-block: 24px; color: var(--muted); font-size: .82rem; }
.site-footer > div { display: flex; gap: 13px; }
dialog { width: min(1050px,calc(100% - 24px)); max-height: calc(100dvh - 24px); padding: clamp(13px,2vw,24px); border: 1px solid #818cf85e; border-radius: 20px; color: var(--ink); background: #111523; }
dialog::backdrop { background: #040611da; backdrop-filter: blur(12px); }
.dialog-header, .dialog-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dialog-header { margin-bottom: 12px; }
.dialog-header h2 { margin: 0; line-height: 1.25; font-size: clamp(1.12rem,3vw,1.65rem); }
.dialog-header .eyebrow { margin-bottom: 3px; }
.dialog-close { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border: 1px solid var(--line); background: #ffffff0b; border-radius: 50%; }
.dialog-content { overflow: hidden; border-radius: 11px; background: #020307; }
.dialog-content img, .dialog-content video { display: block; width: 100%; object-fit: contain; max-height: calc(100dvh - 175px); }
.dialog-content video { aspect-ratio: 16 / 9; }
.dialog-content p { padding: 12px; }
.dialog-footer { margin-top: 12px; font-size: .82rem; color: var(--muted); }
.dialog-footer a { color: var(--cyan); }
html[dir="rtl"] { --font: 'Cairo',system-ui,sans-serif; --mono: 'Tajawal',system-ui,sans-serif; }
[dir="rtl"] .hero-copy h1, [dir="rtl"] h2, [dir="rtl"] h3 { letter-spacing: 0; }
[dir="rtl"] .eyebrow { letter-spacing: 0; }
@media(max-width: 1000px) {
  .shell { width: calc(100% - 52px); }
  .hero { gap: 24px; }
  .preview-tab img { display: none; }
  .preview-tab { justify-content: center; text-align: center; }
  .project-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .film-spotlight { grid-template-columns: 1.95fr 1fr; }
}
@media(max-width: 740px) {
  .shell { width: calc(100% - 36px); }
  .header-inner { min-height: 61px; }
  .header-actions { gap: 8px; }
  .desktop-nav, .contact-button { display: none; }
  .menu-toggle, .mobile-nav { display: flex; }
  .menu-toggle { flex-direction: column; }
  .hero { grid-template-columns: minmax(0,1fr); min-height: 0; gap: 28px; padding-block: 42px 35px; }
  .hero-copy h1 { font-size: clamp(2.8rem,8.8vw,4.5rem); }
  .hero-description { margin: 17px 0 20px; }
  .hero-stats { margin-top: 20px; }
  .hero-stage { width: 100%; }
  .showcase-frame { border-radius: 17px; padding: 6px; }
  .hero-window { border-radius: 11px; }
  .stage-bar { min-height: 32px; padding-inline: 5px; }
  .stage-caption small { margin-top: 2px; }
  .section-space { padding-block: 48px; }
  .section-heading { flex-wrap: wrap; }
  .film-spotlight { grid-template: none / repeat(3,minmax(0,1fr)); }
  .film-spotlight .film-card:first-child { grid-area: auto / span 3; }
  .film-spotlight .film-card:not(:first-child) { display: grid; grid-template-columns: 1fr; align-content: start; padding: 0; gap: 0; }
  .film-spotlight .film-card:not(:first-child) .film-info { padding: 7px 8px; }
  .film-spotlight .film-card:not(:first-child) strong { font-size: .76rem; }
  .film-grid { gap: 8px; }
  .more-films .film-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .search-box { flex: 1; }
}
@media(max-width: 520px) {
  .project-grid { grid-template-columns: 1fr; }
  .film-spotlight .film-card:first-child .film-play { width: 37px; }
  .preview-tab { min-height: 41px; padding-inline: 4px; font-size: .67rem; }
  .collection-toolbar { padding: 8px; }
}
@media(prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
