@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;800;900&display=swap');

* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #181417;
  --surface: rgba(43, 41, 41, .72);
  --surface-strong: rgba(53, 47, 53, .92);
  --card: rgba(255,255,255,.075);
  --card-2: rgba(255,255,255,.105);
  --border: rgba(255,255,255,.14);
  --text: #ffffff;
  --muted: #cfc6d0;
  --soft: #9f94a0;
  --purple: #82007c;
  --purple-2: #a01498;
  --purple-3: #d99bd2;
  --yellow: #fbff57;
  --danger: #ff5c8a;
  --success: #3de8aa;
  --shadow: 0 24px 80px rgba(0,0,0,.35);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}
body {
  min-height: 100vh;
  font-family: 'Cairo', sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 10%, rgba(251,255,87,.09), transparent 24%),
    radial-gradient(circle at 85% 18%, rgba(217,155,210,.18), transparent 26%),
    linear-gradient(135deg, #171316, #252125 52%, #1b151b);
  overflow-x: hidden;
}
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
input, textarea, select {
  width: 100%; border: 1px solid var(--border); color: var(--text);
  background: rgba(255,255,255,.07); border-radius: 16px; padding: 12px 14px;
  outline: none; transition: .25s ease;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: rgba(251,255,87,.65); box-shadow: 0 0 0 4px rgba(251,255,87,.08); }
