/* ============================================
   UNTOLDEN — Public Figures Encyclopedia
   ============================================ */

/* --- Figure Page Header (with top offset for fixed nav) --- */
.fig-page-header {
  padding: 7rem 0 3rem;
  text-align: center;
  position: relative;
}
.fig-page-header h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  margin-bottom: 0.75rem;
}
.fig-page-header p {
  color: #8b8b93;
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto;
}

/* --- Breadcrumbs --- */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1.5rem 0;
  font-size: 0.8125rem;
  color: #6b6b73;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}
.breadcrumbs a {
  color: #6b6b73;
  transition: color 0.2s;
}
.breadcrumbs a:hover { color: #f5a623; }
.breadcrumbs span.sep { color: #3a3a40; margin: 0 0.25rem; }
.breadcrumbs .current { color: #8b8b93; }

/* --- Figure Hero --- */
.figure-hero {
  position: relative;
  min-height: 480px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.figure-hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}
.figure-hero-bg::before {
  content: '';
  position: absolute;
  inset: -50%;
  background: radial-gradient(ellipse at 30% 40%, rgba(245, 166, 35, 0.10) 0%, transparent 50%),
              radial-gradient(ellipse at 70% 60%, rgba(245, 166, 35, 0.06) 0%, transparent 50%);
  animation: figCoverShift 20s ease-in-out infinite alternate;
}
@keyframes figCoverShift {
  0% { transform: translate(0, 0); }
  100% { transform: translate(-5%, -3%); }
}
.figure-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(10,10,11,0.95) 0%, rgba(10,10,11,0.4) 60%, transparent 100%);
}
.figure-hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: flex;
  align-items: flex-end;
  gap: 2.5rem;
}
.figure-photo {
  flex-shrink: 0;
  width: 160px;
  height: 160px;
  border-radius: 16px;
  border: 3px solid rgba(245,166,35,0.3);
  background: #121214;
  overflow: hidden;
  box-shadow: 0 0 50px rgba(245,166,35,0.12);
  position: relative;
  transition: border-color 0.3s ease;
}
.figure-photo:hover { border-color: #f5a623; }
.figure-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.figure-photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 800;
  color: #f5a623;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
}
.figure-hero-info {
  flex: 1;
  padding-bottom: 0.5rem;
}
.figure-hero-name {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: #ededef;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}
.figure-hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.figure-tag {
  display: inline-block;
  padding: 0.3rem 0.875rem;
  border-radius: 100px;
  font-size: 0.8125rem;
  font-weight: 600;
}
.figure-tag.profession {
  background: rgba(245,166,35,0.12);
  color: #f5a623;
  border: 1px solid rgba(245,166,35,0.2);
}
.figure-tag.nationality {
  background: rgba(84,160,255,0.12);
  color: #54a0ff;
  border: 1px solid rgba(84,160,255,0.2);
}
.figure-tag.status-alive {
  background: rgba(38,222,129,0.12);
  color: #26de81;
  border: 1px solid rgba(38,222,129,0.2);
}
.figure-tag.status-deceased {
  background: rgba(255,107,107,0.12);
  color: #ff6b6b;
  border: 1px solid rgba(255,107,107,0.2);
}
.figure-hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.figure-hero-actions .btn-ghost {
  padding: 0.5rem 1.125rem;
  font-size: 0.8125rem;
}

/* --- Figure Content Layout --- */
.figure-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2.5rem;
}
.figure-main { min-width: 0; }
.figure-sidebar { position: relative; }

/* --- Quick Facts Sidebar --- */
.quick-facts {
  background: #121214;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 1.5rem;
  position: sticky;
  top: 84px;
}
.quick-facts h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: #ededef;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.quick-facts-list { list-style: none; }
.quick-facts-list li {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  gap: 1rem;
}
.quick-facts-list li:last-child { border-bottom: none; }
.quick-facts-label {
  font-size: 0.8125rem;
  color: #6b6b73;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}
.quick-facts-value {
  font-size: 0.875rem;
  color: #ededef;
  font-weight: 600;
  text-align: right;
}

/* --- Figure Section Cards --- */
.figure-section {
  margin-bottom: 2rem;
}
.figure-section-card {
  background: #121214;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 2.5rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.figure-section-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #f5a623, #f7b84a);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.figure-section-card:hover::before { opacity: 1; }
.figure-section-card:hover {
  border-color: rgba(255,255,255,0.12);
  box-shadow: 0 8px 40px rgba(0,0,0,0.3);
}
.figure-section-icon {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
  display: inline-block;
}
.figure-section-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ededef;
  margin-bottom: 0.5rem;
}
.figure-section-card .section-subtitle {
  font-size: 0.875rem;
  color: #6b6b73;
  margin-bottom: 1.5rem;
}
.figure-section-card .fig-content {
  font-size: 1.0625rem;
  line-height: 1.9;
  color: #d0d0d8;
  white-space: pre-wrap;
}
.figure-section-card .fig-content p {
  margin-bottom: 1rem;
}

/* --- Awards List --- */
.awards-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.award-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  background: rgba(255,255,255,0.02);
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.04);
  transition: all 0.25s ease;
}
.award-item:hover {
  background: rgba(245,166,35,0.04);
  border-color: rgba(245,166,35,0.12);
}
.award-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(245,166,35,0.08);
  border-radius: 10px;
}
.award-text {
  flex: 1;
}
.award-text .award-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #ededef;
  margin-bottom: 0.25rem;
}
.award-text .award-year {
  font-size: 0.8125rem;
  color: #f5a623;
  font-weight: 500;
}

