:root {
  --bg: #faf7f2;
  --bg-alt: #f1ece3;
  --surface: #ffffff;
  --ink: #1d1a17;
  --ink-soft: #4d463f;
  --muted: #7a726a;
  --line: #e4ddd2;
  --accent: #c8501f;
  --accent-ink: #9a3a12;
  --accent-soft: #fbe6da;
  --gold: #d8a63a;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(29,26,23,.06), 0 8px 24px -12px rgba(29,26,23,.18);
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --container: 1120px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

.container { width: min(var(--container), 100% - 2rem); margin-inline: auto; }
.container.narrow { max-width: 760px; }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.header-inner { display: flex; align-items: center; gap: 1.5rem; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark { color: var(--accent); }
.brand.small { font-size: 1.1rem; }
.site-nav { display: flex; gap: 1.25rem; }
.site-nav a { color: var(--ink-soft); font-weight: 500; padding: .25rem 0; border-bottom: 2px solid transparent; }
.site-nav a:hover { color: var(--ink); text-decoration: none; border-color: var(--accent); }
.header-search { margin-left: auto; }
.header-search input {
  width: 220px; max-width: 100%; padding: .5rem .85rem; border: 1px solid var(--line); border-radius: 999px;
  background: var(--bg); font: inherit; font-size: .9rem; color: var(--ink);
}
.header-search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }

/* Hero */
.hero { padding: clamp(3rem, 8vw, 6rem) 0 2.5rem; text-align: center; }
.hero .eyebrow { display: inline-block; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink); font-weight: 600; margin-bottom: 1rem; }
.hero h1 { margin-bottom: .6em; }
.hero p.lead { font-size: clamp(1.05rem, 1.8vw, 1.25rem); color: var(--ink-soft); max-width: 640px; margin: 0 auto 1.5rem; }
.hero em { font-style: italic; color: var(--accent); }

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin: 0 0 2rem; }
.chip {
  display: inline-block; padding: .4rem .9rem; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-soft); font-size: .875rem; font-weight: 500;
}
.chip:hover { border-color: var(--accent); color: var(--accent-ink); text-decoration: none; }
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Section headings */
.section { padding: 2rem 0 3rem; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.section-head h2 { margin: 0; }
.section-head .count { color: var(--muted); font-size: .9rem; }

/* Cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.25rem; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; display: flex; flex-direction: column; gap: .75rem; box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease; position: relative;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(29,26,23,.06), 0 18px 36px -16px rgba(29,26,23,.28); }
.card a.stretch::after { content: ""; position: absolute; inset: 0; }
.card a.stretch:hover { text-decoration: none; }
.card h3 { margin: 0; font-size: 1.3rem; }
.card h3 a { color: var(--ink); }
.card .tagline { color: var(--ink-soft); font-weight: 500; margin: 0; font-size: .95rem; line-height: 1.45; }
.card .summary { color: var(--muted); font-size: .95rem; margin: 0; }
.card-top { display: flex; align-items: center; gap: .9rem; }
.card-top .avatar { width: 56px; height: 56px; font-size: 1.2rem; }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .7rem; font-size: .78rem; color: var(--muted); margin-top: auto; padding-top: .5rem; border-top: 1px dashed var(--line); }
.badge { display: inline-block; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; color: var(--accent-ink); background: var(--accent-soft); padding: .2rem .55rem; border-radius: 6px; }
.badge.gold { color: #6b4d05; background: #fbf0cf; }

/* Avatar */
.avatar {
  flex: 0 0 auto; width: 64px; height: 64px; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; color: #fff;
  background: linear-gradient(135deg, hsl(var(--h, 20) 55% 45%), hsl(calc(var(--h, 20) + 40) 60% 35%));
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.35);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 160px; height: 160px; font-size: 3rem; }

/* Featured */
.featured { background: var(--bg-alt); padding: 3rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.featured .grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.featured .card { background: var(--surface); }

/* Profile */
.profile-hero { padding: 3rem 0 2rem; }
.profile-hero .inner { display: grid; grid-template-columns: auto 1fr; gap: 2rem; align-items: center; }
.profile-hero h1 { margin-bottom: .25em; }
.profile-hero .tagline { font-size: 1.2rem; color: var(--ink-soft); font-family: var(--font-display); font-style: italic; margin-bottom: .75rem; }
.profile-meta { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; color: var(--muted); font-size: .9rem; }
.profile-meta a { color: var(--accent-ink); }
.profile-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 3rem; padding-bottom: 3rem; }
.prose { font-size: 1.08rem; line-height: 1.75; }
.prose p { margin-bottom: 1.25em; }
.prose > p:first-child::first-letter { font-family: var(--font-display); font-size: 3.2em; float: left; line-height: .85; padding-right: .08em; color: var(--accent); }
.quote-block {
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: var(--radius);
  padding: 1.5rem; font-family: var(--font-display); font-size: 1.25rem; line-height: 1.45; font-style: italic; color: var(--ink);
  margin: 0 0 1.5rem;
}
.quote-block cite { display: block; margin-top: .75rem; font-style: normal; font-family: var(--font-body); font-size: .85rem; color: var(--muted); }
.sidebar-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.5rem; margin-bottom: 1.5rem; }
.sidebar-box h3 { font-size: 1.05rem; margin-bottom: .75rem; }
.facts { list-style: none; margin: 0; padding: 0; }
.facts li { display: flex; justify-content: space-between; gap: 1rem; padding: .4rem 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.facts li:last-child { border-bottom: 0; }
.facts span:first-child { color: var(--muted); }
.related-list { list-style: none; margin: 0; padding: 0; }
.related-list li { display: flex; align-items: center; gap: .75rem; padding: .5rem 0; border-bottom: 1px solid var(--line); }
.related-list li:last-child { border-bottom: 0; }
.related-list .avatar { width: 40px; height: 40px; font-size: .9rem; }
.related-list a { color: var(--ink); font-weight: 500; }
.related-list small { display: block; color: var(--muted); font-weight: 400; }

/* Empty state */
.empty { text-align: center; padding: 3rem 1rem; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); }