select option { background: #211b21; }

.dashboard-shell { min-height: 100vh; display: flex; }
.sidebar {
  width: 278px; position: sticky; top: 0; height: 100vh; padding: 22px;
  border-right: 1px solid var(--border); background: rgba(18, 12, 18, .64);
  backdrop-filter: blur(22px); display: flex; flex-direction: column; z-index: 40;
}
.brand { display: flex; align-items: center; gap: 14px; padding: 10px 6px 24px; border-bottom: 1px solid var(--border); }
.brand-mark, .avatar {
  display: grid; place-items: center; flex: 0 0 auto;
  background: linear-gradient(135deg, var(--purple-2), var(--purple)); color: white;
  box-shadow: 0 16px 30px rgba(160,20,152,.24);
}
.brand-mark { width: 54px; height: 54px; border-radius: 18px; font-weight: 900; }
.brand h2 { font-size: 18px; line-height: 1.1; }
.brand p, .admin-profile p, .sidebar-footer p, .page-heading p, .panel p { color: var(--muted); font-size: 13px; }
.side-nav { display: grid; gap: 9px; padding: 22px 0; }
.nav-link {
  border: 0; width: 100%; color: var(--muted); background: transparent; display: flex; align-items: center; gap: 12px;
  padding: 13px 14px; border-radius: 18px; transition: .25s ease; text-align: left; font-weight: 800;
}
.nav-link span { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 10px; background: rgba(255,255,255,.06); }
.nav-link:hover { color: var(--text); background: rgba(255,255,255,.08); transform: translateX(4px); }
.nav-link.active { color: white; background: linear-gradient(135deg, var(--purple-2), var(--purple)); box-shadow: 0 16px 32px rgba(160,20,152,.22); }
.sidebar-footer { margin-top: auto; padding: 18px; border: 1px solid var(--border); border-radius: 22px; background: rgba(255,255,255,.06); }
.sidebar-footer strong { display: block; margin: 3px 0 12px; color: var(--yellow); }
.status-bar { height: 8px; background: rgba(255,255,255,.09); border-radius: 999px; overflow: hidden; }
.status-bar span { display: block; width: 86%; height: 100%; background: linear-gradient(90deg, var(--purple-2), var(--yellow)); }

.main-area { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.topbar {
  height: 76px; position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 18px; justify-content: space-between;
  padding: 0 26px; border-bottom: 1px solid var(--border); background: rgba(24,20,23,.64); backdrop-filter: blur(22px);
}
.menu-toggle, .icon-button { display: none; }
.search-wrap {
  width: min(520px, 100%); display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,.07);
  border: 1px solid var(--border); border-radius: 18px; padding-left: 14px;
}
.search-wrap input { border: 0; background: transparent; padding-left: 0; }
.top-actions { display: flex; align-items: center; gap: 16px; }
.icon-button { position: relative; border: 0; color: var(--text); background: rgba(255,255,255,.08); border-radius: 14px; width: 44px; height: 44px; }
.notification-dot { position: absolute; right: 10px; top: 10px; width: 8px; height: 8px; background: var(--yellow); border-radius: 50%; }
.admin-profile { display: flex; align-items: center; gap: 10px; padding-left: 16px; border-left: 1px solid var(--border); }
.avatar { width: 42px; height: 42px; border-radius: 14px; font-weight: 900; }
.content { padding: 28px; }
.page { display: none; animation: fadeUp .45s ease both; }
.page.active { display: block; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 26px; }
.page-heading.compact { margin-bottom: 22px; }
.eyebrow { color: var(--yellow); text-transform: uppercase; font-size: 12px; letter-spacing: .13em; font-weight: 900; }
h1 { font-size: clamp(32px, 4vw, 46px); line-height: 1.1; margin: 4px 0 8px; }
h2, h3 { line-height: 1.25; }
.primary-btn, .ghost-btn {
  border: 0; min-height: 45px; padding: 0 18px; border-radius: 16px; font-weight: 900; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: .25s ease;
}
.primary-btn { background: var(--yellow); color: #151215; box-shadow: 0 14px 28px rgba(251,255,87,.18); }
.primary-btn:hover { transform: translateY(-3px); box-shadow: 0 18px 34px rgba(251,255,87,.28); }
.ghost-btn { color: var(--text); background: rgba(255,255,255,.08); border: 1px solid var(--border); }
.ghost-btn:hover { background: rgba(255,255,255,.13); transform: translateY(-2px); }

.stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-bottom: 18px; }
.stat-card, .panel, .project-card, .skill-card, .message-item, .resume-card, .settings-form {
  border: 1px solid var(--border); background: var(--card); backdrop-filter: blur(18px); border-radius: var(--radius-xl); box-shadow: var(--shadow);
}
.stat-card { padding: 22px; display: flex; justify-content: space-between; align-items: flex-start; transition: .25s ease; overflow: hidden; position: relative; }
.stat-card::after { content: ''; position: absolute; inset: auto -45px -45px auto; width: 135px; height: 135px; border-radius: 50%; background: rgba(251,255,87,.06); }
.stat-card:hover { transform: translateY(-5px); border-color: rgba(251,255,87,.24); }
.stat-card p { color: var(--muted); font-size: 13px; }
.stat-card h2 { font-size: 42px; margin: 5px 0; }
.stat-card span { color: var(--soft); font-size: 12px; }
.stat-icon { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; font-size: 24px; font-weight: 900; position: relative; z-index: 1; }
.stat-icon.purple { background: linear-gradient(135deg, var(--purple-2), var(--purple)); }
.stat-icon.yellow { background: var(--yellow); color: #171317; }
.stat-icon.pink { background: linear-gradient(135deg, var(--purple-3), var(--purple-2)); }
.two-column { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.panel { padding: 22px; }
.panel-header { margin-bottom: 16px; display: flex; justify-content: space-between; align-items: center; }
.quick-actions { display: grid; gap: 12px; }
.action-card { border: 1px solid var(--border); color: var(--text); background: rgba(255,255,255,.06); border-radius: 20px; padding: 16px; text-align: left; display: flex; gap: 14px; align-items: center; transition: .25s ease; }
.action-card span { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; background: linear-gradient(135deg, var(--purple-2), var(--purple)); font-size: 22px; }
.action-card:hover { transform: translateX(4px); background: rgba(255,255,255,.1); }
.yellow-action span { background: var(--yellow); color: #171317; }
.activity-list { display: grid; gap: 12px; }
.activity-item { display: grid; grid-template-columns: 10px 1fr auto; gap: 12px; align-items: start; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.activity-item:last-child { border-bottom: 0; padding-bottom: 0; }
.activity-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); margin-top: 8px; box-shadow: 0 0 18px rgba(251,255,87,.8); }
.activity-time { color: var(--soft); font-size: 12px; }

.filter-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.filter-chip { border: 1px solid var(--border); color: var(--muted); background: rgba(255,255,255,.06); border-radius: 999px; padding: 9px 15px; font-weight: 800; transition: .25s ease; }
.filter-chip:hover, .filter-chip.active { color: #171317; background: var(--yellow); border-color: transparent; }
.projects-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.project-card { overflow: hidden; transition: .25s ease; }
.project-card:hover { transform: translateY(-6px); border-color: rgba(251,255,87,.24); }
.project-image { position: relative; height: 170px; overflow: hidden; background: linear-gradient(135deg, rgba(160,20,152,.5), rgba(251,255,87,.18)); }
.project-image img { width: 100%; height: 100%; object-fit: cover; display: block; transition: .45s ease; }
.project-card:hover .project-image img { transform: scale(1.06); }
.category-badge { position: absolute; top: 12px; right: 12px; background: rgba(24,20,23,.72); border: 1px solid var(--border); backdrop-filter: blur(10px); padding: 5px 10px; border-radius: 999px; font-size: 11px; color: var(--yellow); font-weight: 900; }
.project-body { padding: 18px; }
.project-body p { margin: 8px 0 16px; min-height: 44px; }
.card-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.mini-btn { border: 1px solid var(--border); color: var(--text); background: rgba(255,255,255,.07); border-radius: 12px; min-height: 36px; padding: 0 11px; font-weight: 800; transition: .22s ease; }
.mini-btn:hover { background: var(--yellow); color: #171317; }
.mini-btn.danger:hover { background: var(--danger); color: white; }
.links-row { display: flex; gap: 12px; margin-top: 12px; }
.links-row a { color: var(--muted); font-size: 12px; text-decoration: none; }
.links-row a:hover { color: var(--yellow); }

.skills-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.skill-card { padding: 20px; transition: .25s ease; position: relative; }
.skill-card:hover { transform: translateY(-5px); }
.featured-star { position: absolute; top: 18px; right: 18px; color: var(--yellow); filter: drop-shadow(0 0 10px rgba(251,255,87,.7)); }
.skill-meta { color: var(--muted); font-size: 12px; margin: 2px 0 18px; }
.progress-head { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.progress { height: 9px; border-radius: 999px; background: rgba(255,255,255,.09); overflow: hidden; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--purple-2), var(--yellow)); border-radius: inherit; }
.skill-actions { margin-top: 18px; }

.message-layout { display: grid; grid-template-columns: minmax(260px, 380px) 1fr; gap: 18px; }
.message-list { display: grid; gap: 12px; align-content: start; }
.message-item { padding: 16px; text-align: left; color: var(--text); transition: .25s ease; border-radius: 22px; }
.message-item:hover, .message-item.active { border-color: rgba(251,255,87,.32); transform: translateX(3px); }
.message-top { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.unread-pill { color: #171317; background: var(--yellow); border-radius: 999px; font-size: 10px; padding: 3px 7px; font-weight: 900; }
.message-preview { min-height: 360px; }
.empty-state { height: 260px; display: grid; place-items: center; color: var(--muted); text-align: center; }
.preview-body { color: var(--muted); line-height: 1.8; margin: 18px 0; }

.resume-card { display: flex; align-items: center; gap: 22px; max-width: 820px; }
.resume-icon { width: 98px; height: 118px; border-radius: 22px; display: grid; place-items: center; background: linear-gradient(135deg, var(--purple-2), var(--purple)); font-weight: 900; font-size: 22px; box-shadow: 0 18px 34px rgba(160,20,152,.25); }
.resume-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.file-label { cursor: pointer; }
.settings-form { max-width: 900px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; margin-bottom: 14px; }
.form-grid.two { grid-template-columns: 1fr 1fr; }
label { display: grid; gap: 7px; color: var(--muted); font-weight: 800; font-size: 13px; }
.settings-form .primary-btn { margin-top: 16px; }
.check-label { display: flex; align-items: center; gap: 9px; }
.check-label input { width: 18px; height: 18px; }

.modal { position: fixed; inset: 0; display: none; place-items: center; padding: 20px; background: rgba(0,0,0,.58); backdrop-filter: blur(8px); z-index: 100; }
.modal.show { display: grid; }
.modal-card { width: min(720px, 100%); max-height: 92vh; overflow: auto; padding: 22px; border-radius: 28px; background: rgba(34,28,34,.96); border: 1px solid var(--border); box-shadow: var(--shadow); animation: scaleIn .25s ease both; }
.modal-card.small { width: min(480px, 100%); }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.close-modal { width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--border); background: rgba(255,255,255,.08); color: var(--text); font-size: 24px; }
.modal form { display: grid; gap: 14px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }
.toast { position: fixed; right: 26px; bottom: 26px; transform: translateY(20px); opacity: 0; pointer-events: none; z-index: 110; background: var(--yellow); color: #171317; border-radius: 16px; padding: 13px 18px; font-weight: 900; box-shadow: 0 18px 35px rgba(0,0,0,.35); transition: .25s ease; }
.toast.show { opacity: 1; transform: translateY(0); }

@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes scaleIn { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: scale(1); } }

@media (max-width: 1100px) {
  .projects-grid, .skills-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .two-column, .message-layout { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .sidebar { position: fixed; left: 0; transform: translateX(-105%); transition: .3s ease; }
  .sidebar.open { transform: translateX(0); }
  .menu-toggle, .icon-button { display: grid; place-items: center; border: 0; }
  .menu-toggle { width: 44px; height: 44px; border-radius: 14px; color: var(--text); background: rgba(255,255,255,.08); }
  .topbar { padding: 0 14px; }
  .admin-profile div:last-child { display: none; }
  .content { padding: 18px; }
  .page-heading { flex-direction: column; }
  .stats-grid, .projects-grid, .skills-grid { grid-template-columns: 1fr; }
  .form-grid, .form-grid.two { grid-template-columns: 1fr; }
  .resume-card { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 520px) {
  .search-wrap { display: none; }
  .topbar { justify-content: space-between; }
  .modal-actions, .resume-actions { flex-direction: column; }
  .modal-actions > *, .resume-actions > * { width: 100%; }
}
