.person-loading, .person-error { min-height: 68vh; display: grid; place-items: center; padding: 48px 20px; color: var(--catalog-muted); text-align: center; }
.person-error h1 { color: var(--catalog-text); font-size: clamp(38px, 6vw, 70px); letter-spacing: -.05em; }
.person-shell { width: min(1500px, calc(100% - 48px)); margin: 0 auto; padding: clamp(46px, 6vw, 88px) 0 90px; display: grid; grid-template-columns: minmax(250px, 340px) minmax(0, 1fr); gap: clamp(42px, 5vw, 78px); align-items: start; }
.person-sidebar { min-width: 0; }
.person-profile { width: 100%; aspect-ratio: 2 / 3; display: grid; place-items: center; overflow: hidden; border-radius: 14px; color: var(--catalog-muted); background: var(--catalog-surface-soft); box-shadow: var(--catalog-shadow); font-size: 76px; }
.person-profile img { width: 100%; height: 100%; display: block; object-fit: cover; }
.person-social { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0; }
.person-social a { min-width: 44px; height: 44px; display: grid; place-items: center; padding: 0 12px; border: 1px solid var(--catalog-line); border-radius: 999px; color: var(--catalog-text); background: var(--catalog-surface); text-decoration: none; font-size: 13px; font-weight: 850; }
.person-social a:hover { border-color: var(--catalog-gold); }
.person-sidebar h2 { margin: 28px 0 18px; font-size: 22px; }
.person-fact { margin: 0 0 19px; color: var(--catalog-muted); line-height: 1.42; }
.person-fact strong { display: block; margin-bottom: 3px; color: var(--catalog-text); }
.person-aliases { margin: 0; padding: 0; list-style: none; color: var(--catalog-muted); }
.person-aliases li + li { margin-top: 5px; }
.person-actions { display: grid; gap: 9px; margin-top: 8px; }
.person-open,.person-favorite,.person-knowledge { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 0 18px; border-radius: 999px; font: inherit; font-weight: 850; cursor: pointer; transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease, transform 160ms cubic-bezier(.23, 1, .32, 1); }
.person-open { color: var(--kh-accent-ink); background: var(--kh-accent); text-decoration: none; }
.person-favorite,.person-knowledge { border: 1px solid var(--catalog-line); color: var(--catalog-text); background: var(--catalog-surface); }
.person-knowledge { text-decoration: none; }
.person-knowledge svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.person-favorite:hover,.person-favorite.is-favorite,.person-knowledge:hover { color: var(--kh-accent); border-color: rgba(var(--kh-accent-rgb), .4); background: rgba(var(--kh-accent-rgb), .1); }
.person-open:active,.person-favorite:active,.person-knowledge:active { transform: scale(.97); }
.person-open:focus-visible,.person-favorite:focus-visible,.person-knowledge:focus-visible { outline: 3px solid rgba(var(--kh-accent-rgb), .26); outline-offset: 3px; }
.person-favorite:disabled { opacity: .62; cursor: wait; }

.person-content { min-width: 0; }
.person-content h1 { margin: 0 0 32px; font-size: clamp(48px, 6vw, 82px); line-height: .98; letter-spacing: -.055em; }
.person-section { margin-top: 52px; }
.person-section:first-of-type { margin-top: 0; }
.person-section h2 { margin: 0 0 18px; font-size: clamp(27px, 3vw, 38px); letter-spacing: -.035em; }
.person-biography { position: relative; max-height: 240px; overflow: hidden; font-size: 17px; line-height: 1.72; white-space: pre-line; }
.person-biography.is-expanded { max-height: none; }
.person-biography:not(.is-expanded)::after { content: ""; position: absolute; right: 0; bottom: 0; left: 0; height: 80px; background: linear-gradient(transparent, var(--catalog-bg)); pointer-events: none; }
.person-bio-toggle { margin-top: 10px; padding: 0; border: 0; color: var(--catalog-gold-deep); background: transparent; font-weight: 800; cursor: pointer; }

