:root {
    --bg: #07060d;
    --bg-2: #120a1d;
    --text: #f6f3ff;
    --muted: #b7adc9;
    --card: rgba(18, 12, 32, 0.78);
    --line: rgba(167, 109, 255, 0.38);
    --purple: #8b5cf6;
    --purple-2: #a855f7;
    --glow: rgba(139, 92, 246, 0.45);
    --header: rgba(7, 6, 13, 0.72);
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    --radius: 22px;
    --max: 1180px;
    --font: "Cairo", "Segoe UI", Tahoma, sans-serif;
    --display: "Outfit", "Cairo", sans-serif;
}
html[data-theme="light"] {
    color-scheme: light;
    --bg: #f5f2fb;
    --bg-2: #efe8fa;
    --text: #1b1230;
    --muted: #5d5470;
    --card: rgba(255, 255, 255, 0.9);
    --line: rgba(109, 40, 217, 0.22);
    --header: rgba(245, 242, 251, 0.86);
    --shadow: 0 16px 40px rgba(70, 40, 110, 0.08);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; text-size-adjust: 100%; }
body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: var(--font);
    color-scheme: dark;
    background:
        radial-gradient(900px 420px at 100% -10%, rgba(139, 92, 246, 0.28), transparent 60%),
        radial-gradient(700px 380px at 0% 20%, rgba(88, 28, 135, 0.25), transparent 55%),
        var(--bg);
    line-height: 1.7;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--purple-2); outline-offset: 3px; }
