:root {
  --primary: #6c5ce7;
  --primary-dark: #5545cf;
  --primary-soft: #efedff;
  --secondary: #ff6b6b;
  --green: #10a76f;
  --orange: #f5a623;
  --ink: #1c2433;
  --muted: #697386;
  --page: #f6f7fb;
  --surface: #fff;
  --surface-alt: #f8f9fc;
  --border: #e5e8ef;
  --shadow: 0 10px 32px rgba(31, 39, 58, .07);
  --shadow-lg: 0 22px 55px rgba(31, 39, 58, .15);
}
[data-theme="dark"] {
  --ink: #edf0f6;
  --muted: #9ca6b7;
  --page: #111722;
  --surface: #19212e;
  --surface-alt: #202a38;
  --border: #2e3949;
  --primary-soft: rgba(108, 92, 231, .15);
  --shadow: 0 10px 32px rgba(0,0,0,.2);
  --shadow-lg: 0 22px 55px rgba(0,0,0,.35);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--page); font-family: "Cairo", sans-serif; line-height: 1.7; }
body.modal-open { overflow: hidden; }
button, input { font: inherit; }
a { color: inherit; text-decoration: none; }
.container { width: min(1180px, calc(100% - 34px)); margin-inline: auto; }

.page-loader { position: fixed; inset: 0; z-index: 5000; display: grid; place-content: center; justify-items: center; gap: 14px; background: var(--page); transition: .25s; }
.page-loader.hidden { opacity: 0; visibility: hidden; }
.page-loader span, .brand-mark { display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--primary), #9184ef); font-weight: 800; }
.page-loader span { width: 58px; height: 58px; border-radius: 17px; font-size: 30px; animation: pulse 1.2s infinite; }
.page-loader p { color: var(--muted); font-size: 14.4px; }
@keyframes pulse { 50% { transform: scale(.92); opacity: .75; } }