.known-for-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.known-for-head h2 { margin: 0; }
.person-carousel-controls { display: flex; gap: 12px; flex: 0 0 auto; }
.person-carousel-controls button { width: 58px; height: 58px; border: 0; border-radius: 50%; color: var(--catalog-text); background: var(--catalog-surface); box-shadow: 0 12px 28px rgba(34,27,20,.08); cursor: pointer; font-size: 25px; }
.person-carousel-controls button.is-primary { color: var(--kh-accent-ink); background: var(--kh-accent); }
.person-carousel-controls button:disabled { opacity: .38; cursor: default; }
.person-known { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 64px) / 5); gap: 16px; overflow-x: auto; padding: 3px 3px 18px; scrollbar-width: none; scroll-snap-type: x mandatory; scroll-behavior: smooth; }
.person-known::-webkit-scrollbar { display: none; }
.person-work { min-width: 0; color: inherit; text-decoration: none; scroll-snap-align: start; }
.person-work__poster { position: relative; display: block; aspect-ratio: 2 / 3; overflow: hidden; border-radius: 11px; background: var(--catalog-surface-soft); box-shadow: 0 12px 26px rgba(34,27,20,.11); }
.person-work__poster img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .24s ease; }
.person-work__rating { position: absolute; right: 8px; bottom: 8px; padding: 4px 7px; border-radius: 6px; color: #fff; background: rgba(17,17,17,.82); font-size: 12px; font-weight: 850; }
.person-work strong { display: block; margin-top: 10px; line-height: 1.3; }
.person-work > span:last-child { display: block; margin-top: 4px; color: var(--catalog-muted); font-size: 13px; }

.filmography-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.filmography-head h2 { margin: 0; }
.filmography-filters { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border: 1px solid var(--catalog-line); border-radius: 999px; background: var(--catalog-surface-soft); }
.filmography-filters button { min-height: 40px; padding: 0 17px; border: 1px solid transparent; border-radius: 999px; color: var(--catalog-muted); background: transparent; font: inherit; font-size: 14px; font-weight: 760; cursor: pointer; transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease, transform 160ms cubic-bezier(.23, 1, .32, 1); }
.filmography-filters button[aria-pressed="true"] { color: var(--kh-accent); border-color: rgba(var(--kh-accent-rgb), .26); background: rgba(var(--kh-accent-rgb), .11); box-shadow: 0 4px 14px rgba(var(--kh-accent-rgb), .09); }
.filmography-filters button:active { transform: scale(.97); }
.filmography-filters button:focus-visible { outline: 3px solid rgba(var(--kh-accent-rgb), .24); outline-offset: 2px; }
.filmography-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(12px, 2vw, 20px); }
.filmography-card { display: flex; min-width: 0; overflow: hidden; flex-direction: column; border: 1px solid var(--catalog-line); border-radius: 16px; color: var(--catalog-text); background: var(--catalog-surface-soft); text-decoration: none; transition: border-color 180ms ease, box-shadow 180ms ease, transform 220ms cubic-bezier(.23, 1, .32, 1); }
.filmography-poster { display: grid; overflow: hidden; aspect-ratio: 2 / 3; place-items: center; color: var(--catalog-muted); background: var(--catalog-surface-soft); }
.filmography-poster img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform 320ms cubic-bezier(.23, 1, .32, 1), filter 220ms ease; }
.filmography-poster.is-empty span { max-width: 12ch; text-align: center; font-size: 13px; line-height: 1.4; }
.filmography-copy { display: flex; min-width: 0; flex: 1; flex-direction: column; padding: 14px 14px 16px; }
.filmography-copy strong { overflow: hidden; font-size: 15px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.filmography-copy > span { margin-top: 7px; color: var(--catalog-muted); font-size: 12px; }
.filmography-copy small { display: -webkit-box; overflow: hidden; margin-top: 8px; color: var(--catalog-muted); font-size: 11px; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.filmography-card:hover { border-color: rgba(var(--kh-accent-rgb), .28); box-shadow: 0 18px 42px rgba(15, 23, 42, .12); transform: translateY(-4px); }
.filmography-card:hover .filmography-poster img { transform: scale(1.025); }
.filmography-card:active { transform: scale(.985); }
.filmography-card:focus-visible { outline: 3px solid rgba(var(--kh-accent-rgb), .28); outline-offset: 3px; }
.filmography-more { display: flex; min-height: 48px; align-items: center; justify-content: center; margin: 24px auto 0; padding: 0 19px; border: 1px solid var(--catalog-line); border-radius: 999px; color: var(--catalog-text); background: var(--catalog-surface-soft); font: inherit; font-size: 14px; font-weight: 780; cursor: pointer; transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease, transform 160ms cubic-bezier(.23, 1, .32, 1); }
.filmography-more:hover { color: var(--kh-accent); border-color: rgba(var(--kh-accent-rgb), .34); background: rgba(var(--kh-accent-rgb), .08); }
.filmography-more:active { transform: scale(.97); }
.filmography-more:focus-visible { outline: 3px solid rgba(var(--kh-accent-rgb), .24); outline-offset: 3px; }
.filmography-more[hidden] { display: none; }

@media (max-width: 900px) {
  .person-shell { grid-template-columns: 240px minmax(0, 1fr); gap: 34px; }
  .person-known { grid-auto-columns: calc((100% - 32px) / 3); }
  .filmography-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .person-shell { width: min(100% - 32px, 600px); display: block; padding-top: 30px; }
  .person-sidebar { display: grid; grid-template-columns: 42% minmax(0, 1fr); gap: 20px; align-items: start; }
  .person-profile { grid-row: 1 / span 3; }
  .person-social { margin: 0; }
  .person-sidebar h2 { margin: 0 0 14px; }
  .person-personal { min-width: 0; }
  .person-content { margin-top: 36px; }
  .person-content h1 { font-size: clamp(42px, 12vw, 66px); }
  .person-known { grid-auto-columns: calc((100% - 16px) / 2); }
  .person-carousel-controls button { width: 48px; height: 48px; }
  .filmography-head { align-items: flex-start; }
  .filmography-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 460px) {
  .person-sidebar { display: block; }
  .person-profile { width: min(68vw, 280px); margin: 0 auto 24px; }
  .person-known { grid-auto-columns: 72%; }
  .filmography-filters { width: 100%; }
  .filmography-filters button { min-width: 0; flex: 1; padding: 0 10px; }
  .filmography-grid { gap: 12px; }
  .filmography-copy { padding: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .person-open,.person-favorite,.person-knowledge,.filmography-filters button,.filmography-card,.filmography-poster img,.filmography-more { transition: none; }
  .filmography-card:hover,.filmography-card:hover .filmography-poster img { transform: none; }
}