/* --- Quote Block --- */
.quote-block {
  position: relative;
  padding: 2rem 2rem 2rem 3.5rem;
  margin: 1.5rem 0;
  background: rgba(245,166,35,0.04);
  border-left: 4px solid #f5a623;
  border-radius: 0 12px 12px 0;
}
.quote-block::before {
  content: '"';
  position: absolute;
  left: 1rem;
  top: 0.75rem;
  font-size: 3.5rem;
  font-weight: 800;
  color: rgba(245,166,35,0.2);
  line-height: 1;
  font-family: Georgia, serif;
}
.quote-text {
  font-size: 1.125rem;
  line-height: 1.8;
  color: #e0e0e8;
  font-style: italic;
}

/* --- Timeline on figure page --- */
.fig-timeline {
  position: relative;
  padding-left: 2rem;
}
.fig-timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, rgba(245,166,35,0.3), rgba(245,166,35,0.05));
}
.fig-timeline-entry {
  position: relative;
  padding: 0 0 2rem 1.5rem;
  animation: figFadeIn 0.5s ease forwards;
  opacity: 0;
}
.fig-timeline-entry:nth-child(1) { animation-delay: 0.05s; }
.fig-timeline-entry:nth-child(2) { animation-delay: 0.1s; }
.fig-timeline-entry:nth-child(3) { animation-delay: 0.15s; }
.fig-timeline-entry:nth-child(4) { animation-delay: 0.2s; }
.fig-timeline-entry:nth-child(5) { animation-delay: 0.25s; }
.fig-timeline-entry:nth-child(6) { animation-delay: 0.3s; }
.fig-timeline-entry:nth-child(7) { animation-delay: 0.35s; }
.fig-timeline-entry:nth-child(8) { animation-delay: 0.4s; }
.fig-timeline-entry:nth-child(9) { animation-delay: 0.45s; }
.fig-timeline-entry:nth-child(10) { animation-delay: 0.5s; }
.fig-timeline-entry::before {
  content: '';
  position: absolute;
  left: -1.65rem;
  top: 0.35rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #f5a623;
  border: 3px solid #121214;
  box-shadow: 0 0 0 2px rgba(245,166,35,0.3);
  transition: all 0.3s ease;
}
.fig-timeline-entry:hover::before {
  background: #f7b84a;
  box-shadow: 0 0 0 4px rgba(245,166,35,0.25);
  transform: scale(1.15);
}
.fig-timeline-year {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: #f5a623;
  background: rgba(245,166,35,0.1);
  padding: 0.2rem 0.75rem;
  border-radius: 100px;
  margin-bottom: 0.5rem;
  letter-spacing: 0.03em;
}
.fig-timeline-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #ededef;
  margin-bottom: 0.375rem;
}
.fig-timeline-desc {
  font-size: 0.9375rem;
  color: #8b8b93;
  line-height: 1.7;
}

/* --- Figure Cards (Grid) --- */
.figures-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}
.figure-card {
  background: #121214;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
  text-decoration: none;
  display: block;
}
.figure-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245,166,35,0.25);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}
.figure-card-img {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.figure-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.figure-card-img .fig-card-initial {
  font-size: 3.5rem;
  font-weight: 800;
  color: rgba(245,166,35,0.2);
}
.figure-card-body {
  padding: 1.25rem;
}
.figure-card-name {
  font-size: 1.0625rem;
  font-weight: 700;
  color: #ededef;
  margin-bottom: 0.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.figure-card-prof {
  font-size: 0.8125rem;
  color: #f5a623;
  font-weight: 500;
  margin-bottom: 0.5rem;
}
.figure-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #6b6b73;
  padding-top: 0.625rem;
  border-top: 1px solid rgba(255,255,255,0.04);
}
.figure-card-views {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* --- Figure Category Card --- */
.fig-category-card {
  background: #121214;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 1.75rem 1.25rem;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  display: block;
}
.fig-category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245,166,35,0.3);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}
.fig-category-card .fig-cat-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  display: block;
}
.fig-category-card .fig-cat-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #ededef;
  margin-bottom: 0.25rem;
}
.fig-category-card .fig-cat-count {
  font-size: 0.75rem;
  color: #6b6b73;
}

