:root {
  --ink: #16202e;
  --muted: #5b6b7f;
  --line: #e4e8ee;
  --bg: #ffffff;
  --soft: #f6f8fb;
  --accent: #1e40af;
  --accent-soft: #eaf0ff;
  --max: 1060px;
  --radius: 12px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--ink); background: var(--bg); line-height: 1.6; }
[dir="rtl"] { text-align: right; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.15; margin: 0 0 .4em; letter-spacing: -.02em; }
h2 { font-size: 1.35rem; margin: 2.2rem 0 1rem; letter-spacing: -.01em; }

/* Nav */
.nav { border-bottom: 1px solid var(--line); background: rgba(255,255,255,.9); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 20; }
.nav-inner { display: flex; align-items: center; gap: 18px; height: 60px; }
.brand { font-weight: 700; font-size: 1.1rem; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.brand .star { color: var(--accent); }
.links { display: flex; gap: 16px; flex-wrap: wrap; margin-inline-start: auto; }
.links a { color: var(--muted); font-size: .93rem; font-weight: 500; }
.links a:hover { color: var(--ink); text-decoration: none; }
.langpick { position: relative; }
.langpick summary { list-style: none; cursor: pointer; border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px; font-size: .82rem; font-weight: 600; color: var(--muted); }
.langpick summary::-webkit-details-marker { display: none; }
.langmenu { position: absolute; inset-inline-end: 0; margin-top: 6px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 6px; max-height: 320px; overflow: auto; box-shadow: 0 10px 30px rgba(20,32,46,.12); display: grid; gap: 2px; min-width: 180px; }
.langmenu a { padding: 6px 10px; border-radius: 6px; color: var(--ink); font-size: .88rem; }
.langmenu a:hover { background: var(--soft); text-decoration: none; }
.langmenu a.cur { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

/* Hero */
.hero { padding: 56px 0 28px; }
.hero.small { padding: 40px 0 16px; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 640px; }
.count { color: var(--accent); font-weight: 600; font-size: .95rem; text-transform: uppercase; letter-spacing: .04em; }
.btn { display: inline-block; margin-top: 14px; background: var(--accent); color: #fff; padding: 11px 20px; border-radius: 999px; font-weight: 600; font-size: .95rem; }
.btn:hover { text-decoration: none; opacity: .92; }

/* Category tiles */
.cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin: 8px 0 24px; }
.cat-tile { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: grid; gap: 4px; color: var(--ink); background: var(--soft); transition: border-color .15s, transform .15s; }
.cat-tile:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-2px); }
.cat-icon { font-size: 1.5rem; color: var(--accent); }
.cat-count { color: var(--accent); font-size: .8rem; font-weight: 600; }
.cat-desc { color: var(--muted); font-size: .88rem; }

/* Person grid + cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.card { display: flex; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; background: #fff; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.card:hover { text-decoration: none; border-color: var(--accent); box-shadow: 0 6px 20px rgba(20,32,46,.06); }
.card-img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex: none; background: var(--soft); }
.card-img.placeholder { display: grid; place-items: center; font-weight: 700; color: var(--accent); font-size: 1.3rem; }
.card-body { display: grid; gap: 2px; min-width: 0; }
.card-body strong { font-size: .98rem; }
.card-desc { color: var(--muted); font-size: .82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-cat { color: var(--accent); font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }

/* Person page */
.crumbs { color: var(--muted); font-size: .85rem; padding: 20px 0 0; }
.crumbs a { color: var(--muted); }
.person { max-width: 760px; padding-bottom: 20px; }
.person-head { display: flex; gap: 22px; align-items: center; padding: 18px 0 10px; }
.portrait { width: 130px; height: 130px; border-radius: 14px; object-fit: cover; border: 1px solid var(--line); flex: none; }
.role { color: var(--muted); font-size: 1.05rem; margin: .2em 0; }
.tag { color: var(--accent); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; margin: 0; }
.notice { background: var(--accent-soft); border-radius: 8px; padding: 10px 14px; font-size: .88rem; color: var(--accent); }
.bio p { font-size: 1.08rem; }
.source { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 22px; color: var(--muted); }
.source small { color: var(--muted); font-size: .82rem; }
.also { color: var(--muted); font-size: .9rem; }
.also a { margin-inline-start: 8px; }

.prose { max-width: 680px; padding: 30px 0; }
.prose p { font-size: 1.08rem; }

/* Footer */
.footer { border-top: 1px solid var(--line); margin-top: 48px; padding: 26px 0; color: var(--muted); font-size: .88rem; }
.footer .muted { color: var(--muted); }
@media (max-width: 560px) {
  .links { gap: 12px; }
  .person-head { flex-direction: column; align-items: flex-start; }
}
