* { margin: 0; padding: 0; box-sizing: border-box; }

  /* Design tokens (palette + fonts + dark mode) live in css/tokens.css */

  html, body {
    font-family: 'Cairo', 'Inter', system-ui, sans-serif;
    color: var(--gray-900);
    background: var(--white);
    min-height: 100%;
  }

  body {
    background:
      radial-gradient(ellipse 900px 600px at 85% 5%, #dbeafe 0%, transparent 55%),
      radial-gradient(ellipse 800px 500px at 10% 90%, #fef3c7 0%, transparent 55%),
      #f8fafc;
    min-height: 100vh;
  }

  /* Nav */
  .nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--gray-200);
  }
  .nav-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    min-height: var(--nav-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: nowrap;
  }
  .logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Cairo', 'Inter', sans-serif;
    font-weight: 900;
    font-size: 22px;
    color: var(--dark);
    text-decoration: none;
    white-space: nowrap;
  }
  .logo .mark {
    width: 36px;
    height: 36px;
    background: var(--primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    box-shadow: 0 6px 16px rgba(43,76,255,0.35);
  }
  .logo span.b { color: var(--primary); }
  .nav-links {
    display: flex;
    gap: 20px;
    list-style: none;
    margin: 0 auto;
    white-space: nowrap;
    flex-wrap: nowrap;
    align-items: center;
  }
  .nav-links a {
    color: var(--gray-700);
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    padding: 8px 12px;
    border-radius: 9px;
    transition: color .2s ease, background .2s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
  }
  .nav-links a:hover { color: var(--primary); background: var(--bg-soft); }
  .nav-links a.active { color: var(--primary); }
  .nav-cta { display: flex; gap: 10px; align-items: center; white-space: nowrap; }
  .nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--gray-200);
    background: var(--surface);
    border-radius: 11px;
    cursor: pointer;
    padding: 0;
    align-items: center;
    justify-content: center;
  }
  .nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
    content: "";
    display: block;
    width: 20px;
    height: 2px;
    background: var(--dark);
    border-radius: 2px;
    position: relative;
    transition: transform .25s ease, opacity .2s ease;
  }
  .nav-toggle span::before { position: absolute; top: -6px; }
  .nav-toggle span::after { position: absolute; top: 6px; }
  .nav-toggle[aria-expanded="true"] span { background: transparent; }
  .nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }
  .btn-icon {
    width: 38px; height: 38px;
    border-radius: 10px;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: 0.2s;
    font-size: 15px;
  }
  .btn-icon:hover { background: var(--primary-light); border-color: var(--primary); }
  .btn-msg {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 9px 18px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 15px;
    cursor: pointer;
    transition: 0.2s;
    font-family: inherit;
    box-shadow: 0 6px 16px rgba(43,76,255,0.3);
  }
  .btn-msg:hover { background: var(--primary-2); }

  /* Container */
  .container { max-width: 1100px; margin: 0 auto; padding: 0 20px 60px; }

  /* Cover */
  .cover {
    height: 220px;
    background:
      linear-gradient(135deg, rgba(42,75,216,0.7), rgba(67,100,230,0.5)),
      url('https://images.unsplash.com/photo-1522778119026-d647f0596c20?w=1400&q=80') center/cover;
    border-radius: 20px 20px 0 0;
    position: relative;
    margin-top: 20px;
  }
  .cover .verified {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255,255,255,0.95);
    color: var(--primary);
    font-weight: 800;
    font-size: 12px;
    padding: 7px 14px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    gap: 6px;
  }

  /* Profile head */
  .profile-head {
    background: var(--surface);
    border: 1px solid var(--gray-200);
    border-top: none;
    border-radius: 0 0 20px 20px;
    padding: 0 30px 22px;
    position: relative;
  }
  .avatar-wrap {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-top: -65px;
    flex-wrap: wrap;
    gap: 16px;
  }
  .avatar {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    border: 5px solid var(--surface);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    color: #fff;
    overflow: hidden;
  }
  .avatar img { width: 100%; height: 100%; object-fit: cover; }
  .online {
    width: 22px;
    height: 22px;
    background: var(--green);
    border: 4px solid var(--surface);
    border-radius: 50%;
    position: absolute;
    bottom: 8px;
    right: 8px;
  }
  .head-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
  }
  .btn {
    padding: 10px 18px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: 0.2s;
    font-family: inherit;
    border: 1.5px solid;
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
  }
  .btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
  .btn-primary:hover { background: var(--primary-2); }
  .btn-secondary { background: var(--surface); color: var(--gray-700); border-color: var(--gray-200); }
  .btn-secondary:hover { background: var(--gray-50); border-color: var(--primary); color: var(--primary); }

  .name-block {
    margin-top: 16px;
  }
  .name-block h1 {
    font-family: 'Cairo', 'Inter', sans-serif;
    font-size: 28px;
    font-weight: 900;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
  }
  .name-block h1 .check {
    width: 26px; height: 26px;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(42, 75, 216, 0.35);
  }
  .name-block h1 .check svg {
    width: 14px; height: 14px;
    display: block;
  }
  .handle {
    color: var(--gray-500);
    font-size: 14px;
    font-weight: 600;
    margin-top: 2px;
  }
  .tags {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
  }
  .tag {
    background: var(--primary-light);
    color: var(--primary);
    font-size: 12.5px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
  }
  .tag.green { background: var(--green-bg); color: var(--green); }
  .tag.orange { background: var(--orange-bg); color: var(--orange); }
  .tag.gray { background: var(--gray-100); color: var(--gray-700); }

  /* Quick stats row */
  .quick-stats {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-top: 22px;
  }
  .qs {
    background: var(--gray-50);
    border: 1px solid var(--gray-100);
    border-radius: 12px;
    padding: 12px;
    text-align: center;
  }
  .qs b {
    display: block;
    font-family: 'Cairo', 'Inter', sans-serif;
    font-size: 18px;
    font-weight: 900;
    color: var(--dark);
  }
  .qs span {
    font-size: 11.5px;
    color: var(--gray-500);
    font-weight: 600;
  }

  /* Layout */
  .layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 20px;
    margin-top: 24px;
  }
  .main { min-width: 0; }
  .side { min-width: 0; }

  .card {
    background: var(--surface);
    border: 1px solid var(--gray-200);
    border-radius: 16px;
    padding: 22px;
    margin-bottom: 18px;
  }
  .card-title {
    font-family: 'Cairo', 'Inter', sans-serif;
    font-size: 17px;
    font-weight: 900;
    color: var(--dark);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .card-title .ico {
    width: 32px; height: 32px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    margin-left: 8px;
  }
  .card-title a {
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
  }

  /* Bio */
  .bio { color: var(--gray-700); line-height: 1.8; font-size: 14.5px; }

  /* Stats big */
  .stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
  }
  .stat {
    background: linear-gradient(135deg, var(--surface), var(--gray-50));
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 16px 12px;
    text-align: center;
    position: relative;
    overflow: hidden;
  }
  .stat::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--primary);
  }
  .stat .num {
    font-family: 'Cairo', 'Inter', sans-serif;
    font-size: 28px;
    font-weight: 900;
    color: var(--dark);
    line-height: 1;
  }
  .stat .lab {
    font-size: 12px;
    color: var(--gray-500);
    font-weight: 600;
    margin-top: 4px;
  }
  .stat .trend {
    font-size: 11px;
    color: var(--green);
    font-weight: 800;
    margin-top: 2px;
  }

  /* Video gallery */
  .video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  .v-card {
    background: var(--gray-900);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    aspect-ratio: 16/10;
    cursor: pointer;
    transition: 0.2s;
  }
  .v-card:hover { transform: translateY(-2px); }
  .v-card .thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  .v-card .play {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 44px; height: 44px;
    background: rgba(0,0,0,0.65);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    font-size: 16px;
  }
  .v-card .duration {
    position: absolute;
    bottom: 8px; right: 8px;
    background: rgba(0,0,0,0.75);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 4px;
  }
  .v-card .v-label {
    position: absolute;
    top: 8px; left: 8px;
    background: rgba(42,75,216,0.92);
    color: #fff;
    font-size: 10.5px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 999px;
  }

  /* Achievements */
  .ach-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .ach {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 1px solid #fcd34d;
    border-radius: 12px;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
  }
  .ach .ico {
    font-size: 32px;
    width: 50px; height: 50px;
    background: rgba(255,255,255,0.6);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
  }
  .ach h4 { font-size: 13.5px; font-weight: 800; color: var(--dark); }
  .ach p { font-size: 11.5px; color: #92400e; font-weight: 600; margin-top: 2px; }

  /* Documents */
  .doc-list { display: flex; flex-direction: column; gap: 8px; }
  .doc {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--gray-50);
    border: 1px solid var(--gray-100);
    border-radius: 10px;
    transition: 0.2s;
  }
  .doc:hover { background: var(--primary-light); border-color: var(--primary); }
  .doc .dico {
    width: 38px; height: 38px;
    background: var(--primary);
    color: #fff;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
  }
  .doc .dinfo { flex: 1; }
  .doc .dinfo b { font-size: 13.5px; font-weight: 700; color: var(--dark); display: block; }
  .doc .dinfo span { font-size: 11.5px; color: var(--gray-500); }
  .doc .view {
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
  }

  /* Career */
  .timeline { position: relative; padding-right: 16px; }
  .timeline::before {
    content: "";
    position: absolute;
    right: 6px;
    top: 6px; bottom: 6px;
    width: 2px;
    background: var(--gray-200);
  }
  .tl-item {
    position: relative;
    padding: 10px 0 14px;
  }
  .tl-item::before {
    content: "";
    position: absolute;
    right: -16px;
    top: 14px;
    width: 12px; height: 12px;
    background: var(--primary);
    border: 3px solid var(--surface);
    border-radius: 50%;
    box-shadow: 0 0 0 2px var(--primary);
  }
  .tl-item .year {
    font-size: 11.5px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 2px;
  }
  .tl-item .title { font-size: 14px; font-weight: 800; color: var(--dark); }
  .tl-item .sub { font-size: 12.5px; color: var(--gray-500); margin-top: 2px; }

  /* Sidebar widgets */
  .widget {
    background: var(--surface);
    border: 1px solid var(--gray-200);
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 18px;
  }
  .widget h3 {
    font-family: 'Cairo', 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 900;
    color: var(--dark);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .widget h3 .ico {
    width: 26px; height: 26px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
  }

  .info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 0;
    border-bottom: 1px solid var(--gray-100);
    font-size: 13.5px;
  }
  .info-row:last-child { border-bottom: none; }
  .info-row b { color: var(--dark); font-weight: 700; }
  .info-row span { color: var(--gray-500); font-weight: 600; }

  /* Rating */
  .rating {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
  }
  .rating-num {
    font-family: 'Cairo', 'Inter', sans-serif;
    font-size: 38px;
    font-weight: 900;
    color: var(--dark);
    line-height: 1;
  }
  .rating-info { flex: 1; }
  .stars { color: #fbbf24; font-size: 16px; margin-bottom: 4px; }
  .rating-info span { font-size: 12px; color: var(--gray-500); font-weight: 600; }

  .rating-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--gray-500);
    margin-bottom: 6px;
    font-weight: 600;
  }
  .rating-bar .bar {
    flex: 1;
    height: 5px;
    background: var(--gray-100);
    border-radius: 3px;
    overflow: hidden;
  }
  .rating-bar .bar div {
    height: 100%;
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
    border-radius: 3px;
  }

  /* Contact */
  .contact-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid var(--gray-100);
    font-size: 13px;
  }
  .contact-row:last-child { border-bottom: none; }
  .contact-row .ci {
    width: 30px; height: 30px;
    background: var(--gray-100);
    border-radius: 7px;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
  }
  .contact-row b { font-weight: 700; color: var(--dark); font-size: 13px; }
  .contact-row span { color: var(--gray-500); font-size: 11.5px; display: block; direction: ltr; text-align: right; }

  /* Social */
  .socials-row {
    display: flex;
    gap: 8px;
    margin-top: 8px;
  }
  .social-pill {
    flex: 1;
    padding: 8px;
    background: var(--gray-50);
    border: 1px solid var(--gray-100);
    border-radius: 10px;
    text-align: center;
    font-size: 18px;
    cursor: pointer;
    transition: 0.2s;
    text-decoration: none;
    color: var(--gray-700);
  }
  .social-pill:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
  }

  /* Skills */
  .skill {
    margin-bottom: 12px;
  }
  .skill .s-row {
    display: flex;
    justify-content: space-between;
    font-size: 12.5px;
    margin-bottom: 5px;
    color: var(--gray-700);
    font-weight: 700;
  }
  .skill .s-bar {
    height: 6px;
    background: var(--gray-100);
    border-radius: 4px;
    overflow: hidden;
  }
  .skill .s-bar > div {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-2));
    border-radius: 4px;
    transition: width 1s ease-out;
  }

  /* Performance chart */
  .chart {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 100px;
    margin-top: 8px;
  }
  .bar-col {
    flex: 1;
    background: linear-gradient(180deg, var(--primary), var(--primary-2));
    border-radius: 4px 4px 0 0;
    position: relative;
    transition: 0.3s;
    min-height: 8px;
  }
  .bar-col:hover { opacity: 0.8; }
  .bar-col span {
    position: absolute;
    bottom: -20px;
    left: 0; right: 0;
    text-align: center;
    font-size: 10px;
    color: var(--gray-500);
    font-weight: 700;
  }

  /* Responsive */
  @media (max-width: 900px) {
    .layout { grid-template-columns: 1fr; }
    .quick-stats { grid-template-columns: repeat(3, 1fr); }
    .video-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .nav-toggle { display: inline-flex; }
    .nav-links, .nav-cta {
      position: fixed;
      left: 0;
      right: 0;
      top: var(--nav-h);
      flex-direction: column;
      align-items: stretch;
      gap: 6px;
      background: var(--surface);
      padding: 14px 22px;
      border-bottom: 1px solid var(--gray-200);
      box-shadow: 0 14px 30px rgba(15, 23, 42, .14);
      transform: translateY(-12px);
      opacity: 0;
      pointer-events: none;
      visibility: hidden;
      transition: opacity .2s ease, transform .2s ease, visibility .2s;
    }
    .nav-cta { top: auto; box-shadow: none; border: none; padding-top: 0; }
    .nav.nav-open .nav-links, .nav.nav-open .nav-cta { transform: none; opacity: 1; pointer-events: auto; visibility: visible; }
    .nav-links { margin: 0; }
    .nav-links a { display: block; padding: 12px 12px; font-size: 1.05rem; border-bottom: 1px solid var(--gray-200); border-radius: 0; }
    .nav-cta .btn, .nav-cta .btn-msg { width: 100%; text-align: center; }
  }
  @media (max-width: 600px) {
    .quick-stats { grid-template-columns: repeat(2, 1fr); }
    .video-grid { grid-template-columns: 1fr; }
    .ach-grid { grid-template-columns: 1fr; }
    .cover { height: 160px; }
    .avatar { width: 100px; height: 100px; font-size: 48px; }
    .name-block h1 { font-size: 22px; }
  }

.avatar-relative { position: relative; }
.bar-col[data-height] { height: calc(var(--bar-height) * 1%); }
.rating-bar .bar div[data-width] { width: calc(var(--bar-width) * 1%); }
.skill .s-bar > div[data-width] { width: calc(var(--bar-width) * 1%); }
