/* Shared styles for biography-family blocks (resume-biography, resume-biography-3) */

.avatar-wrapper {
  position: relative;
  /* width and height controlled by template params */
  margin-left: auto;
  margin-right: auto;
}

.avatar-emoji {
  position: absolute;
  width: 40px;
  height: 40px;
  line-height: 40px;
  border-radius: 100%;
  bottom: 0;
  right: 0;
  text-align: center;
  font-size: 20px;
  background-color: #fff;
  color: #000;
  /* override parent alpha */
  box-shadow:
    0 10px 20px rgb(0 0 0 / 4%),
    0 2px 6px rgb(0 0 0 / 4%),
    0 0 1px rgb(0 0 0 / 4%);
}

.dark .avatar-emoji {
  background-color: #000;
  box-shadow:
    0 10px 20px rgb(0 0 0 / 4%),
    0 2px 6px rgb(0 0 0 / 4%),
    0 0 1px rgb(255 255 255 / 96%);
}

/* Ruby pronunciation styling */
.hb-ruby-name {
  ruby-position: over;
  display: ruby;
  text-align: center;
}

.hb-ruby-name rt {
  font-size: 0.45em;
  font-weight: var(--hb-font-weight-body-bold, 600);
  letter-spacing: 0.08em;
  line-height: 1.2;

  background: linear-gradient(135deg, var(--color-gray-500) 0%, var(--color-gray-400) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;

  opacity: 0.85;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

.dark .hb-ruby-name rt {
  background: linear-gradient(135deg, var(--color-gray-400) 0%, var(--color-gray-300) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hb-ruby-name:hover rt {
  opacity: 1;
  transform: translateY(-1px);
}

/* CJK-optimized variant */
.hb-ruby-name--cjk rt {
  font-size: 0.5em;
  font-weight: 400;
  letter-spacing: 0.12em;
}

/* Latin-optimized variant */
.hb-ruby-name--latin rt {
  font-size: 0.4em;
  font-weight: var(--hb-font-weight-body-bold, 600);
  text-transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .hb-ruby-name rt {
    transition: none;
  }

  .hb-ruby-name:hover rt {
    transform: none;
  }
}

@supports not (display: ruby) {
  .hb-ruby-name {
    display: inline-block;
  }

  .hb-ruby-name rt {
    display: block;
    font-size: 0.6em;
    margin-bottom: 0.25em;
  }
}

/* Legacy class support */
.ruby-modern {
  ruby-position: over;
}

.ruby-modern rt {
  font-size: 0.7em;
  opacity: 0.8;
  letter-spacing: 0.05em;
}

.bio-text {
  max-width: 680px;
}
