:root {
  --ink: #090d0c;
  --ink-soft: #111715;
  --paper: #f1f0ea;
  --paper-soft: #e6e6de;
  --acid: #caff3a;
  --mint: #87ffd4;
  --muted: #9da7a1;
  --line: rgba(255,255,255,.14);
  --max: 1240px;
  --ease: cubic-bezier(.22,1,.36,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--paper);
  background: var(--ink);
  font-family: "DM Sans", "Noto Sans Arabic", system-ui, sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}
html[dir="rtl"] body { font-family: "Noto Sans Arabic", "DM Sans", system-ui, sans-serif; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
.noise { position: fixed; inset: 0; z-index: 999; pointer-events: none; opacity: .035; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.85'/%3E%3C/svg%3E"); }

.site-header {
  width: min(calc(100% - 44px), var(--max));
  height: 94px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  position: relative;
  z-index: 20;
}
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 650; letter-spacing: -.02em; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; background: var(--acid); color: var(--ink); border-radius: 50%; font-weight: 800; }
.nav { display: flex; align-items: center; gap: clamp(20px, 3vw, 42px); margin-left: auto; }
html[dir="rtl"] .nav { margin-left: 0; margin-right: auto; }
.nav a { color: #b8c0bc; font-size: .86rem; transition: color .2s; }
.nav a:hover { color: var(--acid); }
.language-switcher { display: flex; border: 1px solid var(--line); padding: 3px; border-radius: 999px; }
.language-switcher button { border: 0; background: transparent; color: #89928d; border-radius: 999px; padding: 7px 10px; cursor: pointer; font-size: .67rem; font-weight: 700; }
.language-switcher button.active { background: var(--paper); color: var(--ink); }
.menu-toggle { display: none; }

.hero {
  width: min(calc(100% - 44px), var(--max));
  min-height: calc(100vh - 94px);
  margin: auto;
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  grid-template-rows: 1fr auto;
  align-items: center;
  gap: 30px 64px;
  padding: 50px 0 30px;
  position: relative;
}
.eyebrow { display: flex; align-items: center; gap: 9px; text-transform: uppercase; letter-spacing: .17em; font-size: .7rem; font-weight: 700; color: #b9c1bd; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--acid); box-shadow: 0 0 0 5px rgba(202,255,58,.09); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 9px rgba(202,255,58,0); } }
.hero h1 { margin: 28px 0; font-size: clamp(3.5rem, 7.5vw, 7.3rem); line-height: .9; letter-spacing: -.07em; max-width: 970px; }
html[dir="rtl"] .hero h1 { letter-spacing: -.045em; line-height: 1.08; }
.hero h1 span, .hero h1 em { display: block; }
.hero h1 em { font-style: normal; color: var(--acid); }
.hero-summary { max-width: 600px; color: #aeb6b2; font-size: clamp(1rem, 1.5vw, 1.2rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.button { min-height: 52px; display: inline-flex; justify-content: space-between; align-items: center; gap: 28px; padding: 0 20px; border: 1px solid var(--line); border-radius: 4px; font-size: .86rem; font-weight: 650; transition: .25s var(--ease); }
.button-primary { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.button-primary:hover { background: var(--acid); border-color: var(--acid); transform: translateY(-3px); }
.button-ghost:hover { border-color: var(--paper); transform: translateY(-3px); }

.hero-visual { min-height: 520px; display: grid; place-items: center; position: relative; perspective: 1000px; }
.portrait-card { width: min(100%, 370px); aspect-ratio: .72; padding: 24px; display: flex; flex-direction: column; justify-content: space-between; color: var(--ink); background: linear-gradient(145deg, #d9ddd1, #929d95); border-radius: 160px 160px 16px 16px; position: relative; overflow: hidden; transform: rotate(3deg); box-shadow: 0 45px 100px rgba(0,0,0,.38); }
.portrait-card::before { content: ""; position: absolute; inset: 22% -15% -22%; background: radial-gradient(circle at 50% 0, #d5ff5a, transparent 42%), linear-gradient(140deg, transparent 20%, rgba(255,255,255,.38), transparent 55%); filter: blur(2px); }
.portrait-topline, .portrait-footer { display: flex; justify-content: space-between; font-size: .59rem; font-weight: 800; letter-spacing: .1em; z-index: 1; }
.portrait-footer { align-items: flex-end; font-size: .68rem; }
.monogram { z-index: 1; align-self: center; font-size: clamp(8rem, 16vw, 13.5rem); font-weight: 800; line-height: .75; letter-spacing: -.14em; margin-left: -.14em; color: #111613; text-shadow: 8px 8px 0 rgba(255,255,255,.2); }
.spark { font-size: 2rem; }
.orb { position: absolute; border-radius: 50%; filter: blur(1px); }
.orb-one { width: 190px; height: 190px; background: var(--acid); right: -12%; top: 3%; opacity: .7; filter: blur(55px); }
.orb-two { width: 130px; height: 130px; border: 1px solid rgba(135,255,212,.45); left: 0; bottom: 4%; }
.floating-chip { position: absolute; z-index: 2; padding: 10px 14px; background: rgba(9,13,12,.82); border: 1px solid rgba(255,255,255,.2); backdrop-filter: blur(10px); border-radius: 999px; font-size: .6rem; letter-spacing: .12em; font-weight: 700; }
.chip-one { left: -5px; top: 24%; transform: rotate(-8deg); }
.chip-two { right: -8px; bottom: 18%; transform: rotate(5deg); color: var(--acid); }
.hero-meta { grid-column: 1 / -1; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(3, 1fr); }
.hero-meta div { display: flex; align-items: baseline; gap: 12px; padding: 23px 0; border-right: 1px solid var(--line); }
.hero-meta div:not(:first-child) { padding-left: 30px; }
html[dir="rtl"] .hero-meta div { border-right: 0; border-left: 1px solid var(--line); }
html[dir="rtl"] .hero-meta div:not(:first-child) { padding-left: 0; padding-right: 30px; }
.hero-meta strong { font-size: 1.7rem; color: var(--acid); }
.hero-meta span { color: #7f8984; font-size: .75rem; text-transform: uppercase; letter-spacing: .09em; }

.marquee { overflow: hidden; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--acid); color: var(--ink); transform: rotate(-1deg) scale(1.02); }
.marquee-track { width: max-content; display: flex; align-items: center; gap: 30px; font-weight: 800; font-size: .85rem; letter-spacing: .14em; animation: marquee 28s linear infinite; }
.marquee-track b { font-size: 1.2rem; }
@keyframes marquee { to { transform: translateX(-50%); } }
html[dir="rtl"] .marquee-track { animation-direction: reverse; }

.section { width: min(calc(100% - 44px), var(--max)); margin: auto; padding: 140px 0; }
.section-label { display: flex; gap: 16px; align-items: center; color: var(--muted); text-transform: uppercase; letter-spacing: .16em; font-size: .68rem; font-weight: 700; }
.section-label span:first-child { color: var(--acid); }
.section-title { margin: 0; font-size: clamp(2.5rem, 5vw, 5.5rem); line-height: .98; letter-spacing: -.055em; font-weight: 600; }
html[dir="rtl"] .section-title { letter-spacing: -.025em; line-height: 1.18; }
.about-grid { display: grid; grid-template-columns: 1.05fr .7fr; gap: clamp(60px, 10vw, 150px); margin-top: 65px; }
.about-copy > p { color: #aeb6b2; font-size: 1.05rem; margin: 0 0 20px; }
.identity-list { border-top: 1px solid var(--line); margin-top: 46px; }
.identity-list div { display: flex; justify-content: space-between; gap: 30px; padding: 17px 0; border-bottom: 1px solid var(--line); }
.identity-list span { color: #79837e; font-size: .75rem; }
.identity-list strong { font-size: .78rem; text-align: end; }

.work { width: 100%; max-width: none; background: var(--paper); color: var(--ink); padding-left: max(22px, calc((100vw - var(--max))/2)); padding-right: max(22px, calc((100vw - var(--max))/2)); }
.work .section-label { color: #59615d; }
.section-heading { display: grid; grid-template-columns: .34fr 1fr; gap: 40px; }
.section-heading > div:last-child { max-width: 800px; }
.section-heading p { color: #5e6662; max-width: 560px; font-size: 1rem; margin-top: 24px; }
.work-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 70px; }
.project-card { min-height: 330px; padding: 28px; display: flex; flex-direction: column; background: #dddcd4; border-radius: 10px; position: relative; overflow: hidden; transition: transform .4s var(--ease); }
.project-card:nth-child(4n+2), .project-card:nth-child(4n+3) { background: #d4dccf; }
.project-card:nth-child(3n) { background: #ded5ca; }
.project-card:hover { transform: translateY(-7px); }
.project-card::after { content: ""; position: absolute; width: 280px; height: 280px; right: -100px; bottom: -140px; border-radius: 50%; border: 1px solid rgba(9,13,12,.13); box-shadow: 0 0 0 40px rgba(9,13,12,.025), 0 0 0 80px rgba(9,13,12,.02); }
html[dir="rtl"] .project-card::after { right: auto; left: -100px; }
.project-index { font-size: .62rem; letter-spacing: .12em; color: #6a716d; }
.project-main { display: grid; grid-template-columns: 92px 1fr; gap: 22px; align-items: center; margin: auto 0 28px; position: relative; z-index: 1; }
.app-icon { width: 92px; height: 92px; object-fit: cover; border-radius: 22px; box-shadow: 0 14px 28px rgba(0,0,0,.15); background: #fff; }
.project-main h3 { margin: 0 0 7px; font-size: clamp(1.5rem, 2.4vw, 2.2rem); letter-spacing: -.04em; }
.project-main p { margin: 0; color: #4e5652; font-size: .83rem; max-width: 360px; }
.project-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 19px; border-top: 1px solid rgba(9,13,12,.14); position: relative; z-index: 1; }
.project-category { font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; }
.store-links { display: flex; gap: 8px; }
.store-link { min-width: 116px; display: inline-flex; justify-content: center; align-items: center; gap: 7px; padding: 9px 12px; color: var(--paper); background: var(--ink); border: 1px solid var(--ink); border-radius: 5px; font-size: .69rem; font-weight: 650; transition: .2s; }
.store-link:hover { color: var(--ink); background: transparent; }
.store-icon { font-size: .8rem; }

.expertise-intro { display: grid; grid-template-columns: 1fr .5fr; gap: 80px; align-items: end; margin: 60px 0 90px; }
.expertise-intro p { color: #929c97; max-width: 450px; }
.expertise-list { border-top: 1px solid var(--line); }
.expertise-list article { display: grid; grid-template-columns: 70px .75fr 1fr 30px; gap: 20px; align-items: center; padding: 35px 0; border-bottom: 1px solid var(--line); transition: padding .3s var(--ease), color .3s; }
.expertise-list article:hover { padding-left: 16px; color: var(--acid); }
html[dir="rtl"] .expertise-list article:hover { padding-left: 0; padding-right: 16px; }
.expertise-list span { color: #5e6863; font-size: .68rem; }
.expertise-list h3 { margin: 0; font-size: clamp(1.25rem, 2vw, 1.8rem); font-weight: 500; }
.expertise-list p { margin: 0; color: #828c87; font-size: .85rem; }
.expertise-list i { font-style: normal; font-size: 1.4rem; }

.languages-section { border-top: 1px solid var(--line); display: grid; grid-template-columns: .34fr 1fr; gap: 40px; }
.language-content { max-width: 850px; }
.language-bars { margin-top: 65px; display: grid; gap: 27px; }
.language-bar > div { display: flex; justify-content: space-between; font-size: .83rem; margin-bottom: 10px; }
.language-bar strong { color: var(--acid); }
.track { display: block; height: 4px; background: #29302d; overflow: hidden; }
.track i { display: block; width: var(--value); height: 100%; background: linear-gradient(90deg, var(--acid), var(--mint)); transform-origin: left; }
html[dir="rtl"] .track i { transform-origin: right; }

.contact { position: relative; overflow: hidden; text-align: center; padding: 150px max(22px, calc((100vw - var(--max))/2)); background: var(--acid); color: var(--ink); }
.contact .eyebrow { color: #3b4721; justify-content: center; }
.contact .status-dot { background: var(--ink); box-shadow: none; }
.contact h2 { max-width: 950px; margin: 30px auto 25px; font-size: clamp(3.2rem, 7.5vw, 8rem); line-height: .88; letter-spacing: -.07em; }
html[dir="rtl"] .contact h2 { line-height: 1.05; letter-spacing: -.04em; }
.contact-lead { max-width: 600px; margin: 0 auto 55px; color: #3d461f; }
.contact-links { max-width: 1040px; margin: auto; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(9,13,12,.25); }
.contact-links a { padding: 23px 18px; display: grid; gap: 4px; position: relative; border-right: 1px solid rgba(9,13,12,.25); text-align: left; transition: background .2s; }
html[dir="rtl"] .contact-links a { text-align: right; border-right: 0; border-left: 1px solid rgba(9,13,12,.25); }
.contact-links a:hover { background: rgba(255,255,255,.25); }
.contact-links span { font-size: .64rem; text-transform: uppercase; letter-spacing: .12em; opacity: .65; }
.contact-links strong { font-size: .78rem; overflow-wrap: anywhere; }
.contact-links i { position: absolute; top: 22px; right: 18px; font-style: normal; }
html[dir="rtl"] .contact-links i { right: auto; left: 18px; }
.contact-orbit { position: absolute; width: 300px; height: 300px; border-radius: 50%; border: 1px solid rgba(9,13,12,.15); right: -120px; top: -100px; display: grid; place-items: center; font-size: .6rem; letter-spacing: .25em; opacity: .5; }

footer { width: min(calc(100% - 44px), var(--max)); min-height: 130px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 30px; color: #7e8883; font-size: .7rem; }
footer .brand { color: var(--paper); }
footer > a { color: var(--paper); }

.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .site-header { height: 76px; }
  .menu-toggle { order: 3; display: grid; gap: 5px; width: 42px; height: 42px; place-content: center; border: 1px solid var(--line); color: white; background: transparent; border-radius: 50%; z-index: 2; }
  .menu-toggle span { width: 17px; height: 1px; background: currentColor; transition: .2s; }
  .nav { display: none; position: absolute; top: 68px; left: 0; right: 0; padding: 22px; flex-direction: column; align-items: stretch; background: #141a18; border: 1px solid var(--line); border-radius: 8px; }
  .nav.open { display: flex; }
  .nav a { padding: 8px 2px; }
  .language-switcher { margin-left: auto; }
  html[dir="rtl"] .language-switcher { margin-left: 0; margin-right: auto; }
  .brand-text { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: 70px; }
  .hero-visual { min-height: 430px; }
  .portrait-card { width: 300px; }
  .hero-meta { grid-column: auto; }
  .about-grid, .expertise-intro { grid-template-columns: 1fr; }
  .section-heading, .languages-section { grid-template-columns: 1fr; }
  .work-grid { grid-template-columns: 1fr; }
  .expertise-list article { grid-template-columns: 45px 1fr 25px; }
  .expertise-list p { grid-column: 2 / 4; }
  .contact-links { grid-template-columns: 1fr; }
  .contact-links a { border-right: 0; border-left: 0; border-bottom: 1px solid rgba(9,13,12,.25); }
}

@media (max-width: 560px) {
  .site-header, .hero, .section, footer { width: min(calc(100% - 30px), var(--max)); }
  .language-switcher button { padding: 6px 8px; }
  .hero { padding-top: 44px; }
  .hero h1 { font-size: clamp(3rem, 15vw, 4.6rem); }
  .hero-visual { min-height: 380px; }
  .portrait-card { width: 250px; padding: 20px; }
  .monogram { font-size: 9rem; }
  .hero-meta { grid-template-columns: 1fr; }
  .hero-meta div, html[dir="rtl"] .hero-meta div { border-right: 0; border-left: 0; border-bottom: 1px solid var(--line); padding: 15px 0; }
  .hero-meta div:not(:first-child), html[dir="rtl"] .hero-meta div:not(:first-child) { padding-left: 0; padding-right: 0; }
  .section { padding-top: 95px; padding-bottom: 95px; }
  .work { width: 100%; }
  .section-title { font-size: 2.55rem; }
  .project-card { min-height: 390px; padding: 22px; }
  .project-main { grid-template-columns: 72px 1fr; gap: 16px; }
  .app-icon { width: 72px; height: 72px; border-radius: 17px; }
  .project-footer { align-items: flex-start; flex-direction: column; }
  .store-links { width: 100%; }
  .store-link { min-width: 0; flex: 1; }
  .expertise-list article { grid-template-columns: 32px 1fr 20px; }
  .contact { padding-top: 100px; padding-bottom: 100px; }
  footer { padding: 34px 0; min-height: 0; flex-direction: column; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
