
    body, html {
      height: 100%;
    }

    .messages-box {
    flex: 1;
    overflow-y: auto;
    max-height: 70vh; /* Ensures the chat area is scrollable */
    display: flex;
    flex-direction: column;
    }

    .messages-list {
      padding-left: 0;
    }

    .message {
      margin-bottom: 15px;
      list-style: none;
      display: flex;
      justify-content: flex-start;
    }

    .message.sent,
    .message.therapist {
      justify-content: flex-end;
      text-align: right;
    }


    .message-text {
      padding: 10px;
      border-radius: 5px;
    }

    .sent {
      background-color: #dcf8c6;
      align-self: flex-end;
      border-radius: 15px 15px 0px 15px;
    }

    .received {
      background-color: #f1f0f0;
      align-self: flex-start;
      border-radius: 15px 15px 15px 0px;
    }

    .message-form {
      display: flex;
      /* ❌ REMOVE this block */
      /* position: fixed;
      bottom: 0;
      left: 0;
      right: 0; */
      padding: 10px;
      background-color: #f8f9fa;
    }
    

    .message-input {
      flex: 1;
      border-radius: 20px;
      border-right: none;
    }

    .btn-send {
      border-radius: 0;
    }

    .chat-container {
      height: 100%;
      display: flex;
      flex-direction: column;
    }

    .therapist {
    background-color: #3C83F7 !important; /* Bootstrap primary blue */
    color: rgb(255, 255, 255) !important; /* Ensures text is readable */
    align-self: flex-end;
    }

    .system-message {
    text-align: center;
    color: gray;
    font-style: italic;
    margin: 10px 0;
    font-size: 0.9rem;
    justify-content: center;
    display: flex;
    }
    
    .system-message .message-text {
    background: none;
    padding: 0;
    }
    
    .nav-link.dropdown-toggle.active {
      color: #0d6efd !important; /* Bootstrap blue */
  }

    .nav-link.active {
      color: #0d6efd !important; /* Bootstrap blue */
  }

    .capitalize-text {
      text-transform: capitalize;
  }

  .markdown-content h1,
  .markdown-content h2,
  .markdown-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-weight: bold;
  }

  .markdown-content p {
    margin-bottom: 1rem;
    line-height: 1.6;
  }

  .markdown-content ul {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
  }

  .markdown-content li {
    margin-bottom: 0.5rem;
  }

  .research-home {
    background:
      radial-gradient(circle at top left, rgba(38, 59, 92, 0.1), transparent 30%),
      linear-gradient(180deg, #f6f8fb 0%, #eef1f6 100%);
    color: #1b2433;
  }

  .research-hero {
    background:
      linear-gradient(135deg, rgba(16, 29, 51, 0.98), rgba(31, 49, 78, 0.94)),
      linear-gradient(180deg, #101d33, #1f314e);
    color: #f5f7f4;
  }

  .research-kicker,
  .research-section-kicker,
  .featured-label,
  .snapshot-index,
  .research-meta-label {
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.78rem;
    font-weight: 700;
  }

  .research-kicker {
    color: #c7d2e3;
  }

  .research-title {
    font-weight: 700;
    letter-spacing: -0.03em;
  }

  .research-affiliation {
    font-size: 1.05rem;
    color: rgba(245, 247, 244, 0.84);
    font-weight: 500;
  }

  .research-subtitle {
    max-width: 44rem;
    font-size: 1.1rem;
    line-height: 1.8;
    color: rgba(245, 247, 244, 0.86);
  }

  .research-tag-group,
  .research-link-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .research-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #f5f7f4;
    font-size: 0.88rem;
    white-space: nowrap;
  }

  .btn-research-primary,
  .btn-research-secondary {
    border-radius: 999px;
    padding: 0.75rem 1.25rem;
    font-weight: 600;
  }

  .btn-research-primary {
    background: #dbe3ef;
    color: #101d33;
    border: 1px solid #dbe3ef;
  }

  .btn-research-primary:hover {
    background: #e8eef7;
    color: #101d33;
  }

  .btn-research-secondary {
    background: transparent;
    color: #f5f7f4;
    border: 1px solid rgba(255, 255, 255, 0.28);
  }

  .btn-research-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
  }

  .research-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.5rem;
    max-width: 42rem;
  }

  .research-meta-label {
    display: block;
    margin-bottom: 0.35rem;
    color: #b9c6dd;
  }

  .research-portrait-card,
  .snapshot-card,
  .featured-slide,
  .info-panel {
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 18px 55px rgba(17, 39, 32, 0.12);
  }

  .research-portrait-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    max-width: 460px;
    margin: 0 auto;
    transform: translateX(-1.2rem);
  }

  .research-portrait {
    display: block;
    width: 100%;
    aspect-ratio: 5 / 6;
    object-fit: cover;
  }

  .research-portrait-caption {
    padding: 1rem 1.2rem 1.2rem;
    color: rgba(245, 247, 244, 0.85);
    line-height: 1.7;
  }

  .research-section-heading {
    max-width: 44rem;
    margin-bottom: 2rem;
  }

  .research-section-heading h3,
  .info-panel h3,
  .featured-copy h4,
  .snapshot-body h4,
  .education-entry h4 {
    color: #16233b;
    font-weight: 700;
  }

  .research-section-kicker,
  .featured-label,
  .snapshot-index,
  .research-meta-label {
    color: #51647f;
  }

  .snapshot-card,
  .info-panel,
  .featured-slide {
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(22, 35, 59, 0.08);
    backdrop-filter: blur(10px);
  }

  .snapshot-image {
    width: 100%;
    height: 220px;
    object-fit: contain;
    display: block;
    background: #edf1f6;
    padding: 0.75rem;
  }

  .snapshot-body {
    padding: 1.25rem;
  }

  .snapshot-index {
    margin-bottom: 0.55rem;
  }

  .featured-carousel {
    position: relative;
  }

  .featured-slide {
    min-height: 100%;
  }

  .featured-image-wrap {
    height: 100%;
    min-height: 420px;
    background: #edf1f6;
  }

  .featured-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    padding: 1rem;
  }

  .featured-copy {
    padding: 2.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .featured-copy p {
    line-height: 1.8;
  }

  .featured-link {
    color: #243a5a;
    font-weight: 700;
    text-decoration: none;
  }

  .featured-link:hover {
    text-decoration: underline;
  }

  .featured-control {
    width: 8%;
    opacity: 0.9;
  }

  .featured-control .carousel-control-prev-icon,
  .featured-control .carousel-control-next-icon {
    background-color: rgba(16, 29, 51, 0.82);
    border-radius: 999px;
    background-size: 55%;
    width: 3rem;
    height: 3rem;
  }

  .featured-indicators {
    margin-bottom: -2.25rem;
  }

  .featured-indicators [data-bs-target] {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: 0;
    background-color: #93a2ba;
  }

  .info-panel {
    padding: 2rem;
  }

  .research-list {
    margin-bottom: 0;
    padding-left: 1.2rem;
  }

  .research-list li {
    margin-bottom: 0.85rem;
    line-height: 1.7;
  }

  .education-entry {
    padding-bottom: 1.3rem;
    margin-bottom: 1.3rem;
    border-bottom: 1px solid rgba(22, 35, 59, 0.1);
  }

  .contact-link-list {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
  }

  .contact-link-list a {
    color: #243a5a;
    text-decoration: none;
    font-weight: 600;
  }

  .contact-link-list a:hover {
    text-decoration: underline;
  }

  .research-footer {
    padding-top: 1.5rem;
    border-top: 1px solid rgba(22, 35, 59, 0.08);
    color: #6f7c8f;
    font-size: 0.92rem;
    text-align: center;
  }

  @media (max-width: 991.98px) {
    .research-portrait-card {
      max-width: 420px;
      margin: 0 auto;
      transform: none;
    }

    .research-meta-grid {
      grid-template-columns: 1fr;
    }

    .featured-image-wrap {
      min-height: 280px;
    }

    .featured-copy,
    .info-panel {
      padding: 1.5rem;
    }
  }

  @media (max-width: 767.98px) {
    .research-title {
      font-size: 2.5rem;
    }

    .research-portrait-card {
      max-width: 340px;
    }

    .featured-control {
      display: none;
    }
  }
