/* ── NAVBAR ─────────────────────────────────────── */
.site-nav {
  background: var(--cream);
  border-bottom: 1px solid var(--rule);
  padding: 0.9rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-nav .brand {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
}

.site-nav .brand span {
  color: var(--amber);
  font-style: italic;
  font-weight: 400;
}

.nav-link-item {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  text-decoration: none;
  padding: 0.25rem 0;
  transition: color 0.2s;
  position: relative;
}

.nav-link-item.active {
  color: var(--ink);
}

.nav-link-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--amber);
  transition: width 0.25s ease;
}

.nav-link-item.active::after,
.nav-link-item:hover::after {
  width: 100%;
}

.nav-link-item:hover {
  color: var(--ink);
}

/* ── PAGE HEADER ─────────────────────────────────── */
.page-header {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--rule);
}

.page-header-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.page-eyebrow {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.page-eyebrow::before {
  content: '';
  display: inline-block;
  width: 1.5rem;
  height: 1px;
  background: var(--amber);
}

.page-title {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 500;
  line-height: 1.15;
  margin: 0;
}

.page-count {
  font-family: var(--garamond);
  font-size: 1rem;
  font-style: italic;
  color: var(--ink-muted);
  margin-top: 0.4rem;
}

/* ── SEARCH & FILTERS ────────────────────────────── */
.filters-bar {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--rule);
  background: var(--cream);
  position: sticky;
  top: 57px;
  z-index: 90;
}

.search-wrap {
  position: relative;
  max-width: 320px;
}

.search-input {
  width: 100%;
  background: white;
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 0.5rem 0.75rem 0.5rem 2.25rem;
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--ink);
  font-weight: 300;
  outline: none;
  transition: border-color 0.2s;
}

.search-input::placeholder {
  color: var(--ink-muted);
}

.search-input:focus {
  border-color: var(--amber);
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-muted);
  font-size: 0.85rem;
  pointer-events: none;
}

.filter-chip {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  border: 1px solid var(--rule);
  padding: 0.3em 0.85em;
  border-radius: 2px;
  text-decoration: none;
  cursor: pointer;
  background: transparent;
  transition: all 0.18s;
  white-space: nowrap;
}

.filter-chip:hover,
.filter-chip.active {
  background: var(--amber);
  color: white;
  border-color: var(--amber);
}

/* ── PERSON LIST ─────────────────────────────────── */
.persons-list {
  padding: 2rem 0 3rem;
  overflow-x: hidden;
}

.person-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  color: var(--ink);
  transition: background 0.15s;
  position: relative;
}

.person-row::before {
  content: '';
  position: absolute;
  left: -0.5rem;
  right: -0.5rem;
  top: 0;
  bottom: 0;
  background: var(--amber-pale);
  opacity: 0;
  border-radius: 3px;
  transition: opacity 0.18s;
  z-index: 0;
}

.person-row:hover::before {
  opacity: 1;
}

.person-row > * {
  position: relative;
  z-index: 1;
}

.person-portrait {
  width: 56px;
  height: 70px;
  object-fit: cover;
  border-radius: 2px;
  filter: sepia(10%) contrast(0.97);
  flex-shrink: 0;
  transition: filter 0.2s;
}

.person-row:hover .person-portrait {
  filter: sepia(0%) contrast(1);
}

.person-info {
  flex: 1;
  min-width: 0;
}

.person-name {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: 0.2rem;
  color: var(--ink);
}

.person-dates {
  font-family: var(--garamond);
  font-size: 0.9rem;
  font-style: italic;
  color: var(--ink-muted);
}

.person-family {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber);
  margin-top: 0.25rem;
}

.person-summary {
  font-family: var(--garamond);
  font-size: 0.95rem;
  color: var(--ink-muted);
  line-height: 1.55;
  max-width: 480px;
}

@media (max-width: 767px) {
  .person-summary {
    display: none;
  }
}

.person-docs {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
  align-items: center;
}

.doc-dot {
  font-size: 1rem;
  line-height: 1;
  opacity: 0.6;
  transition: opacity 0.15s;
}

.person-row:hover .doc-dot {
  opacity: 1;
}

.person-arrow {
  color: var(--rule);
  font-size: 0.9rem;
  flex-shrink: 0;
  transition: transform 0.2s, color 0.2s;
}

.person-row:hover .person-arrow {
  transform: translateX(3px);
  color: var(--amber);
}

/* ── ALPHABET NAV ────────────────────────────────── */
.alpha-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  margin-bottom: 0;
}

.alpha-letter {
  display: inline-block;
  width: 1.8rem;
  height: 1.8rem;
  line-height: 1.8rem;
  text-align: center;
  font-family: var(--serif);
  font-size: 0.85rem;
  color: var(--ink-muted);
  border-radius: 2px;
  text-decoration: none;
  transition: all 0.15s;
}

.alpha-letter:hover,
.alpha-letter.has-entries:hover {
  background: var(--amber);
  color: white;
}

.alpha-letter.has-entries {
  color: var(--ink);
  font-weight: 500;
}

.alpha-letter.disabled {
  color: var(--rule);
  cursor: default;
  pointer-events: none;
}

.alpha-letter.active {
  background: var(--amber-light);
  color: var(--text-dark);
  font-weight: 700;
}

#persons-main {
  transition: opacity 0.15s;
}

/* ── LETTER GROUP ────────────────────────────────── */
.letter-heading {
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--amber-light);
  line-height: 1;
  padding: 1.5rem 0 0.5rem;
  border-top: 1px solid var(--rule);
  margin-top: 0.5rem;
  display: flex;
  align-items: baseline;
  gap: 1rem;
}

.letter-heading-rule {
  flex: 1;
  height: 1px;
  background: var(--rule);
}

/* ── PAGINATION ──────────────────────────────────── */
.pagination-wrap {
  padding: 2rem 0 1rem;
  border-top: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.pagination-info {
  font-family: var(--garamond);
  font-size: 0.95rem;
  font-style: italic;
  color: var(--ink-muted);
}

.page-link-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--ink-muted);
  border: 1px solid transparent;
  border-radius: 2px;
  text-decoration: none;
  transition: all 0.15s;
}

.page-link-item:hover {
  border-color: var(--rule);
  color: var(--ink);
}

.page-link-item.current {
  background: var(--amber);
  color: white;
  border-color: var(--amber);
}

/* ── SIDEBAR ─────────────────────────────────────── */
.sidebar-section {
  padding: 1.5rem;
  background: white;
  border: 1px solid var(--rule);
  border-radius: 3px;
  margin-bottom: 1.5rem;
}

.sidebar-title {
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 1rem;
}

.family-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--cream-dark);
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.88rem;
  transition: color 0.15s;
}

.family-list-item:last-child {
  border-bottom: none;
}

.family-list-item:hover {
  color: var(--amber);
}

.family-count {
  font-size: 0.75rem;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

/* ── FOOTER ──────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: 1.75rem 0;
  background: var(--cream);
}

.footer-brand {
  font-family: var(--serif);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-muted);
}

.footer-brand span {
  font-style: italic;
  color: var(--amber);
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--ink-muted);
}

/* ── ANIMATIONS ──────────────────────────────────── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-up {
  opacity: 0;
  animation: fadeUp 0.5s ease forwards;
}

.fade-up-1 {
  animation-delay: 0.05s;
}

.fade-up-2 {
  animation-delay: 0.12s;
}

.fade-up-3 {
  animation-delay: 0.2s;
}