/* --- Categories grid (encyclopedia homepage) --- */
.fig-categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 1rem;
}

/* --- Search Bar --- */
.fig-search-bar {
  max-width: 600px;
  margin: 1.5rem auto 0;
  display: flex;
  gap: 0.75rem;
}
.fig-search-bar input {
  flex: 1;
  padding: 0.875rem 1.25rem;
  background: #121214;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: #ededef;
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.25s ease;
}
.fig-search-bar input:focus {
  border-color: #f5a623;
  box-shadow: 0 0 0 3px rgba(245,166,35,0.15);
}
.fig-search-bar input::placeholder { color: #6b6b73; }

/* --- Alphabet Navigation --- */
.alpha-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem;
  padding: 1.5rem 0;
}
.alpha-nav a, .alpha-nav span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #6b6b73;
  text-decoration: none;
  transition: all 0.2s ease;
  background: transparent;
}
.alpha-nav a:hover {
  color: #f5a623;
  background: rgba(245,166,35,0.1);
}
.alpha-nav span.dim {
  color: #2a2a30;
}

/* --- Related Figures Grid --- */
.related-figures-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}
.related-figure-card {
  background: #121214;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
  transition: all 0.3s ease;
  text-decoration: none;
  display: block;
}
.related-figure-card:hover {
  transform: translateY(-3px);
  border-color: rgba(245,166,35,0.2);
  box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}
.related-figure-card .rel-fig-photo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 0.75rem;
  display: block;
  border: 2px solid rgba(245,166,35,0.2);
}
.related-figure-card .rel-fig-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: #ededef;
  margin-bottom: 0.25rem;
}
.related-figure-card .rel-fig-relation {
  font-size: 0.75rem;
  color: #f5a623;
  font-weight: 500;
}
.related-figure-card .rel-fig-placeholder {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin: 0 auto 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  font-size: 1.5rem;
  font-weight: 700;
  color: rgba(245,166,35,0.3);
  border: 2px solid rgba(245,166,35,0.15);
}

/* --- FAQ Section --- */
.fig-faq-list { list-style: none; }
.fig-faq-item {
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 1.25rem 0;
}
.fig-faq-item:last-child { border-bottom: none; }
.fig-faq-q {
  font-size: 1rem;
  font-weight: 600;
  color: #ededef;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}
.fig-faq-q::before {
  content: 'Q:';
  color: #f5a623;
  font-weight: 700;
}
.fig-faq-a {
  font-size: 0.9375rem;
  color: #8b8b93;
  line-height: 1.7;
  padding-left: 1.75rem;
}
.fig-faq-a::before {
  content: 'A:';
  color: #54a0ff;
  font-weight: 700;
  margin-right: 0.5rem;
}

/* --- Pagination --- */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  padding: 3rem 0;
}
.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 0.75rem;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #8b8b93;
  background: #121214;
  border: 1px solid rgba(255,255,255,0.06);
  text-decoration: none;
  transition: all 0.25s ease;
}
.pagination a:hover {
  border-color: rgba(245,166,35,0.3);
  color: #f5a623;
}
.pagination .current {
  background: #f5a623;
  color: #0a0a0b;
  border-color: #f5a623;
}
.pagination .disabled {
  opacity: 0.3;
  cursor: default;
}

/* --- Category Sidebar --- */
.category-sidebar {
  background: #121214;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 1.5rem;
}
.category-sidebar h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: #ededef;
  margin-bottom: 1rem;
}
.category-sidebar-list { list-style: none; }
.category-sidebar-list li { margin-bottom: 0.25rem; }
.category-sidebar-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.625rem 0.75rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #8b8b93;
  transition: all 0.2s ease;
}
.category-sidebar-list a:hover {
  background: rgba(245,166,35,0.06);
  color: #f5a623;
}
.category-sidebar-list a .cat-count {
  font-size: 0.75rem;
  color: #6b6b73;
  background: rgba(255,255,255,0.04);
  padding: 0.15rem 0.5rem;
  border-radius: 100px;
}
.category-sidebar-list a.active {
  color: #f5a623;
  background: rgba(245,166,35,0.08);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .figure-content {
    grid-template-columns: 1fr;
  }
  .figure-hero-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .figure-photo {
    width: 120px;
    height: 120px;
  }
  .figure-hero-tags {
    justify-content: center;
  }
  .figure-hero-actions {
    justify-content: center;
  }
  .quick-facts {
    position: static;
  }
  .figures-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
  .fig-categories-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }
  .fig-search-bar {
    flex-direction: column;
  }
  .figure-section-card {
    padding: 1.5rem;
  }
  .figure-card-img {
    height: 150px;
  }
}

/* --- Animation --- */
@keyframes figFadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}