:root {
    --sidebar-bg: #0f172a; /* deep slate */
    --sidebar-fg: #e5e7eb; /* light text */
    --sidebar-muted: rgba(255, 255, 255, 0.9); /* brighter muted for contrast */
    --sidebar-accent: #0d6efd; /* bootstrap primary */
  }

  /* Blue block behind the name */
  .name-chip {
    background: var(--bs-primary, #0d6efd); /* uses Bootstrap primary */
    color: #fff;
    font-weight: 800; /* bold name only */
    padding: 0.05em 0.35em; /* tight pill around text */
    border-radius: 0.2em; /* soft corners */
    box-decoration-break: clone; /* keep background on wrapped lines */
    -webkit-box-decoration-break: clone;
  }

  /* Base layout */
  body {
    scroll-behavior: smooth;
  }
  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 280px;
    padding: 1.25rem;
    overflow-y: auto;
    background: var(--sidebar-bg);
    border-right: 0;
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.06);
  }
  .main {
    margin-left: 280px;
  }
  .title {
    text-decoration: none;
  }
  .section-title {
    font-weight: 700;
    margin-bottom: 1rem;
    padding: 0.5rem 0;
    border-bottom: 2px solid #e9ecef;
  }

  /* Sidebar header (photo + name) */
  .profile-pic {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.28);
  }
  .sidebar h1,
  .sidebar .h4 {
    color: #fff;
  }
  .sidebar small {
    color: var(--sidebar-muted);
    font-weight: 500;
  }

  /* Sidebar nav links — icon + label */
  .sidebar .nav-link {
    color: rgba(229, 231, 235, 0.88);
    padding: 0.6rem 0.75rem;
    border-left: 3px solid transparent;
    border-radius: 0.5rem;
    transition: background 0.18s ease, color 0.18s ease,
      border-color 0.18s ease, transform 0.18s ease;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.65rem;
  }
  .sidebar .nav-link i {
    color: var(--sidebar-accent);
    font-size: 1.25rem;
    width: 1.5rem; /* consistent alignment */
    text-align: center;
    flex: 0 0 1.5rem;
  }
  .sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #2576e0;
    transform: translateX(2px);
  }
  .sidebar .nav-link.active {
    color: #fff;
    background: rgba(13, 110, 253, 0.14);
    border-left-color: var(--sidebar-accent);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25) inset;
  }
  .sidebar .nav-link:focus-visible {
    outline: 2px solid var(--sidebar-accent);
    outline-offset: 2px;
  }

  /* Responsive: switch to light sidebar when stacked */
  @media (max-width: 991.98px) {
    .sidebar {
      position: static;
      width: 100%;
      background: #f8f9fa;
      border-right: 0;
      border-bottom: 1px solid #e9ecef;
      box-shadow: none;
    }
    .sidebar .nav-link {
      color: #1f2937;
      border-left-color: transparent;
    }
    .sidebar .nav-link i {
      color: #0d6efd;
    }
    .sidebar .nav-link.active {
      color: #0d6efd;
      background: rgba(13, 110, 253, 0.08);
      border-left-color: transparent;
    }
    .main {
      margin-left: 0;
    }
    .profile-pic {
      border-color: #dee2e6;
    }
    .sidebar h1,
    .sidebar .h4 {
      color: #212529;
    }
    .sidebar small {
      color: #6c757d;
    }
  }

  /* Quick-links buttons (outline, rounded) */
  .btn-ql {
    --ql-border: #1f2b57;
    --ql-text: #1f2b57;
    padding: 0.95rem 2.25rem;
    border: 3px solid var(--ql-border);
    color: var(--ql-text);
    background: #fff;
    border-radius: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
  }
  .btn-ql:hover,
  .btn-ql:focus {
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(31, 43, 87, 0.12);
  }
  .btn-ql-active {
    --ql-text: #0d8577;
  }
  .btn-ql .ql-bracket {
    font-weight: 700;
    margin: 0 0.35rem;
    line-height: 1;
  }
  .quick-links .btn-ql {
    flex: 1 0 auto;
  }
  @media (max-width: 576px) {
    .quick-links {
      gap: 0.75rem;
    }
    .btn-ql {
      width: 100%;
      text-align: center;
    }
  }

  /* Contact styles */
  #contact .form-control:focus,
  #contact .form-select:focus {
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
    border-color: rgba(13, 110, 253, 0.6);
  }
  #contact .form-control::placeholder {
    color: #9aa3ab;
  }
  .btn-outline-accent {
    --accent: #f59e0b;
    color: var(--accent);
    border: 3px solid var(--accent);
    background: transparent;
    border-radius: 0.25rem;
  }
  .btn-outline-accent:hover,
  .btn-outline-accent:focus {
    color: #fff;
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 0 0.2rem rgba(245, 158, 11, 0.25);
  }
  #contact .form-check-input {
    width: 1.1rem;
    height: 1.1rem;
    margin-top: 0.2rem;
  }

  /* Media list styles */
  .media-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
  .media-card {
    border: 1px solid #e9ecef;
    border-radius: 0.75rem;
    background: #fff;
  }
  .media-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
  }
  .media-title {
    font-weight: 400;
    margin: 0;
    color: #0d6efd;
  }
  .media-sub,
  .media-date {
    font-size: 0.9rem;
    color: #6c757d;
  }
  .media-desc {
    margin: 0.75rem 0 0 0;
  }
  @media (max-width: 576px) {
    .media-top {
      flex-direction: column;
    }
    .media-date {
      align-self: flex-start;
    }
  }

  /* High-contrast social pills */
  .socials .social {
    --ring: #1f2b57;
    --hover: #0d6efd;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 4px solid var(--ring);
    background: #fff;
    color: #1f2b57;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
    transition: transform 0.15s ease, background 0.15s ease,
      color 0.15s ease, border-color 0.15s ease;
    text-decoration: none;
  }
  .socials .social:hover,
  .socials .social:focus-visible {
    background: var(--hover);
    color: #fff;
    border-color: var(--hover);
    transform: translateY(-2px);
    outline: none;
  }