/* Buttons & forms */
.btn {
  display: inline-flex; align-items: center; gap: .4rem; padding: .6rem 1.1rem; border-radius: 10px; border: 1px solid var(--ink);
  background: var(--ink); color: #fff; font: inherit; font-weight: 500; cursor: pointer; text-decoration: none;
}
.btn:hover { background: #000; text-decoration: none; }
.btn.secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn.secondary:hover { border-color: var(--ink); }
.btn.danger { background: #b3261e; border-color: #b3261e; }
.btn.sm { padding: .35rem .7rem; font-size: .85rem; border-radius: 8px; }
.btn.accent { background: var(--accent); border-color: var(--accent); }
.btn.accent:hover { background: var(--accent-ink); }

/* Footer */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); margin-top: 3rem; padding: 2.5rem 0; }
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 1.5rem; align-items: start; }
.footer-inner nav { display: flex; gap: 1.25rem; }
.footer-inner nav a { color: var(--ink-soft); }
.footer-inner > p { grid-column: 1 / -1; margin: 0; }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: .5rem; margin-top: 2rem; flex-wrap: wrap; }
.pagination a, .pagination span { padding: .45rem .8rem; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft); }
.pagination span.current { background: var(--ink); color: #fff; border-color: var(--ink); }

/* About */
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.25rem; margin: 2rem 0; }
.about-grid .card h3 { font-size: 1.1rem; }

@media (max-width: 860px) {
  .profile-body { grid-template-columns: 1fr; gap: 2rem; }
}
@media (max-width: 640px) {
  .header-inner { flex-wrap: wrap; gap: .75rem 1rem; padding: .6rem 0; }
  .site-nav { order: 3; width: 100%; }
  .header-search { margin-left: auto; }
  .header-search input { width: 160px; }
  .profile-hero .inner { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .profile-meta { justify-content: center; }
  .footer-inner { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; align-items: flex-start; gap: .25rem; }
}

/* Card refinements */
.card-sub { font-size: .8rem; color: var(--muted); margin-top: .1rem; }
.card-meta .read-more { margin-left: auto; color: var(--accent-ink); font-weight: 500; }
.card:hover .read-more { text-decoration: underline; }
.card .tagline { margin-top: .15rem; }

/* Photos */
.photo-credit { font-size: .75rem; color: var(--muted); margin: .75rem 0 0; line-height: 1.4; }
.photo-credit a { color: var(--muted); text-decoration: underline; text-decoration-color: var(--line); }
.avatar img { transition: transform .4s ease; }
.card:hover .avatar img { transform: scale(1.06); }
.avatar.lg { width: 200px; height: 200px; box-shadow: 0 10px 30px -10px rgba(29,26,23,.45), inset 0 0 0 4px rgba(255,255,255,.6); }
.avatar.lg img { border-radius: 50%; }
.hero.has-faces { padding-top: clamp(2rem, 5vw, 3.5rem); }
.face-strip { list-style: none; margin: 0 auto 2rem; padding: 0; display: flex; justify-content: center; flex-wrap: wrap; gap: .5rem; max-width: 820px; }
.face-strip li { animation: face-in .6s ease both; animation-delay: calc(var(--i) * 45ms); }
.face-strip a { display: block; border-radius: 50%; overflow: hidden; width: 56px; height: 56px; border: 3px solid var(--surface); box-shadow: 0 4px 14px -6px rgba(29,26,23,.5); transition: transform .2s ease; }
.face-strip a:hover { transform: translateY(-4px) scale(1.08); }
.face-strip img { width: 100%; height: 100%; object-fit: cover; display: block; }
.face-strip li:nth-child(even) a { transform: translateY(8px); }
.face-strip li:nth-child(even) a:hover { transform: translateY(4px) scale(1.08); }
@keyframes face-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (max-width: 640px) {
  .face-strip { gap: .35rem; }
  .face-strip a { width: 44px; height: 44px; border-width: 2px; }
  .face-strip li:nth-child(n+11) { display: none; }
  .avatar.lg { width: 150px; height: 150px; }
}
@media (prefers-reduced-motion: reduce) { .face-strip li { animation: none; } }

/* Suggest form */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.suggest-form .field { margin-bottom: 1rem; }
.suggest-form .field label { display: block; font-weight: 500; font-size: .9rem; margin-bottom: .35rem; }
.suggest-form input[type=text], .suggest-form input[type=email], .suggest-form textarea { width: 100%; padding: .65rem .8rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font: inherit; color: var(--ink); }
.suggest-form textarea { min-height: 140px; resize: vertical; line-height: 1.55; }
.suggest-form input:focus, .suggest-form textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.suggest-form .form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.25rem; }
.suggest-form .form-actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: .5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.hp { position: absolute; left: -9999px; top: -9999px; height: 0; overflow: hidden; }
.flash { padding: .75rem 1rem; border-radius: 10px; margin-bottom: 1rem; border: 1px solid; font-size: .95rem; }
.flash-error { background: #fdecea; border-color: #f5c2bd; color: #7d1a12; }
@media (max-width: 640px) { .suggest-form .form-grid { grid-template-columns: 1fr; } }
