/* A compact profile introduction above a full-width shelf. Glass stays on
   the navigation and floating tools; artwork carries the page. */
.profile-page {
  box-sizing: border-box;
  width: 100%;
  max-width: 1216px;
  margin-inline: auto;
  padding: 56px 32px 96px;
}

.profile-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}

.profile-heading { min-width: 0; }
.profile-heading h1 {
  margin: 0;
  font: 300 3rem/1.15 var(--font-brand);
  letter-spacing: -.025em;
  color: var(--color-text-heading);
  overflow-wrap: anywhere;
}
.profile-bio {
  max-width: 56ch;
  margin: 16px 0 0;
  font-size: .9375rem;
  line-height: 1.7;
  color: var(--color-text-muted);
  overflow-wrap: anywhere;
}

.profile-stats,
.profile-visibility {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 16px;
  font-size: .875rem;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}
.profile-stats {
  max-width: 100%;
  color: var(--color-text-muted);
}
.profile-total {
  margin: 0;
  color: var(--color-text-body);
  font-weight: 500;
}
.profile-visibility::before {
  content: "";
  width: 1px;
  height: 12px;
  align-self: center;
  background: var(--color-border-default);
}

.profile-overview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  width: 100%;
  gap: 8px 24px;
}
.profile-overview > .profile-text-link { margin-inline-start: auto; }
.profile-text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  gap: 8px;
  min-height: 44px;
  color: #bdd0c9;
  font-size: .875rem;
  line-height: 1.5;
  text-decoration: none;
  transition: color .2s ease;
}
.profile-text-link svg { flex: none; transition: transform .2s ease; }
.profile-text-link:focus-visible {
  outline: 2px solid #bdd0c9;
  outline-offset: 4px;
  border-radius: 4px;
}
@media (hover: hover) and (pointer: fine) {
  .profile-text-link:hover { color: var(--color-text-heading); }
  .profile-text-link:hover svg { transform: translateX(3px); }
}

.profile-empty { padding-block: 48px; }
.profile-empty[hidden] { display: none; }
.profile-empty p { margin: 0; font-size: 1rem; line-height: 1.6; }
.profile-empty-action { margin-top: 16px; font-size: 1rem; }

/* The book name reads like a caption, leaving the cover as the visual title.
   Keep the shared card's menu, player, focus and entrance behavior intact. */
.profile-library .card-title {
  margin-top: 16px;
  font: 500 1rem/1.45 var(--font-body);
  letter-spacing: -.01em;
  text-wrap: pretty;
}
.profile-library .card-meta { margin-top: 6px; font-weight: 400; }
.profile-library .card-frame img[src$="/static/img/icon_black.png"] {
  box-sizing: border-box;
  padding: 28%;
  object-fit: contain;
  filter: invert(1);
  mix-blend-mode: screen;
  opacity: .36;
}
.profile-library .card-art::before { opacity: calc(var(--g) * .4); }
.profile-library .card-art::after { opacity: calc(var(--g) * .25); }
@media (hover: hover) and (pointer: fine) {
  .profile-library .novel-card:is(:hover, :focus-within) .card-art::before,
  .profile-library .novel-card:is(:hover, :focus-within) .card-art::after {
    opacity: calc(var(--g) * .65);
  }
}

@media (max-width: 639px) {
  .profile-page { padding: 40px 16px 64px; }
  .profile-heading h1 { font-size: 2.5rem; }
  .profile-library .card-title { margin-top: 12px; font-size: .9375rem; }
}
@media (prefers-reduced-motion: reduce) {
  .profile-text-link, .profile-text-link svg { transition: none; }
  .profile-text-link:hover svg { transform: none; }
}
