.engagement {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.article-social,
.comments-block,
.profile-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.article-social {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 22px;
}

.reaction-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.reaction-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  gap: 7px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease;
}

.reaction-button:hover,
.reaction-button.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
  transform: translateY(-1px);
}

.reaction-button span {
  font-size: 1.05rem;
}

.reaction-button b {
  font-size: .74rem;
}

.reaction-button:disabled {
  opacity: .55;
  cursor: wait;
}

.share-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.share-button {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}

.share-button:hover {
  border-color: var(--line-strong);
}

.action-status {
  min-height: 1.2em;
  color: var(--quiet);
  font-size: .78rem;
}

.comments-block {
  margin-top: 22px;
  padding: 24px;
}

.comments-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 22px;
}

.comments-heading h2 {
  margin: 0;
  font-size: 1.65rem;
}

.comments-heading h2 span {
  color: var(--quiet);
  font-size: 1rem;
}

.comments-heading > p {
  max-width: 330px;
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
  text-align: right;
}

.comment-form {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.comment-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: .8rem;
  font-weight: 800;
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  outline: 0;
  background: var(--surface);
  color: var(--text);
  resize: vertical;
}

.comment-form input:focus,
.comment-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(5, 121, 103, .1);
}

.comment-form__row {
  display: grid;
  grid-template-columns: minmax(0, 320px);
}

.comment-form__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.hp-field {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.comments-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.comment {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.comment__avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: linear-gradient(145deg, var(--accent), var(--accent-2));
  color: #ffffff;
  font-weight: 800;
}

.comment__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.comment__meta strong {
  font-size: .92rem;
}

.comment__meta time {
  color: var(--quiet);
  font-size: .72rem;
}

.comment__body p {
  margin: 6px 0 0;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: .91rem;
}

.no-comments {
  padding: 16px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--quiet);
  text-align: center;
}

.profile-section {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(320px, 1fr);
  align-items: start;
  gap: 56px;
  border-top: 1px solid var(--line);
}

.profile-copy > p:not(.eyebrow) {
  max-width: 650px;
  color: var(--muted);
  font-size: 1rem;
}

.profile-contact {
  display: inline-flex;
  margin-top: 10px;
  color: var(--accent);
  font-weight: 800;
}

.profile-card {
  padding: 20px;
  outline: 0;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.profile-card:hover,
.profile-card:focus,
.profile-card:focus-within {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.profile-card__top {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}

.profile-card__photo {
  width: 82px;
  height: 82px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface-2);
  object-fit: cover;
}

.profile-card__name h3 {
  margin: 4px 0 5px;
  font-size: 1.45rem;
  line-height: 1.1;
}

.profile-card__name > p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: .88rem;
}

.profile-card__hint {
  margin-top: 16px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  color: var(--quiet);
  font-size: .76rem;
}

.profile-card__cv {
  max-height: 0;
  margin-top: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height .32s ease, opacity .2s ease, margin-top .2s ease;
}

.profile-card:hover .profile-card__cv,
.profile-card:focus .profile-card__cv,
.profile-card:focus-within .profile-card__cv {
  max-height: 650px;
  margin-top: 18px;
  opacity: 1;
}

.cv-mini {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.cv-mini__item {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.cv-mini__item span {
  color: var(--quiet);
  font-size: .7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.cv-mini__item p {
  margin: 0;
  color: var(--muted);
  font-size: .84rem;
}

.profile-card__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.profile-card__actions .email-only {
  color: var(--accent);
  font-size: .82rem;
  font-weight: 800;
}

.cv-note {
  margin: 10px 0 0;
  color: var(--quiet);
  font-size: .72rem;
}

@media (max-width: 900px) {
  .article-social,
  .comments-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .share-wrap {
    justify-content: flex-start;
  }

  .comments-heading > p {
    text-align: left;
  }

  .profile-section {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

@media (max-width: 640px) {
  .engagement {
    margin-top: 38px;
  }

  .article-social,
  .comments-block,
  .profile-card {
    padding: 16px;
  }

  .comment-form__bottom {
    align-items: stretch;
    flex-direction: column;
  }

  .comment-form__bottom .button,
  .profile-card__actions .button {
    width: 100%;
  }

  .reaction-button {
    min-width: 50px;
    padding: 7px 9px;
  }

  .profile-card__top {
    grid-template-columns: 66px minmax(0, 1fr);
  }

  .profile-card__photo {
    width: 66px;
    height: 66px;
  }

  .profile-card__name h3 {
    font-size: 1.2rem;
  }

  .profile-card__hint {
    display: none;
  }

  .profile-card__cv {
    max-height: 700px;
    margin-top: 16px;
    opacity: 1;
  }

  .cv-mini__item {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .profile-card__actions {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (hover: none) {
  .profile-card__hint {
    display: none;
  }

  .profile-card__cv {
    max-height: 700px;
    margin-top: 16px;
    opacity: 1;
  }
}
