/* A user's public profile, v2 (user_profile.dj.html): the cover, the list
   tiles, the one shelf. The comments, reviews, tabs and buttons keep their
   styles from user-profile.css and action_buttons_style. Few classes: the
   pieces inside a block are reached from it. */

#siteBody:has(.pv-hero) { overflow-x: clip; }

/* ---- The cover ---- */
.pv-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
  padding: clamp(1.25rem, 4vw, 2.5rem);
  padding-top: clamp(5rem, 14vw, 9rem);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 24px;
  background: rgba(22, 22, 27, .6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 18px 48px rgba(0, 0, 0, .3);
}

/* The wall: the posters in a row, tilted, dimmed, fading into the box. */
.pv-wall {
  position: absolute;
  inset: -30% -10% 20%;
  z-index: -2;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 10px;
  transform: rotate(-6deg) scale(1.1);
  opacity: .45;
  filter: saturate(120%) blur(1px);
}
.pv-wall img {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  object-fit: cover;
}
.pv-wall img:nth-child(even) { transform: translateY(14%); }
.pv-hero::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    radial-gradient(ellipse at 85% 100%, rgba(150, 242, 7, .18), rgba(150, 242, 7, 0) 55%),
    linear-gradient(to top, rgba(14, 14, 18, .98) 30%, rgba(14, 14, 18, .7) 62%, rgba(14, 14, 18, .25));
}

.pv-me {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem 1.5rem;
}

