/* Reference proportions: 128px portrait, 40px corners, 32px inset, bottom-aligned actions. */
.reference-profile {
  position: sticky;
  top: 24px;
  width: 100%;
  min-width: 0;
  height: calc(100dvh - var(--profile-viewport-gap, 112px));
  min-height: 720px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 32px;
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: 40px;
  background: rgb(255 255 255 / 5%);
  color: rgb(255 255 255 / 90%);
  box-shadow: 0 0 50px rgb(0 0 0 / 50%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background-color .5s, border-color .5s, box-shadow .5s;
}
.reference-profile-top { display: flex; flex-direction: column; align-items: center; }
.reference-profile-avatar {
  position: relative;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  overflow: hidden;
  width: 128px;
  height: 128px;
  padding: 0;
  margin: 0 0 24px;
  border: 2px solid rgb(255 255 255 / 20%);
  border-radius: 50%;
  background: linear-gradient(140deg, #49628c, #253e62 55%, #2b2b52);
  animation: profile-portrait-glow 3s ease-in-out infinite;
  isolation: isolate;
}
.reference-profile-avatar::before {
  position: absolute;
  content: '';
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse at 27% 16%, #adcbff5c, transparent 65%);
}
.reference-profile-image { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.reference-profile-avatar:hover .reference-profile-image { transform: scale(1.1); }
.reference-profile-identity { display: flex; flex-direction: column; align-items: center; width: 100%; min-width: 0; text-align: center; }
.reference-profile-visitor {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
  padding: 16px;
  margin-bottom: 24px;
  background: rgb(255 255 255 / 5%);
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: 16px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.reference-profile-visitor-avatar {
  position: relative;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  overflow: hidden;
  border: 2px solid rgb(34 211 238 / 50%);
  border-radius: 50%;
}
.reference-profile-visitor-avatar>img { display: block; width: 100%; height: 100%; object-fit: cover; animation: profile-visitor-breathe 2s ease-in-out infinite; }
.reference-profile-present { position: absolute; right: -2px; bottom: -2px; width: 16px; height: 16px; border-radius: 50%; border: 2px solid #0f172a; background: #22c55e; }
.reference-profile-visitor-copy { flex: 1; min-width: 0; }
.reference-profile-visitor-copy>p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 700; line-height: 20px; }
.reference-profile-visitor-copy>span { display: block; margin-top: 2px; color: rgb(255 255 255 / 50%); font: 10px/15px ui-monospace, Consolas, monospace; }
.reference-profile-name {
  margin: 0 0 8px;
  font-size: 36px;
  line-height: 40px;
  font-weight: 900;
  letter-spacing: -1.8px;
  color: transparent;
  background: linear-gradient(135deg, #fff, #ffffff80);
  background-clip: text;
  -webkit-background-clip: text;
}
.reference-profile-role {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  max-width: 100%;
  width: 100%;
  padding: 8px 16px;
  margin-bottom: 32px;
  border: 1px solid rgb(99 102 241 / 20%);
  border-radius: 12px;
  background: rgb(99 102 241 / 10%);
  color: #a5b4fc;
  font: 12px/16px ui-monospace, Consolas, monospace;
  white-space: nowrap;
}
.reference-profile-icon { display: inline-block; width: 16px; height: 16px; flex-shrink: 0; vertical-align: middle; }
.reference-profile-role>.reference-profile-icon { width: 14px; height: 14px; }
.reference-profile-cursor { display: inline-block; width: 8px; height: 16px; flex-shrink: 0; background: #818cf8; animation: profile-cursor-blink .8s linear infinite; }
.reference-profile-motto { display: flex; flex-direction: column; gap: 4px; width: 100%; min-width: 0; line-height: 1.625; }
.reference-profile-motto>span { color: rgb(96 165 250 / 80%); font-size: 10px; font-weight: 700; letter-spacing: 2px; }
.reference-profile-motto>em { color: rgb(199 210 254 / 90%); font-size: 15px; font-weight: 700; font-style: italic; letter-spacing: -.375px; }
.reference-profile-bottom { display: flex; flex-direction: column; align-items: center; gap: 32px; width: 100%; margin-top: 32px; }
.reference-profile-about {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  overflow: hidden;
  width: 100%;
  padding: 14px 32px;
  border: 1px solid rgb(255 255 255 / 20%);
  border-radius: 999px;
  background: rgb(255 255 255 / 5%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgb(0 0 0 / 30%);
  font-size: 13px;
  font-weight: 700;
  line-height: 20px;
  letter-spacing: 2.6px;
  transition: background-color .3s, border-color .3s, color .3s, box-shadow .3s;
}
.reference-profile-about:hover { background: rgb(255 255 255 / 10%); border-color: rgb(255 255 255 / 40%); box-shadow: 0 0 30px rgb(255 255 255 / 20%); color: #fff; }
.reference-profile-about>.reference-profile-icon { color: rgb(255 255 255 / 40%); transition: transform .3s, color .3s; }
.reference-profile-about:hover>.reference-profile-icon { color: #fff; transform: translateX(4px); }
.reference-profile-button-sheen { position: absolute; inset: 0; background: linear-gradient(90deg, transparent, #60a5fa33, transparent); transform: translateX(-150%); transition: transform 1s ease-in-out; pointer-events: none; }
.reference-profile-about:hover>.reference-profile-button-sheen { transform: translateX(150%); }
.reference-profile-traits { display: flex; flex-direction: column; gap: 24px; width: 100%; padding-top: 32px; margin-top: 40px; border-top: 1px solid rgb(255 255 255 / 5%); }
.reference-profile-traits>h3 { display: flex; align-items: center; gap: 12px; color: rgb(255 255 255 / 40%); font-size: 10px; font-weight: 900; line-height: 15px; letter-spacing: 2px; white-space: nowrap; }
.reference-profile-traits>h3>span { width: 32px; height: 1px; flex-shrink: 0; background: rgb(59 130 246 / 50%); }
.reference-profile-traits>nav { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.reference-profile-trait { display: inline-flex; align-items: center; justify-content: center; min-width: 84px; padding: 6px 12px; border: 1px solid rgb(255 255 255 / 10%); border-radius: 999px; background: rgb(255 255 255 / 5%); color: rgb(255 255 255 / 60%); font: 10px/15px ui-monospace, Consolas, monospace; transition: background-color .2s, border-color .2s, color .2s; }
.reference-profile-trait:hover { background: rgb(59 130 246 / 10%); border-color: rgb(59 130 246 / 30%); color: #60a5fa; }
@keyframes profile-portrait-glow { 0%,100% { box-shadow: 0 0 20px rgb(139 92 246 / 30%); } 50% { box-shadow: 0 0 40px rgb(139 92 246 / 60%); } }
@keyframes profile-visitor-breathe { 0%,100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes profile-cursor-blink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }
@media (max-width: 1279px) and (min-width: 1024px) {
  .reference-profile { padding: 28px 24px; }
  .reference-profile-role { gap: 6px; padding: 8px 10px; font-size: 11px; }
  .reference-profile-traits>h3 { gap: 9px; letter-spacing: 1px; }
  .reference-profile-traits>h3>span { width: 24px; }
}
@media (max-width: 1023px) {
  .reference-profile { position: static; height: auto; min-height: 0; flex-direction: row; align-items: center; padding: 24px; border-radius: 24px; gap: 24px; }
  .reference-profile-top { flex: 1; min-width: 0; flex-direction: row; gap: 16px; }
  .reference-profile-avatar { width: 96px; height: 96px; margin: 0; }
  .reference-profile-identity { align-items: flex-start; text-align: left; }
  .reference-profile-visitor { padding: 12px; margin-bottom: 16px; }
  .reference-profile-visitor-avatar { width: 40px; height: 40px; }
  .reference-profile-present { width: 12px; height: 12px; }
  .reference-profile-visitor-copy>p { font-size: 12px; line-height: 16px; }
  .reference-profile-name { font-size: 30px; line-height: 36px; letter-spacing: -1.5px; }
  .reference-profile-role { width: auto; padding: 6px 12px; margin-bottom: 16px; font-size: 10px; line-height: 15px; }
  .reference-profile-role>.reference-profile-icon { width: 12px; height: 12px; }
  .reference-profile-cursor { width: 6px; height: 12px; }
  .reference-profile-motto>em { font-size: 13px; }
  .reference-profile-bottom { flex: 0 0 200px; width: 200px; margin-top: 0; gap: 24px; }
  .reference-profile-about { padding: 10px 24px; font-size: 11px; line-height: 16px; letter-spacing: 2.2px; }
  .reference-profile-about>.reference-profile-icon { width: 12px; height: 12px; }
  .reference-profile-traits { padding: 0; margin: 0; border: 0; }
  .reference-profile-traits>h3 { display: none; }
  .reference-profile-trait { font-size: 9px; line-height: 13.5px; padding: 4px 8px; }
}
@media (max-width: 767px) {
  .reference-profile { flex-direction: column; gap: 0; }
  .reference-profile-top { width: 100%; flex-direction: column; gap: 16px; }
  .reference-profile-identity { align-items: center; text-align: center; }
  .reference-profile-bottom { flex: auto; width: 100%; margin-top: 24px; }
  .reference-profile-traits { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .reference-profile *, .reference-profile *::before { animation: none !important; transition: none !important; }
  .reference-profile-avatar { box-shadow: 0 0 20px rgb(139 92 246 / 30%); }
  .reference-profile-avatar:hover .reference-profile-image, .reference-profile-about:hover>.reference-profile-icon { transform: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .reference-profile { background: #26364b; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .reference-profile-visitor, .reference-profile-about { backdrop-filter: none; -webkit-backdrop-filter: none; }
}
