*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:#071d2d;color:#f5fbfc;font-family:Cairo,system-ui,sans-serif;line-height:1.8}a{color:inherit;text-decoration:none}.site-header{height:78px;border-bottom:1px solid rgba(170,220,226,.3);display:flex;align-items:center;justify-content:space-between;padding:0 clamp(22px,5vw,76px);position:sticky;top:0;background:rgba(7,29,45,.92);backdrop-filter:blur(18px);z-index:5}.brand{display:flex;align-items:center;gap:12px}.brand-mark{display:grid;place-items:center;width:40px;height:40px;border-radius:12px;background:#0dc5c5;color:#062239;font-weight:800;font-size:21px}.brand strong{display:block;font-size:13px}.brand small{display:block;font-size:8px;letter-spacing:.18em;color:#69d9d6}.site-header nav{display:flex;align-items:center;gap:24px;font-size:13px;color:#c2d9de}.site-header nav a:hover{color:#0fd4cf}.site-header .lang{border:1px solid #8cb5bd;border-radius:9px;padding:5px 12px}.hero{min-height:600px;display:grid;grid-template-columns:1.1fr .9fr;align-items:center;gap:5vw;padding:72px clamp(22px,7vw,110px) 58px;background:radial-gradient(circle at 82% 22%,rgba(7,176,181,.2),transparent 28%),linear-gradient(116deg,#09283d 0%,#061a2a 70%)}.hero-copy{max-width:720px}.eyebrow{font-size:11px;letter-spacing:.08em;color:#6de1dd;font-weight:700;margin:0 0 14px}.hero h1{font-size:clamp(42px,6vw,80px);line-height:1.15;margin:0;font-weight:800;letter-spacing:-.05em}.hero h2{font-size:clamp(18px,2.2vw,29px);color:#9edce0;line-height:1.65;margin:12px 0}.lead{max-width:690px;color:#b5ccd3;font-size:16px}.actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:26px}.button{display:inline-block;border:0;border-radius:9px;padding:11px 21px;font:700 14px Cairo;cursor:pointer;transition:.2s}.button:hover{transform:translateY(-2px)}.button.primary{background:#08c7c4;color:#062239}.button.ghost{border:1px solid #c4e0e3;color:#eefcff;background:transparent}.contact-line{display:flex;gap:24px;color:#8baeb6;font-size:12px;margin-top:30px}.hero-card{min-height:390px;border:1px solid #b4dadd;border-radius:34px;padding:28px;position:relative;overflow:hidden;background:linear-gradient(145deg,rgba(17,107,132,.64),rgba(2,30,48,.8));box-shadow:0 18px 70px rgba(0,0,0,.2)}.grid-lines{position:absolute;inset:0;background-image:linear-gradient(rgba(137,235,230,.09) 1px,transparent 1px),linear-gradient(90deg,rgba(137,235,230,.09) 1px,transparent 1px);background-size:40px 40px;opacity:.8}.card-top,.hero-card h3,.process{position:relative}.card-top{display:flex;justify-content:space-between;align-items:center}.mini-badge{border:1px solid #d4dfbd;border-radius:12px;padding:4px 11px;font-size:11px;color:#d9e8cb}.briefcase{display:grid;place-items:center;width:54px;height:54px;background:#09cac5;border-radius:17px;color:#062239;font-size:30px}.hero-card h3{font-size:29px;line-height:1.55;max-width:430px;margin:150px 0 28px}.process{display:grid;gap:10px;border-top:1px solid rgba(171,219,220,.3);padding-top:18px;font-size:13px;color:#d8eaec}.process span{display:flex;justify-content:space-between;border-bottom:1px solid rgba(171,219,220,.2);padding-bottom:8px}.stats{display:grid;grid-template-columns:repeat(3,1fr);background:#f3f8f8;color:#09283e}.stats div{padding:23px clamp(18px,6vw,80px);border-inline-end:1px solid #d5e1e3}.stats strong,.stats span{display:block}.stats strong{font-size:19px}.stats span{font-size:11px;color:#77909a}.section{padding:90px clamp(22px,7vw,110px);background:#f5f9f9;color:#09283e}.section-head{max-width:760px}.section-head h2{font-size:clamp(30px,4vw,54px);line-height:1.35;margin:0 0 12px}.section-head>p:not(.eyebrow){color:#6b828c}.service-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-top:38px}.service{background:#fff;border:1px solid #dfebec;padding:24px;border-radius:15px;min-height:170px;box-shadow:0 12px 30px rgba(7,38,54,.05)}.service>span{color:#07a9aa;font-size:12px;font-weight:800}.service h3{font-size:18px;line-height:1.5}.service p{font-size:13px;color:#6b828c}.work-section{background:#eaf2f2}.project-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;margin-top:36px}.project-card{background:#fff;border-radius:18px;overflow:hidden;border:1px solid #dbe7e9;box-shadow:0 12px 30px rgba(7,38,54,.05)}.project-image{height:170px;padding:20px;display:flex;flex-direction:column;justify-content:space-between;background:linear-gradient(135deg,#0b7086,#07b6b3);color:#e9ffff}.project-image.software{background:linear-gradient(135deg,#173b5d,#6b477e)}.project-image span{font-size:10px;letter-spacing:.1em}.project-image b{font-size:25px;line-height:1.3}.project-body{padding:22px}.project-meta{display:flex;justify-content:space-between;font-size:11px;color:#70909a}.project-body h3{font-size:22px;margin:10px 0}.project-body p{font-size:13px;color:#657b85}.project-body .role{border-top:1px solid #e5eeee;padding-top:10px}.project-body small{display:block;color:#0b8e91;font-size:11px}.text-link{display:inline-block;color:#087f86;font-size:12px;font-weight:700;margin-top:15px}.contact-section{display:grid;grid-template-columns:.8fr 1.2fr;gap:60px;padding:90px clamp(22px,7vw,110px);background:#071d2d}.contact-section h2{font-size:clamp(30px,4vw,54px);line-height:1.35;margin:0}.contact-section p{color:#a9c5ca}.contact-section form{display:grid;gap:13px;background:#0b2d43;padding:28px;border:1px solid #285363;border-radius:18px}.contact-section label{font-size:12px;color:#a8c8ce}.contact-section input,.contact-section textarea{display:block;width:100%;border:1px solid #50717b;background:#072234;color:#fff;border-radius:8px;padding:10px;margin-top:4px;font:inherit}.contact-section textarea{resize:vertical}.trap{display:none!important}.notice{color:#8ff4d9!important;font-size:12px}.site-header+main{min-height:400px}footer{display:flex;justify-content:space-between;padding:22px clamp(22px,7vw,110px);background:#051624;color:#86a7af;font-size:11px}footer a{color:#5de2db}@media(max-width:900px){.hero{grid-template-columns:1fr;padding-top:50px}.hero-card{min-height:340px}.hero-card h3{margin-top:100px}.service-grid{grid-template-columns:repeat(2,1fr)}.project-grid{grid-template-columns:repeat(2,1fr)}.contact-section{grid-template-columns:1fr}}@media(max-width:600px){.site-header{height:auto;padding:14px 18px;align-items:flex-start}.site-header nav{gap:9px;flex-wrap:wrap;justify-content:flex-end;font-size:11px}.site-header nav a:not(.lang){display:none}.hero{padding:46px 20px}.hero h1{font-size:44px}.hero-card{margin-top:20px}.stats{grid-template-columns:1fr}.stats div{border-inline-end:0;border-bottom:1px solid #d5e1e3;padding:18px 20px}.section{padding:58px 20px}.service-grid,.project-grid{grid-template-columns:1fr}.contact-section{padding:58px 20px;gap:28px}.contact-line{flex-direction:column;gap:2px}}
.auth-page{min-height:100vh;display:grid;place-items:center;padding:24px;background:radial-gradient(circle at 50% 20%,rgba(8,199,196,.18),transparent 35%),#071d2d}.auth-card{width:min(100%,460px);display:grid;gap:14px;background:#f5f9f9;color:#09283e;padding:34px;border-radius:20px;box-shadow:0 22px 70px rgba(0,0,0,.3)}.auth-card>.brand-mark{margin:auto}.auth-card h1{margin:0;text-align:center}.auth-card p{text-align:center;color:#68818a;font-size:13px}.auth-card label,.admin-form label,.two-col label{font-size:12px;color:#5b7580}.auth-card input,.admin-form input,.admin-form textarea,.two-col input,.two-col textarea,.project-edit select,.message-row select{width:100%;display:block;border:1px solid #c8dcdf;background:#fff;color:#09283e;border-radius:8px;padding:9px;margin-top:4px;font:inherit}.back-link{text-align:center;color:#087f86;font-size:12px}.error{background:#fff0f0;color:#a13939;border:1px solid #e7bcbc;border-radius:8px;padding:9px;font-size:12px}.admin-header{height:72px;background:#071d2d;border-bottom:1px solid #264655;display:flex;align-items:center;justify-content:space-between;padding:0 clamp(20px,6vw,90px)}.admin-main{max-width:1200px;margin:auto;padding:45px 20px;background:#f2f7f7;color:#09283e}.admin-main>h1{font-size:36px}.admin-panel{background:#fff;border:1px solid #d9e7e8;border-radius:16px;padding:24px;margin:20px 0;box-shadow:0 10px 25px rgba(7,38,54,.04)}.admin-panel h2{margin-top:0}.admin-form{display:grid;gap:14px}.admin-form .button{justify-self:start}.two-col{display:grid;grid-template-columns:1fr 1fr;gap:12px}.project-edit{border-top:1px solid #e1ecec;padding:22px 0;display:grid;gap:14px}.edit-title{display:flex;justify-content:space-between;align-items:center;gap:12px}.edit-title select,.message-row select{width:auto;padding:6px}.notice-box{background:#e5fbf3;color:#126b59;border:1px solid #a6e1ce;border-radius:9px;padding:10px;font-size:13px}.message-row{display:flex;justify-content:space-between;gap:20px;align-items:center;border-top:1px solid #e1ecec;padding:15px 0}.message-row p{margin:5px 0;color:#607882;font-size:13px}.message-row small{color:#8aa0a7;font-size:11px}.message-row form{display:flex;gap:7px;align-items:center;min-width:190px}@media(max-width:700px){.two-col{grid-template-columns:1fr}.message-row{align-items:flex-start;flex-direction:column}.message-row form{width:100%}.message-row select{flex:1}.admin-header{padding:0 15px}.admin-header .button{padding:6px 10px}}
.profile-photo-wrap{position:absolute;top:84px;inset-inline-start:28px;width:96px;height:96px;border:2px solid #b4dadd;border-radius:22px;overflow:hidden;z-index:2;background:#0c425d}.profile-photo{width:100%;height:100%;object-fit:cover}.project-image{position:relative;isolation:isolate}.project-image img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:.42;z-index:-1}.project-image img+span,.project-image img~b{position:relative;text-shadow:0 2px 8px rgba(0,0,0,.75)}
.admin-actions{display:flex;gap:10px;align-items:center;margin-top:14px}.delete-form{margin:-8px 0 28px}.button.danger{background:#8d2936;color:#fff;border:1px solid #b14b58}.button.danger:hover{background:#a93242}.check-line{display:flex;align-items:center;gap:8px;margin:12px 0}.check-line input{width:auto}.project-edit small,.admin-form small{display:block;color:#66808a;font-size:.78rem;margin-top:4px}.project-edit .edit-title span{font-size:.8rem;color:#5e7d86}

:root{--page:#f4f8f8;--card:#fff;--ink:#09283e;--muted:#63808a;--line:#dce9e9;--accent:#08c7c4;--navy:#071d2d}html[data-theme="dark"]{--page:#071d2d;--card:#0d2b3d;--ink:#edfafa;--muted:#a6c0c5;--line:#234756}html[data-theme="dark"] body,html[data-theme="dark"] .admin-main{background:var(--page);color:var(--ink)}body{background:var(--page);color:var(--ink);transition:background .2s,color .2s}.theme-toggle{border:1px solid #6b9299;background:transparent;color:inherit;border-radius:999px;width:38px;height:34px;cursor:pointer;font:inherit}.site-header nav{display:flex;align-items:center;gap:14px}.section,.contact-section{background:var(--page);color:var(--ink)}.service,.project-card,.skill-card,.course-card,.case-block,.timeline-item{background:var(--card);color:var(--ink);border-color:var(--line)}.skill-grid,.course-grid,.gallery-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.skill-card,.course-card{padding:18px;border:1px solid var(--line);border-radius:14px}.skill-card>div{display:flex;justify-content:space-between;gap:12px}.skill-track{height:7px;background:var(--line);border-radius:10px;margin:14px 0;overflow:hidden}.skill-track i{display:block;height:100%;background:linear-gradient(90deg,#08c7c4,#d8ae54);border-radius:inherit}.skill-card p,.course-card p,.timeline-item p{color:var(--muted);font-size:.9rem}.course-card img{width:100%;height:130px;object-fit:cover;border-radius:10px;margin-bottom:12px}.timeline{display:grid;gap:14px}.timeline-item{display:grid;grid-template-columns:250px 1fr;gap:24px;padding:20px;border:1px solid var(--line);border-radius:14px}.timeline-item strong,.timeline-item span,.timeline-item small{display:block}.timeline-item span,.timeline-item small{color:var(--muted);margin-top:5px}.social-links{display:flex;flex-wrap:wrap;gap:10px;margin-top:20px}.social-links a{border:1px solid rgba(8,199,196,.5);padding:9px 14px;border-radius:999px;color:inherit}.case-study{max-width:1120px;margin:auto;padding:50px 22px}.case-hero{display:grid;grid-template-columns:1fr 1fr;gap:32px;align-items:center;margin:30px 0 50px}.case-cover{width:100%;max-height:420px;object-fit:cover;border-radius:20px;border:1px solid var(--line)}.case-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-bottom:44px}.case-block{padding:24px;border:1px solid var(--line);border-radius:16px}.gallery-grid{grid-template-columns:repeat(3,1fr);margin:18px 0 34px}.gallery-grid img{width:100%;height:220px;object-fit:cover;border-radius:14px;border:1px solid var(--line)}.admin-header-actions{display:flex;gap:8px;align-items:center}.compact-row{display:flex;align-items:center;justify-content:space-between;gap:12px;border-top:1px solid var(--line);padding:12px 0;color:var(--muted)}.compact-row strong{color:var(--ink)}.compact-row span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:55%}.empty-state{padding:20px;border:1px dashed var(--line);border-radius:14px;color:var(--muted)}
html[data-theme="dark"] .admin-panel,.html[data-theme="dark"] .auth-card{background:var(--card);color:var(--ink);border-color:var(--line)}html[data-theme="dark"] input,html[data-theme="dark"] textarea,html[data-theme="dark"] select{background:#0a2232;color:var(--ink);border-color:#345767}html[data-theme="dark"] .admin-main{background:var(--page)}
@media(max-width:760px){.skill-grid,.course-grid,.gallery-grid,.case-hero,.case-grid{grid-template-columns:1fr}.timeline-item{grid-template-columns:1fr;gap:10px}.admin-header-actions{gap:4px}.admin-header-actions .button{font-size:11px;padding:6px}.case-study{padding:30px 16px}}

/* تباين محكم لوضع الليل والنهار */
html[data-theme="dark"] .auth-card,
html[data-theme="dark"] .admin-main,
html[data-theme="dark"] .admin-panel,
html[data-theme="dark"] .admin-panel h1,
html[data-theme="dark"] .admin-panel h2,
html[data-theme="dark"] .admin-panel h3,
html[data-theme="dark"] .admin-main h1,
html[data-theme="dark"] .admin-main h2,
html[data-theme="dark"] .admin-main h3,
html[data-theme="dark"] .admin-panel strong,
html[data-theme="dark"] .compact-row strong,
html[data-theme="dark"] .edit-title,
html[data-theme="dark"] .project-edit,
html[data-theme="dark"] .auth-card h1,
html[data-theme="dark"] .auth-card label,
html[data-theme="dark"] .admin-form label,
html[data-theme="dark"] .two-col label,
html[data-theme="dark"] .back-link { color: var(--ink); }
html[data-theme="dark"] .admin-panel,
html[data-theme="dark"] .auth-card { background: var(--card); border-color: var(--line); }
html[data-theme="dark"] .admin-main { background: var(--page); }
html[data-theme="dark"] .admin-form input,
html[data-theme="dark"] .admin-form textarea,
html[data-theme="dark"] .admin-form select,
html[data-theme="dark"] .two-col input,
html[data-theme="dark"] .two-col textarea,
html[data-theme="dark"] .two-col select,
html[data-theme="dark"] .compact-row input,
html[data-theme="dark"] .compact-row select,
html[data-theme="dark"] .project-edit select,
html[data-theme="dark"] .message-row select { background:#0a2232; color:var(--ink); border-color:#456878; }
html[data-theme="dark"] .auth-card p,
html[data-theme="dark"] .project-edit small,
html[data-theme="dark"] .admin-form small,
html[data-theme="dark"] .message-row p,
html[data-theme="dark"] .message-row small,
html[data-theme="dark"] .compact-row span { color:var(--muted); }
html[data-theme="dark"] .notice-box { background:#123d38; color:#b8f5df; border-color:#287b68; }
html[data-theme="dark"] .error { background:#4a2028; color:#ffd8dc; border-color:#a95863; }
html[data-theme="light"] .admin-main,
html[data-theme="light"] .admin-panel,
html[data-theme="light"] .auth-card { color:var(--ink); }
html[data-theme="light"] .admin-form label,
html[data-theme="light"] .two-col label { color:#42616b; }

/* تباين الواجهة العامة وصفحات المشاريع في الثيمين */
html[data-theme="dark"] .site-header,
html[data-theme="dark"] .hero,
html[data-theme="dark"] .hero-copy,
html[data-theme="dark"] .hero-copy h1,
html[data-theme="dark"] .hero-copy h2,
html[data-theme="dark"] .hero-copy .lead,
html[data-theme="dark"] .section-head,
html[data-theme="dark"] .section-head h2,
html[data-theme="dark"] .section-head p,
html[data-theme="dark"] .stats,
html[data-theme="dark"] .stats strong,
html[data-theme="dark"] .stats span,
html[data-theme="dark"] .contact-section,
html[data-theme="dark"] .contact-section h2,
html[data-theme="dark"] .contact-section p,
html[data-theme="dark"] .case-study,
html[data-theme="dark"] .case-study h1,
html[data-theme="dark"] .case-study h2,
html[data-theme="dark"] .case-study h3,
html[data-theme="dark"] .case-study p,
html[data-theme="dark"] footer { color:var(--ink); }
html[data-theme="dark"] .section-head p:not(.eyebrow),
html[data-theme="dark"] .hero-copy .lead,
html[data-theme="dark"] .stats span,
html[data-theme="dark"] .contact-section p,
html[data-theme="dark"] .case-study p { color:var(--muted); }
html[data-theme="dark"] .site-header,
html[data-theme="dark"] footer { background:var(--page); border-color:var(--line); }
html[data-theme="dark"] .stats,
html[data-theme="dark"] .contact-section { background:var(--page); border-color:var(--line); }
html[data-theme="dark"] .hero-copy h1,
html[data-theme="dark"] .section-head h2,
html[data-theme="dark"] .case-study h1,
html[data-theme="dark"] .case-study h2 { color:#f4ffff; }
html[data-theme="dark"] .site-header a,
html[data-theme="dark"] footer a,
html[data-theme="dark"] .text-link { color:#8ceceb; }
html[data-theme="dark"] .contact-section form label { color:var(--ink); }
html[data-theme="dark"] .contact-section form input,
html[data-theme="dark"] .contact-section form textarea { background:#0a2232; color:var(--ink); border-color:#456878; }
html[data-theme="light"] .section-head h2,
html[data-theme="light"] .case-study h1,
html[data-theme="light"] .case-study h2 { color:#09283e; }

/* إصلاح نهائي للعناوين العامة التي تحمل ألوانًا ثابتة من القالب */
html[data-theme="dark"] .hero-copy h1,
html[data-theme="dark"] .hero-copy h2,
html[data-theme="dark"] .hero-copy .lead,
html[data-theme="dark"] .section-head h2,
html[data-theme="dark"] .section-head > p:not(.eyebrow),
html[data-theme="dark"] .service h3,
html[data-theme="dark"] .service p,
html[data-theme="dark"] .project-body h3,
html[data-theme="dark"] .project-body h3 a,
html[data-theme="dark"] .project-body p,
html[data-theme="dark"] .project-body small,
html[data-theme="dark"] .project-meta,
html[data-theme="dark"] .timeline-item strong,
html[data-theme="dark"] .timeline-item p,
html[data-theme="dark"] .course-card h3,
html[data-theme="dark"] .course-card p,
html[data-theme="dark"] .course-card small,
html[data-theme="dark"] .skill-card strong,
html[data-theme="dark"] .skill-card p,
html[data-theme="dark"] .contact-section h2,
html[data-theme="dark"] .contact-section > div > p:not(.eyebrow) { color:#edfafa !important; }
html[data-theme="dark"] .hero-copy .lead,
html[data-theme="dark"] .service p,
html[data-theme="dark"] .project-body p,
html[data-theme="dark"] .project-body small,
html[data-theme="dark"] .timeline-item p,
html[data-theme="dark"] .course-card p,
html[data-theme="dark"] .course-card small,
html[data-theme="dark"] .skill-card p,
html[data-theme="dark"] .contact-section > div > p:not(.eyebrow) { color:#b9d0d4 !important; }
html[data-theme="dark"] .hero-card h3,
html[data-theme="dark"] .hero-card .process span { color:#f4ffff !important; }
html[data-theme="dark"] .project-card,
html[data-theme="dark"] .service,
html[data-theme="dark"] .skill-card,
html[data-theme="dark"] .course-card,
html[data-theme="dark"] .timeline-item,
html[data-theme="dark"] .case-block { background:#0d2b3d; color:#edfafa; }

/* مقدمة الموقع كحلية في الوضعين؛ النصوص يجب أن تبقى فاتحة دائمًا */
.hero .hero-copy h1,
.hero .hero-copy h2,
.hero .hero-copy .lead,
.hero .hero-card h3,
.hero .hero-card .process span { color:#edfafa !important; }
.hero .hero-copy .lead { color:#b9d0d4 !important; }
.hero .hero-copy .eyebrow,
.hero .hero-copy .contact-line,
.hero .hero-copy .contact-line span { color:#a9d8dc !important; }