.pv-ava {
  flex: none;
  display: grid;
  place-items: center;
  width: 132px;
  height: 132px;
  margin: 0;
  padding: 4px;
  border-radius: 50%;
  background: conic-gradient(from 200deg, var(--primary-color, #96F207), rgba(150, 242, 7, .15), var(--primary-color, #96F207));
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
}
.pv-ava img,
.pv-ava span {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border: 3px solid #0e0e12;
  border-radius: 50%;
  background: #17171c;
  color: var(--primary-color, #96F207);
  font-size: 50px;
  font-weight: 900;
  object-fit: cover;
  object-position: center top 15%;
}

.pv-who {
  flex: 1 1 14rem;
  min-width: 0;
}
.pv-who h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(24px, 3.2vw, 34px);
  font-weight: 900;
  line-height: 1.4;
  overflow-wrap: anywhere;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .5);
}
.pv-who p {
  margin: .15rem 0 0;
  color: rgba(255, 255, 255, .65);
  font-size: 14px;
  text-align: right;
}

.pv-me .person-actions { flex: none; margin: 0; }

/* The numbers, as a row of small glass tiles. */
.pv-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .6rem;
  max-width: 720px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pv-stats li > *,
.pv-stats li {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: rgba(255, 255, 255, .7);
  font-size: 12.5px;
  text-decoration: none;
}
.pv-stats li {
  padding: .6rem .4rem;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 14px;
  background: rgba(255, 255, 255, .05);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: border-color .2s;
}
.pv-stats li:has(a):hover { border-color: rgba(150, 242, 7, .45); }
.pv-stats b {
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.5;
}
.pv-stats a:hover b { color: var(--primary-color, #96F207); }

/* ---- Sections ---- */
.pv-sec { margin-top: 2rem; }
.pv-sec h2 {
  position: relative;
  margin: 0 0 1rem;
  padding-inline-start: .85rem;
  font-size: 19px;
  font-weight: 900;
}
.pv-sec h2::before {
  position: absolute;
  top: .3em;
  bottom: .3em;
  right: 0;
  width: 4px;
  border-radius: 4px;
  background: var(--primary-color, #96F207);
  content: "";
}

/* ---- The list tiles ---- */
.pv-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.pv-tile {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  padding: .65rem .65rem .8rem;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 20px;
  background:
    radial-gradient(circle at 0 0, rgba(150, 242, 7, .1) 0, rgba(150, 242, 7, 0) 220px),
    rgba(22, 22, 27, .55);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 10px 30px rgba(0, 0, 0, .22);
  transition: border-color .2s, transform .2s;
}
.pv-tile:hover { border-color: rgba(150, 242, 7, .35); transform: translateY(-2px); }

/* The collage: the list's first three posters side by side, each a whole
   poster. A list with fewer leaves the rest of the strip to the tint. */
.pv-tile > a {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  aspect-ratio: 2 / 1;
  overflow: hidden;
  border-radius: 14px;
  background: rgba(150, 242, 7, .07);
  color: var(--primary-color, #96F207);
}
.pv-tile > a img {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  object-fit: cover;
  transition: transform .35s;
}
.pv-tile:hover > a img { transform: scale(1.05); }
.pv-tile > a > svg { grid-area: 1 / 1 / -1 / -1; place-self: center; opacity: .6; }
.pv-tile > a::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(to top, rgba(0, 0, 0, .7), rgba(0, 0, 0, 0) 45%);
  pointer-events: none;
}
.pv-tile > a span {
  position: absolute;
  bottom: .5rem;
  left: .5rem;
  z-index: 1;
  padding: .1rem .6rem;
  border-radius: 999px;
  background: rgba(10, 10, 12, .7);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.pv-tile .up-list-head {
  flex-direction: column;
  align-items: stretch;
  gap: .55rem;
  margin: 0;
  padding: 0 .2rem;
}
.pv-tile .up-list-title { font-size: 15.5px; }
.pv-tile .up-list-title svg { width: 20px; height: 20px; }
.pv-tile h3 {
  margin: 0;
  overflow: hidden;
  font-size: inherit;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pv-tile .person-actions { justify-content: flex-start; margin: 0; }
/* On a phone the three buttons share the tile's width, a third each. */
@media (max-width: 767.98px), (hover: none) {
  .pv-tile .up-list-head .person-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    flex: none;
    width: 100%;
  }
  .pv-tile .person-actions .btn.work-action { width: auto; min-width: 0; padding-inline: .25rem; }
}
.pv-tile .up-list-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin: 0;
  padding: 0 .2rem;
  overflow: hidden;
}

/* ---- The one shelf: a sideways row of the index's cards ---- */
.posts.pv-shelf {
  display: flex !important;
  gap: 1rem !important;
  overflow-x: auto;
  padding-bottom: .75rem;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}
.pv-shelf.posts > .slide {
  flex: 0 0 180px;
  scroll-snap-align: start;
}

/* ---- The tabs ---- */
.pv-tabs {
  display: flex;
  gap: .4rem;
  margin: 0 0 .5rem;
  padding: .35rem;
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 16px;
  background: rgba(22, 22, 27, .55);
  scrollbar-width: none;
}
.pv-tabs a {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: .4rem;
  min-height: 40px;
  padding: 0 1rem;
  border-radius: 12px;
  color: var(--text-body);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s, color .2s;
}
.pv-tabs a:hover { color: var(--primary-color, #96F207); }
.pv-tabs a.is-on { background: rgba(150, 242, 7, .14); color: var(--primary-color, #96F207); box-shadow: inset 0 0 0 1px rgba(150, 242, 7, .4); }
.pv-tabs span { padding: 0 .45rem; border-radius: 999px; background: rgba(255, 255, 255, .08); font-size: 12px; }
.pv-panel[hidden] { display: none; }

/* ---- Overview: the lists 75%, the latest activity 25% ---- */
.pv-over {
  display: grid;
  grid-template-columns: minmax(0, 75fr) minmax(0, 25fr);
  gap: 1.25rem;
  align-items: start;
}
/* On a desktop the overview's lists are three to a row. */
@media (min-width: 992px) {
  .pv-over .pv-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.pv-feed {
  position: sticky;
  top: calc(var(--pinned-head-height, 64px) + 12px);
  margin-top: 2rem;
  padding: .85rem;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 18px;
  background: rgba(22, 22, 27, .55);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.pv-feed h2 { margin: 0 0 .7rem; font-size: 15px; font-weight: 900; }
.pv-feed ol { display: grid; gap: .55rem; margin: 0 0 .7rem; padding: 0; list-style: none; }
.pv-feed li a {
  display: grid;
  gap: .15rem;
  padding: .55rem .6rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, .04);
  color: var(--text-body);
  text-decoration: none;
  transition: background .2s;
}
.pv-feed li a:hover { background: rgba(150, 242, 7, .1); }
.pv-feed small { color: var(--text-muted); font-size: 11px; }
.pv-feed b { overflow: hidden; font-size: 13px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.pv-feed li a:hover b { color: var(--primary-color, #96F207); }
.pv-feed q { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--text-muted); font-size: 12px; line-height: 1.8; quotes: none; }
.pv-feed time { color: var(--text-muted); font-size: 11px; }
.pv-feed .up-empty { padding: .6rem; font-size: 12px; }

/* ---- The watching list: a grid of cards ---- */
.posts.pv-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem .75rem !important;
  overflow: visible;
  padding: 0;
}
.pv-grid.posts > .slide { flex: initial; width: auto; }

/* ---- Light mode ---- */
body.light-mode .pv-tabs,
body.light-mode .pv-feed { border-color: rgba(0, 0, 0, .08); background: rgba(255, 255, 255, .7); }
body.light-mode .pv-tabs span,
body.light-mode .pv-feed li a { background: rgba(0, 0, 0, .04); }
body.light-mode .pv-hero {
  border-color: rgba(0, 0, 0, .08);
  background: rgba(255, 255, 255, .7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 18px 40px rgba(0, 0, 0, .08);
}
body.light-mode .pv-hero::before {
  background:
    radial-gradient(ellipse at 85% 100%, rgba(110, 180, 0, .18), rgba(110, 180, 0, 0) 55%),
    linear-gradient(to top, rgba(250, 250, 252, .98) 30%, rgba(250, 250, 252, .75) 62%, rgba(250, 250, 252, .3));
}
body.light-mode .pv-wall { opacity: .3; }
body.light-mode .pv-ava img,
body.light-mode .pv-ava span { border-color: #fafafc; background: #f1f3ec; }
body.light-mode .pv-who h1 { color: var(--text-body, #111); text-shadow: none; }
body.light-mode .pv-who p,
body.light-mode .pv-stats li,
body.light-mode .pv-stats li > * { color: rgba(0, 0, 0, .6); }
body.light-mode .pv-stats li { border-color: rgba(0, 0, 0, .08); background: rgba(255, 255, 255, .6); }
body.light-mode .pv-stats b { color: var(--text-body, #111); }
body.light-mode .pv-tile {
  border-color: rgba(0, 0, 0, .08);
  background:
    radial-gradient(circle at 0 0, rgba(110, 180, 0, .12) 0, rgba(110, 180, 0, 0) 220px),
    rgba(255, 255, 255, .7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 10px 28px rgba(0, 0, 0, .06);
}

/* ---- Tablet ---- */
@media (max-width: 991.98px) {
  .pv-over { grid-template-columns: minmax(0, 1fr); }
  .pv-feed { position: static; margin-top: 1.5rem; }
  .pv-feed ol { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pv-wall { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .pv-wall img:nth-child(n+7) { display: none; }
  .pv-shelf.posts > .slide { flex-basis: 150px; }
}

/* ---- Phone: the cover centred, the numbers three and two, the tiles two
   to a row, the shelf three posters and a sliver. ---- */
@media (max-width: 575.98px) {
  .pv-hero {
    padding: 4.5rem 1rem 1rem;
    border-radius: 20px;
    text-align: center;
  }
  .pv-wall {
    inset: -20% -20% 35%;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .pv-wall img:nth-child(n+5) { display: none; }
  .pv-me {
    flex-direction: column;
    align-items: center;
    gap: .75rem;
  }
  .pv-ava { width: 104px; height: 104px; }
  .pv-ava span { font-size: 40px; }
  .pv-who { flex: none; }
  .pv-who p { text-align: center; }
  .pv-me .person-actions { justify-content: center; }
  .pv-stats {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: .45rem;
  }
  .pv-stats li { grid-column: span 2; padding: .5rem .25rem; }
  .pv-stats li:nth-child(n+4) { grid-column: span 3; }
  .pv-stats b { font-size: 17px; }

  .pv-sec { margin-top: 1.5rem; }
  .pv-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .25rem; padding: .25rem; overflow: visible; }
  .pv-tabs a { flex-direction: column; justify-content: center; gap: .1rem; min-height: 46px; padding: .3rem .2rem; font-size: 12px; line-height: 1.45; text-align: center; white-space: normal; }
  .pv-tabs span { font-size: 10.5px; }
  .pv-feed ol { grid-template-columns: minmax(0, 1fr); }
  .posts.pv-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem .3rem !important; }
  .pv-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .6rem;
  }
  .pv-tile { gap: .55rem; padding: .45rem .45rem .6rem; border-radius: 16px; }
  .pv-tile .up-list-title { font-size: 14px; }
  .pv-tile > a { border-radius: 11px; }

  .posts.pv-shelf { gap: .3rem !important; }
  .pv-shelf.posts > .slide { flex-basis: calc((100% - .9rem) / 3.22); }
}