::selection { background: rgba(139, 92, 246, 0.45); color: #fff; }
a, button, .service-card, .work-card, .work-media img, .main-nav a, .tabbar a {
    transition: color .2s ease, background .2s ease, border-color .2s ease, transform .25s ease, box-shadow .2s ease;
}
button, input, textarea { font: inherit; color: inherit; }
.skip { position: absolute; inset-inline-start: 12px; top: -40px; background: var(--purple); color: #fff; padding: 8px 12px; z-index: 80; }
.skip:focus { top: 12px; }
.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 14px 28px;
    backdrop-filter: blur(16px);
    background: var(--header);
    border-bottom: 1px solid transparent;
}
.admin-bar .site-header { top: 32px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font); font-weight: 800; }
.brand-mark, .brand-logo {
    width: 42px; height: 42px; border-radius: 14px;
    display: grid; place-items: center;
    background: linear-gradient(160deg, #c084fc, #6d28d9);
    color: #fff; font-size: 22px; box-shadow: 0 0 24px var(--glow);
}
.brand-logo { object-fit: cover; }
.brand-name { font-size: 18px; letter-spacing: 0; }
.main-nav { display: flex; gap: 4px; margin-inline-start: auto; }
.main-nav a { padding: 8px 14px; border-radius: 999px; color: var(--muted); font-weight: 700; }
.main-nav a.is-active, .main-nav a:hover { color: #fff; background: linear-gradient(180deg, #a855f7, #7c3aed); }
html[data-theme="light"] .main-nav a.is-active, html[data-theme="light"] .main-nav a:hover { color: #fff; }
.header-tools { display: flex; align-items: center; gap: 8px; }
.icon-btn, .lang button {
    width: 42px; height: 42px; border-radius: 14px; border: 1px solid var(--line);
    background: rgba(255,255,255,0.03); color: var(--text); cursor: pointer;
}
.lang { position: relative; }
.lang button { width: auto; padding: 0 14px; font-weight: 800; }
.lang-menu { position: absolute; top: 48px; inset-inline-end: 0; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 6px; min-width: 72px; }
.lang-menu a { display: block; padding: 6px 10px; border-radius: 8px; }
.lang-menu a.is-active { background: var(--purple); color: #fff; }
.icon-btn svg, .btn svg, .socials svg, .stat-icon svg, .service-icon svg, .play svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
[dir="rtl"] .btn svg { transform: scaleX(-1); }
.socials svg { fill: currentColor; stroke: none; }
.sun, .menu-btn .shut, .menu-open .menu-btn .open { display: none; }
html[data-theme="light"] .moon { display: none; }
html[data-theme="light"] .sun { display: inline-flex; }
.menu-btn { display: none; }
.menu-open .menu-btn .shut { display: inline-flex; }
main { width: min(var(--max), calc(100% - 36px)); margin: 0 auto; padding-bottom: 48px; }
.hero { padding-top: 18px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 28px; align-items: center; }
.kicker { color: var(--purple-2); font-weight: 800; margin: 0 0 6px; }
.hero-name { font-family: var(--font); font-size: clamp(40px, 5vw, 68px); line-height: 1.12; margin: 0; font-weight: 800; text-wrap: balance; }
html[dir="ltr"] body,
html[dir="ltr"] .brand,
html[dir="ltr"] .hero-name,
html[dir="ltr"] .stats strong,
html[dir="ltr"] .section-title,
html[dir="ltr"] .works-intro h2 { font-family: var(--display); }
html[dir="ltr"] .hero-name { letter-spacing: -0.035em; line-height: 1.02; }
html[dir="rtl"] .stats strong,
html[dir="rtl"] .section-title,
html[dir="rtl"] .works-intro h2 { font-family: var(--font); }
.hero-name .accent { background: linear-gradient(90deg, #d8b4fe, #8b5cf6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.role { font-size: 22px; font-weight: 800; margin: 10px 0; }
.lede { color: var(--muted); font-size: 17px; max-width: 46ch; text-wrap: pretty; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
.btn { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 12px 18px; font-weight: 800; border: 1px solid transparent; }
.btn-fill { background: linear-gradient(180deg, #a855f7, #7c3aed); color: #fff; box-shadow: 0 10px 30px rgba(124, 58, 237, 0.35); }
.btn-ghost { background: transparent; border-color: var(--line); }
.socials { display: flex; gap: 8px; }
.socials a, .socials span { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); color: var(--text); }
.hero-visual { min-height: 420px; border-radius: 28px; overflow: hidden; box-shadow: var(--shadow), 0 0 0 1px var(--line), 0 0 80px rgba(139, 92, 246, 0.18); }
.hero-visual img { width: 100%; height: 100%; object-fit: cover; min-height: 420px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: -28px; position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 22px; backdrop-filter: blur(16px); }
.stats article { padding: 18px 16px; display: grid; gap: 2px; justify-items: center; text-align: center; }
.stats article + article { border-inline-start: 1px solid var(--line); }
.stat-icon { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; color: var(--purple-2); background: rgba(139, 92, 246, 0.12); }
.stats strong { font-family: var(--display); font-size: clamp(22px, 2vw, 30px); line-height: 1.15; }
.stats span:last-child { color: var(--muted); font-size: 14px; line-height: 1.45; max-width: 16ch; }
.section { margin-top: 54px; }
.section-title { display: flex; justify-content: center; align-items: center; gap: 10px; font-size: 32px; margin: 0 0 22px; }
.section-title i { color: var(--purple-2); font-style: normal; }
.service-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.service-card, .works-intro, .contact-form, .contact-aside, .post-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.service-card { padding: 18px; min-height: 220px; }
.service-card:hover, .work-card:hover { transform: translateY(-4px); border-color: rgba(192, 132, 252, 0.7); }
.work-card:hover .work-media img { transform: scale(1.045); }
.service-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: var(--purple-2); background: rgba(139, 92, 246, 0.12); margin-bottom: 14px; }
.service-card h3, .work-meta strong, .post-card h2 { margin: 0 0 6px; font-size: clamp(16px, 1.15vw, 18px); line-height: 1.35; text-wrap: balance; }
.service-card p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.55; text-wrap: pretty; }
.works-band { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; }
.works-track, .card-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.work-card a { display: grid; gap: 10px; }
.work-media { position: relative; display: block; aspect-ratio: 4/3; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: #1a1028; }
.work-media img { width: 100%; height: 100%; object-fit: cover; }
.play { position: absolute; inset: 0; margin: auto; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: rgba(10, 6, 18, 0.55); border: 1px solid #fff; color: #fff; }
.work-meta small { color: var(--purple-2); font-weight: 800; }
.works-intro { padding: 22px; display: flex; flex-direction: column; justify-content: flex-end; gap: 12px; }
.works-intro h2 { margin: 0; font-size: 32px; }
.works-intro p { color: var(--muted); margin: 0; }
.page-hero { padding: 28px 0 10px; }
.page-hero h1, .project-single h1 { font-size: clamp(32px, 4vw, 52px); line-height: 1.2; margin: 0 0 10px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.filters a { border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; color: var(--muted); }
.filters a.is-active { background: var(--purple); color: #fff; border-color: transparent; }
.project-single { padding: 28px 0 10px; max-width: 900px; }
.project-cover, .project-single > img, .photo-single img { width: 100%; border-radius: 24px; max-height: 560px; object-fit: cover; margin-bottom: 18px; }
.prose { font-size: 18px; }
.prose a { color: var(--purple-2); }
.gallery, .photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 18px 0; }
.gallery img, .photo-card img { width: 100%; height: 220px; object-fit: cover; border-radius: 16px; }
.photo-card { position: relative; }
.photo-card span { position: absolute; inset-inline: 10px; bottom: 10px; background: rgba(8,6,16,.7); border-radius: 12px; padding: 6px 10px; }
.about-grid, .contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 28px; align-items: center; padding-bottom: 30px; }
.about-photo img { width: 100%; height: 460px; object-fit: cover; border-radius: 28px; border: 1px solid var(--line); }
.points { list-style: none; padding: 0; }
.points li { padding: 8px 0 8px 0; border-bottom: 1px solid var(--line); }
.contact-form, .contact-aside { padding: 22px; }
.contact-form label, .contact-aside p { display: grid; gap: 6px; margin: 0 0 12px; font-weight: 700; }
.contact-form input, .contact-form textarea { width: 100%; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,0.03); padding: 12px 14px; }
.hp { position: absolute; left: -9999px; }
.form-note { padding: 10px 12px; border-radius: 12px; }
.form-note.ok { background: rgba(16, 185, 129, 0.15); }
.form-note.bad { background: rgba(244, 63, 94, 0.15); }
.contact-aside p { display: flex; align-items: center; gap: 8px; }
.video-frame { margin: 12px 0 18px; border-radius: 18px; overflow: hidden; }
.video-frame iframe, .video-frame video { width: 100%; min-height: 360px; border: 0; }
.post-list { display: grid; gap: 14px; }
.post-card { display: grid; grid-template-columns: 240px 1fr; gap: 16px; overflow: hidden; }
.post-card img { width: 100%; height: 100%; object-fit: cover; min-height: 150px; }
.post-card div { padding: 16px; padding-inline-start: 0; }
.post-card time, .empty { color: var(--muted); }
.pager { margin: 20px 0; }
.pager .nav-links { display: flex; gap: 8px; }
.pager a, .pager span { border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; }
.site-footer { border-top: 1px solid var(--line); margin-top: 20px; }
.footer-inner { width: min(var(--max), calc(100% - 36px)); margin: 0 auto; padding: 22px 0 28px; display: flex; justify-content: space-between; gap: 12px; align-items: center; color: var(--muted); }
.tabbar { display: none; }
@media (max-width: 1100px) {
    .service-grid { grid-template-columns: repeat(3, 1fr); }
    .works-band, .hero-grid, .about-grid, .contact-grid { grid-template-columns: 1fr; }
    .works-track, .card-grid { grid-template-columns: repeat(2, 1fr); }
    .works-intro { order: -1; }
    .hero-visual, .hero-visual img { min-height: 280px; }
}
@media (max-width: 1040px) {
    .main-nav { display: none; position: absolute; inset-inline: 12px; top: 74px; flex-direction: column; background: var(--bg-2); border: 1px solid var(--line); border-radius: 18px; padding: 10px; }
    .menu-open .main-nav { display: flex; }
    .menu-btn { display: inline-grid; place-items: center; }
    .admin-bar .main-nav { top: 108px; }
}
@media (max-width: 760px) {
    .site-header { padding: 12px 14px; }
    main { width: min(var(--max), calc(100% - 20px)); padding-bottom: 108px; }
    .hero-grid { background: var(--card); border: 1px solid var(--line); border-radius: 28px; overflow: hidden; gap: 0; }
    .hero-visual { order: -1; }
    .hero-visual, .hero-visual img { min-height: 188px; max-height: 210px; border-radius: 0; box-shadow: none; object-fit: cover; }
    .hero-copy { padding: 16px 16px 18px; }
    .hero-name { font-size: 36px; }
    .hero-actions { flex-direction: column; }
    .hero-actions .btn { justify-content: center; }
    .stats { grid-template-columns: 1fr 1fr; margin-top: 14px; }
    .stats article:nth-child(odd) { border-inline-start: 0; }
    .stats article:nth-child(2) { border-inline-start: 1px solid var(--line); }
    .service-grid, .works-track, .card-grid, .gallery, .photo-grid, .post-card { grid-template-columns: 1fr; }
    .works-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
    .works-track .work-card { min-width: 78%; scroll-snap-align: start; }
    .post-card div { padding: 14px; }
    .footer-inner { flex-direction: column; align-items: flex-start; padding-bottom: 96px; }
    .tabbar { position: fixed; inset-inline: 10px; bottom: max(10px, env(safe-area-inset-bottom)); z-index: 45; display: grid; grid-template-columns: repeat(4, 1fr); background: rgba(16, 10, 28, 0.92); border: 1px solid var(--line); border-radius: 20px; backdrop-filter: blur(16px); padding: 6px; }
    html[data-theme="light"] .tabbar { background: rgba(255,255,255,.92); }
    .tabbar a { text-align: center; padding: 10px 2px; border-radius: 14px; color: var(--muted); font-size: 12.5px; font-weight: 800; white-space: nowrap; }
    .tabbar a.is-active { background: linear-gradient(180deg, #a855f7, #7c3aed); color: #fff; }
}
@media (max-width: 782px) {
    .admin-bar .site-header { top: 46px; }
}
@media (prefers-reduced-motion: reduce) {
    * { scroll-behavior: auto !important; transition: none !important; }
}