.navbar { position: sticky; top: 0; z-index: 1000; height: 68px; display: flex; align-items: center; background: color-mix(in srgb, var(--surface) 94%, transparent); border-bottom: 1px solid var(--border); backdrop-filter: blur(16px); }
.nav-inner { display: flex; align-items: center; gap: 32px; }
.brand { display: flex; align-items: center; gap: 9px; white-space: nowrap; }
.brand-mark { width: 36px; height: 36px; border-radius: 10px; }
.brand strong { font-size: 24px; }.brand strong span { color: var(--primary); }
.nav-links { display: flex; gap: 25px; margin-inline-end: auto; }
.nav-links a { position: relative; color: var(--muted); font-size: 14.4px; font-weight: 700; }
.nav-links a:hover, .nav-links a.active { color: var(--primary); }
.nav-links a.active::after { content: ""; position: absolute; right: 0; bottom: -23px; width: 100%; height: 2px; background: var(--primary); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.theme-button { width: 39px; height: 39px; border: 1px solid var(--border); border-radius: 9px; color: var(--muted); background: var(--surface); cursor: pointer; }
.mobile-nav-button { display: none; border: 0; background: none; font-size: 25.2px; color: var(--ink); cursor: pointer; }
.button { min-height: 39px; padding: 0 16px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 8px; font-size: 13.2px; font-weight: 800; cursor: pointer; }
.button-primary { color: #fff; background: var(--primary); box-shadow: 0 6px 16px rgba(108,92,231,.22); }.button-primary:hover { background: var(--primary-dark); }
.button-ghost { color: var(--ink); background: var(--surface); border-color: var(--border); }.button-ghost:hover { color: var(--primary); border-color: var(--primary); }
.button-light { color: var(--primary-dark); background: #fff; }.button-outline-light { color: #fff; background: transparent; border-color: rgba(255,255,255,.55); }
.button-large { min-height: 45px; padding: 0 21px; }.button-full { width: 100%; }

.profile-hero { position: relative; overflow: hidden; padding: 46px 0 76px; color: #fff; background: linear-gradient(120deg, #4d3fc3, #7365e3 57%, #8a7ded); }
.hero-pattern { position: absolute; inset: 0; opacity: .13; background-image: radial-gradient(circle at 20% 25%, #fff 0 1px, transparent 2px), radial-gradient(circle at 78% 62%, #fff 0 1px, transparent 2px); background-size: 45px 45px, 65px 65px; }
.profile-hero::after { content: ""; position: absolute; width: 360px; height: 360px; left: -100px; top: -180px; border: 70px solid rgba(255,255,255,.06); border-radius: 50%; }
.profile-hero-content { position: relative; z-index: 1; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 25px; }
.profile-avatar-wrap { position: relative; }
.profile-avatar { width: 126px; height: 126px; overflow: hidden; display: grid; place-items: center; border: 4px solid rgba(255,255,255,.8); border-radius: 22px; background: linear-gradient(135deg, #30268c, #8274e8); box-shadow: 0 18px 42px rgba(31,22,94,.3); }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }.profile-avatar span { font-size: 50.4px; font-weight: 800; }
.online-indicator { position: absolute; left: -4px; bottom: 9px; width: 18px; height: 18px; border: 4px solid #6759d8; border-radius: 50%; background: #28ce85; }
.identity-line { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; }.identity-line h1 { margin: 0; font-size: 34.8px; line-height: 1.3; }
.verified-badge { padding: 3px 9px; border-radius: 20px; background: rgba(255,255,255,.15); font-size: 10.8px; font-weight: 800; }
.profile-rank-badge { padding: 4px 10px; border-radius: 20px; color: #fff; background: linear-gradient(135deg, var(--primary), var(--orange)); font-size: 10.8px; font-weight: 900; box-shadow: 0 8px 22px rgba(31,22,94,.18); }
.profile-rank-badge[hidden] { display: none; }
.profile-extra-badges { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.profile-extra-badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; color: #fff; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.24); font-size: 10.8px; font-weight: 900; }
.profile-extra-badge.gold { background: linear-gradient(135deg, #f59e0b, #f97316); border-color: rgba(255,255,255,.28); }
.profile-extra-badge.purple { background: linear-gradient(135deg, #6c5ce7, #a77aff); border-color: rgba(255,255,255,.28); }
.profile-headline { margin: 5px 0 10px; color: rgba(255,255,255,.88); font-size: 15.6px; }
.profile-meta { display: flex; flex-wrap: wrap; gap: 17px; color: rgba(255,255,255,.77); font-size: 12px; }.profile-meta b { font-weight: 600; }
.profile-tags { margin-top: 13px; display: flex; flex-wrap: wrap; gap: 6px; }.profile-tags span { padding: 3px 10px; border-radius: 20px; background: rgba(255,255,255,.12); font-size: 10.8px; font-weight: 700; }
.hero-actions { display: flex; gap: 8px; }

.stats-wrap { position: relative; z-index: 5; margin-top: -35px; }
.stats-card { min-height: 72px; display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 13px; box-shadow: var(--shadow); }
.stats-card > div { padding: 9px 20px; display: grid; justify-items: center; border-left: 1px solid var(--border); }.stats-card > div:last-child { border: 0; }
.stats-card strong { font-size: 20.4px; }.stats-card span { color: var(--muted); font-size: 10.8px; }

.profile-layout { padding: 28px 0 55px; display: grid; grid-template-columns: 270px minmax(0,1fr); gap: 22px; align-items: start; }
.profile-sidebar { display: grid; gap: 14px; position: sticky; top: 86px; }
.side-card, .content-card { background: var(--surface); border: 1px solid var(--border); border-radius: 13px; box-shadow: var(--shadow); }
.side-card { padding: 18px; }.side-card h2 { margin: 0; font-size: 15.6px; }.side-card > p { color: var(--muted); font-size: 12px; }
.hire-card { padding: 21px; background: linear-gradient(145deg, var(--surface), var(--primary-soft)); }.hire-card h2 { font-size: 18px; }.hire-card small { display: block; margin-top: 9px; color: var(--muted); text-align: center; font-size: 9.6px; }
.section-kicker { margin: 0 0 3px !important; color: var(--primary) !important; font-size: 10.8px !important; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; }
.side-heading { margin-bottom: 10px; }
.details-list { list-style: none; margin: 0; padding: 0; }.details-list li { padding: 9px 0; display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--border); font-size: 10.8px; }.details-list li:last-child { border: 0; }.details-list span { color: var(--muted); }.details-list strong { text-align: left; font-size: 10.8px; }
.success-text { color: var(--green); }
.skills-cloud { display: flex; flex-wrap: wrap; gap: 6px; }.skills-cloud span { padding: 4px 9px; border-radius: 6px; color: var(--muted); background: var(--surface-alt); border: 1px solid var(--border); font-size: 9.6px; font-weight: 700; }
.verification-card p { margin: 9px 0; display: flex; align-items: center; gap: 7px; color: var(--muted); }.verification-card p span { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; color: var(--green); background: color-mix(in srgb, var(--green) 12%, transparent); font-weight: 800; }

.profile-main { min-width: 0; }
.profile-tabs { margin-bottom: 14px; padding: 0 17px; display: flex; gap: 23px; overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); }
.profile-tabs button { min-height: 53px; border: 0; border-bottom: 2px solid transparent; color: var(--muted); background: none; font-size: 12px; font-weight: 800; white-space: nowrap; cursor: pointer; }.profile-tabs button.active { color: var(--primary); border-bottom-color: var(--primary); }.profile-tabs span { padding: 1px 6px; border-radius: 12px; background: var(--surface-alt); font-size: 9.6px; }
.tab-panel { display: none; animation: fade .22s ease; }.tab-panel.active { display: grid; gap: 14px; }
@keyframes fade { from { opacity: 0; transform: translateY(5px); } }
.content-card { padding: 21px; }
.section-heading { margin-bottom: 16px; display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; }.section-heading h2 { margin: 0; font-size: 18px; }.section-heading > div > p:not(.section-kicker) { margin: 3px 0 0; color: var(--muted); font-size: 10.8px; }
.text-button { border: 0; color: var(--primary); background: none; font-size: 10.8px; font-weight: 800; cursor: pointer; }
.about-copy { color: var(--muted); font-size: 13.2px; line-height: 2; }.about-copy p { margin: 0 0 10px; }.about-copy p:last-child { margin: 0; }

.featured-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; }
.featured-item, .portfolio-item { position: relative; overflow: hidden; border: 0; padding: 0; color: #fff; background: #252a36; cursor: pointer; text-align: right; }
.featured-item { height: 180px; border-radius: 10px; }.featured-item img, .featured-item video, .portfolio-item img, .portfolio-item video { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }.featured-item:hover img, .featured-item:hover video, .portfolio-item:hover img, .portfolio-item:hover video { transform: scale(1.045); }
.work-overlay { position: absolute; inset: auto 0 0; padding: 28px 12px 11px; background: linear-gradient(transparent, rgba(10,14,24,.85)); }.work-overlay strong { display: block; font-size: 12px; }.work-overlay span { font-size: 9.6px; opacity: .8; }
.experience-list { position: relative; display: grid; gap: 18px; }.experience-list::before { content: ""; position: absolute; right: 5px; top: 9px; bottom: 9px; width: 1px; background: var(--border); }
.experience-item { position: relative; display: grid; grid-template-columns: 12px 1fr; gap: 12px; }.experience-dot { z-index: 1; width: 11px; height: 11px; margin-top: 5px; border: 3px solid var(--surface); border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 1px var(--primary); }.experience-item h3 { margin: 0; font-size: 13.2px; }.experience-item p { margin: 2px 0; color: var(--muted); font-size: 10.8px; }.experience-item small { color: #9ca5b3; font-size: 9.6px; }

.portfolio-heading { align-items: center; }.portfolio-filters { display: flex; flex-wrap: wrap; gap: 6px; }.portfolio-filters button { border: 1px solid var(--border); border-radius: 20px; padding: 5px 11px; color: var(--muted); background: var(--surface-alt); font-size: 9.6px; cursor: pointer; }.portfolio-filters button.active { color: #fff; border-color: var(--primary); background: var(--primary); }
.portfolio-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 13px; }.portfolio-item { aspect-ratio: 16 / 10; border-radius: 11px; }.portfolio-item .work-overlay { padding: 45px 15px 13px; }.portfolio-item .work-overlay strong { font-size: 13.2px; }
.services-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }.service-card { overflow: hidden; border: 1px solid var(--border); border-radius: 11px; background: var(--surface-alt); }.service-cover { height: 150px; overflow: hidden; background: var(--primary-soft); }.service-cover img { width: 100%; height: 100%; object-fit: cover; }.service-copy { padding: 13px; }.service-copy span { color: var(--primary); font-size: 9.6px; font-weight: 800; }.service-copy h3 { margin: 4px 0 9px; font-size: 13.2px; }.service-footer { display: flex; justify-content: space-between; color: var(--muted); font-size: 10.8px; }.service-footer strong { color: var(--primary); }
.review-overview { display: grid; grid-template-columns: 180px 1fr; gap: 30px; }.rating-block { display: grid; justify-items: center; border-left: 1px solid var(--border); }.rating-block strong { font-size: 45.6px; }.rating-block > span { color: var(--orange); letter-spacing: 2px; }.rating-block p { margin: 4px 0; color: var(--muted); font-size: 10.8px; }
.rating-bars { display: grid; align-content: center; gap: 6px; }.rating-row { display: grid; grid-template-columns: 54px 1fr 22px; align-items: center; gap: 8px; color: var(--muted); font-size: 9.6px; }.rating-track { height: 6px; overflow: hidden; border-radius: 6px; background: var(--surface-alt); }.rating-track span { display: block; height: 100%; background: var(--orange); }
.reviews-list { display: grid; gap: 12px; }.review-card { padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 13px; box-shadow: var(--shadow); }.review-head { display: flex; justify-content: space-between; gap: 15px; }.review-user { display: flex; gap: 10px; }.review-avatar { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--primary); font-weight: 800; }.review-user strong { display: block; font-size: 12px; }.review-user small { color: var(--muted); font-size: 9.6px; }.review-stars { color: var(--orange); font-size: 12px; }.review-card > p { margin: 12px 0 0; color: var(--muted); font-size: 12px; }
.profile-load-more { width: max-content; margin: 18px auto 0; }
.profile-load-more:disabled { cursor: wait; opacity: .65; }
.empty-state { padding: 45px 20px; display: grid; justify-items: center; text-align: center; color: var(--muted); }.empty-state > span { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; color: var(--primary); background: var(--primary-soft); font-size: 24px; }.empty-state strong { margin-top: 9px; color: var(--ink); font-size: 13.2px; }.empty-state p { margin: 3px 0; font-size: 10.8px; }.empty-state[hidden] { display: none; }

.footer { padding: 42px 0 18px; color: #cad0dc; background: #151c29; }.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(3,1fr); gap: 35px; }.footer .brand { color: #fff; }.footer p { max-width: 330px; color: #929cab; font-size: 12px; }.footer h3 { margin: 0 0 11px; color: #fff; font-size: 13.2px; }.footer-grid > div > a:not(.brand) { display: block; margin: 6px 0; color: #929cab; font-size: 10.8px; }.footer-grid a:hover { color: #fff; }.footer-bottom { margin-top: 28px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.08); color: #737e8f; text-align: center; font-size: 10.8px; }

.portfolio-modal { position: fixed; inset: 0; z-index: 3000; display: none; place-items: center; padding: 20px; }.portfolio-modal.open { display: grid; }.modal-backdrop { position: absolute; inset: 0; background: rgba(6,9,16,.78); backdrop-filter: blur(4px); }.portfolio-dialog { position: relative; z-index: 1; width: min(850px,100%); max-height: 90vh; overflow: auto; display: grid; grid-template-columns: 1.35fr .85fr; border-radius: 15px; background: var(--surface); box-shadow: 0 30px 80px rgba(0,0,0,.4); }.modal-image-wrap { min-height: 440px; background: #111; }.modal-image-wrap img { width: 100%; height: 100%; object-fit: cover; }.modal-project-copy { padding: 28px; align-self: center; }.modal-project-copy h2 { margin: 7px 0 10px; font-size: 21.6px; }.modal-project-copy p { color: var(--muted); font-size: 12px; }.project-category { color: var(--primary); font-size: 10.8px; font-weight: 800; }.modal-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 15px; }.modal-tags span { padding: 4px 8px; border-radius: 5px; color: var(--muted); background: var(--surface-alt); font-size: 9.6px; }.modal-close { position: absolute; top: 12px; left: 12px; z-index: 2; width: 34px; height: 34px; border: 0; border-radius: 50%; color: #fff; background: rgba(0,0,0,.45); font-size: 24px; cursor: pointer; }
.toast { position: fixed; left: 24px; bottom: 24px; z-index: 4000; max-width: 350px; padding: 12px 17px; border-radius: 9px; color: #fff; background: #202938; box-shadow: var(--shadow-lg); font-size: 12px; opacity: 0; transform: translateY(10px); pointer-events: none; transition: .25s; }.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 950px) {
  .nav-links { display: none; position: absolute; top: 68px; right: 0; left: 0; padding: 15px 18px; flex-direction: column; gap: 13px; background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow); }
  .nav-links.mobile-open { display: flex; }
  .nav-links a.active::after { display: none; }
  .mobile-nav-button { display: block; margin-inline-start: auto; }.nav-actions { display: none; }
  .profile-hero-content { grid-template-columns: auto 1fr; }.hero-actions { grid-column: 1 / -1; }
  .stats-card { grid-template-columns: repeat(3,1fr); }.stats-card > div:nth-child(3) { border-left: 0; }.stats-card > div:nth-child(n+4) { border-top: 1px solid var(--border); }
  .profile-layout { grid-template-columns: 1fr; }.profile-sidebar { position: static; grid-template-columns: repeat(2,1fr); }.hire-card { grid-column: 1 / -1; }
}
@media (max-width: 680px) {
  .container { width: min(100% - 24px, 1180px); }
  .profile-hero { padding: 35px 0 65px; }.profile-hero-content { grid-template-columns: 1fr; text-align: center; }.profile-avatar-wrap { justify-self: center; }.identity-line, .profile-meta, .profile-tags, .hero-actions { justify-content: center; }.identity-line h1 { font-size: 28.8px; }.hero-actions { width: 100%; }.hero-actions .button { flex: 1; }
  .stats-card { grid-template-columns: repeat(2,1fr); }.stats-card > div { border-left: 1px solid var(--border) !important; border-top: 1px solid var(--border); }.stats-card > div:nth-child(1), .stats-card > div:nth-child(2) { border-top: 0; }.stats-card > div:nth-child(even) { border-left: 0 !important; }
  .profile-sidebar { grid-template-columns: 1fr; }.hire-card { grid-column: auto; }
  .featured-grid { grid-template-columns: 1fr; }.featured-item { height: 210px; }.portfolio-grid, .services-grid { grid-template-columns: 1fr; }
  .portfolio-heading { align-items: flex-start; flex-direction: column; }.review-overview { grid-template-columns: 1fr; }.rating-block { border-left: 0; border-bottom: 1px solid var(--border); padding-bottom: 16px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }.footer-grid > div:first-child { grid-column: 1 / -1; }
  .portfolio-dialog { grid-template-columns: 1fr; }.modal-image-wrap { min-height: 280px; }.modal-project-copy { padding: 20px; }
}
@media (max-width: 420px) {
  .profile-avatar { width: 105px; height: 105px; }.hero-actions { flex-direction: column; }
  .stats-card { grid-template-columns: 1fr; }.stats-card > div { border-left: 0 !important; border-top: 1px solid var(--border) !important; }.stats-card > div:first-child { border-top: 0 !important; }
  .profile-tabs { gap: 15px; }.footer-grid { grid-template-columns: 1fr; }.footer-grid > div:first-child { grid-column: auto; }
}
