/* רקמה אנושית אחת - memorial layout */
:root {
  --navy: #102b44;
  --navy-2: #173b59;
  --navy-3: #0c2236;
  --cream: #f5f0e8;
  --paper: #fbf9f4;
  --paper-2: #f4efe6;
  --ink: #17324a;
  --muted: #697b89;
  --paper-line: #d8d1c5;
  --shadow: 0 18px 55px rgba(4, 20, 34, .18);
  --serif: "Frank Ruhl Libre", "Noto Serif Hebrew", "David Libre", Georgia, serif;
  --sans: "Rubik", "Heebo", "Assistant", Arial, sans-serif;
  --portrait-size: 160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  background: var(--navy-3);
  color: var(--cream);
  line-height: 1.65;
}
button, input, a { font: inherit; }
img { max-width: 100%; }

.skip-link {
  position: fixed;
  top: 8px;
  right: 8px;
  z-index: 9999;
  transform: translateY(-160%);
  background: #fff;
  color: #111;
  padding: 10px 14px;
  border-radius: 8px;
}
.skip-link:focus { transform: none; }

/* Opening */
.hero {
  min-height: 560px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 70px 24px 64px;
  background:
    linear-gradient(rgba(11, 37, 57, .86), rgba(12, 42, 64, .91)),
    url('../img/bg-wide.webp') center / cover no-repeat;
  position: relative;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 24px;
  border: 1px solid rgba(245, 240, 232, .12);
  pointer-events: none;
}
.hero-inner { width: min(900px, 100%); position: relative; z-index: 1; }
.eyebrow { margin: 0 0 18px; font-size: .94rem; letter-spacing: .18em; font-weight: 600; color: #d8e6eb; }
.hero h1 { font-family: var(--serif); font-size: clamp(3.15rem, 7vw, 6.6rem); font-weight: 600; line-height: 1; margin: 0; color: #fffdf9; letter-spacing: -.03em; }
.hero-rule { width: min(420px, 66vw); height: 1px; background: linear-gradient(90deg, transparent, #9ebfca, transparent); margin: 30px auto; }
.poem { font-family: var(--serif); font-size: clamp(1.3rem, 2.35vw, 1.8rem); line-height: 1.7; margin: 0 auto 26px; padding: 0; border: 0; font-style: normal; }
.poem span { display: block; }
.dedication { max-width: 760px; margin: 0 auto; color: #e1e8e7; font-size: 1.05rem; line-height: 1.95; }
.hero-links { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.hero-links a { color: #f6f2ea; text-decoration: none; border-bottom: 1px solid rgba(246, 242, 234, .5); padding: 5px 3px; }
.hero-links a:hover, .hero-links a:focus-visible { border-color: #fff; outline: none; }
.gentle-enter { animation: gentleFade .8s ease both; }
@keyframes gentleFade { from { opacity: 0; } to { opacity: 1; } }

/* Main index */
.index-section { padding: 0 28px 70px; background: linear-gradient(#102f49, #0d263c); }
.toolbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 18px 0;
  background: rgba(16, 47, 73, .95);
  backdrop-filter: blur(9px);
  border-bottom: 1px solid rgba(255, 255, 255, .09);
}
.search-control {
  width: min(620px, calc(100vw - 90px));
  height: 50px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  background: rgba(255, 255, 255, .06);
  transition: border-color .2s, background .2s;
}
.search-control:focus-within { border-color: rgba(255, 255, 255, .56); background: rgba(255, 255, 255, .09); }
.search-control svg { width: 21px; fill: #c9d7dc; flex: none; }
.search-control input { width: 100%; border: 0; outline: 0; background: transparent; color: #fff; font-size: 1rem; }
.search-control input::placeholder { color: #bccbd1; }
.result-count { min-width: 112px; color: #c8d7dc; font-size: .93rem; }
.empty-search { text-align: center; padding: 38px 0; color: #d7e1e5; }
.empty-search[hidden] { display: none; }

.memorial-grid {
  max-width: 1380px;
  margin: 30px auto 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(176px, 1fr));
  gap: 38px 24px;
  align-items: start;
}
.memory-card {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  cursor: pointer;
  display: grid;
  grid-template-rows: var(--portrait-size) 2.8em 1.5em;
  justify-items: center;
  align-items: start;
  row-gap: 12px;
  min-width: 0;
  min-height: 235px;
  opacity: 1;
  transition: transform .22s ease;
}
.memory-card:hover, .memory-card:focus-visible { transform: translateY(-2px); outline: none; }

/* Nadav Amikam frame standard - same exact geometry for everyone */
.portrait-ring {
  inline-size: var(--portrait-size);
  block-size: var(--portrait-size);
  flex: 0 0 var(--portrait-size);
  border-radius: 50%;
  padding: 5px;
  overflow: hidden;
  border: 1px solid rgba(245, 240, 232, .44);
  background: rgba(255, 255, 255, .035);
  box-shadow: 0 7px 22px rgba(0, 0, 0, .15);
  transition: border-color .22s, box-shadow .22s;
}
.memory-card:hover .portrait-ring, .memory-card:focus-visible .portrait-ring {
  border-color: rgba(255, 255, 255, .82);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .2);
}
.portrait-ring img, .portrait-ring .portrait-placeholder {
  inline-size: 100%;
  block-size: 100%;
  border-radius: 50%;
  display: block;
  object-fit: var(--fit, cover);
  object-position: var(--pos, 50% 38%);
  filter: grayscale(1) contrast(1.06);
  background: #c9d0d1;
}
.portrait-placeholder { display: grid; place-items: center; color: #17324a; font-size: .75rem; text-align: center; padding: 12px; }
.card-name { width: 100%; font-family: var(--serif); font-size: 1.12rem; line-height: 1.35; text-align: center; color: #f7f3eb; display: flex; justify-content: center; align-items: flex-start; }
.card-place { width: 100%; font-size: .86rem; line-height: 1.4; color: #b8c9d0; text-align: center; }
.period-divider { grid-column: 1 / -1; display: flex; align-items: center; gap: 18px; margin: 22px 0 2px; font-family: var(--serif); font-size: 1.5rem; color: #f5f0e8; }
.period-divider::before, .period-divider::after { content: ""; height: 1px; flex: 1; background: rgba(255, 255, 255, .16); }

/* Preview popup */
.lightbox { position: fixed; inset: 0; z-index: 1000; display: none; place-items: center; padding: 24px; }
.lightbox.is-open { display: grid; }
.lightbox-backdrop { position: absolute; inset: 0; background: rgba(4, 17, 28, .72); backdrop-filter: blur(5px); opacity: 0; animation: backdropIn .28s ease forwards; }
.lightbox-card {
  width: min(1080px, calc(100vw - 36px));
  max-height: min(86vh, 800px);
  overflow: auto;
  position: relative;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid #ded6ca;
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 42px;
  opacity: 0;
  transform: scale(.985);
  animation: dialogIn .34s cubic-bezier(.16, 1, .3, 1) forwards;
}
.lightbox-close { position: absolute; top: 14px; left: 16px; width: 42px; height: 42px; border-radius: 50%; border: 1px solid #d5cec2; background: #fff; color: #213c52; font-size: 1.65rem; line-height: 1; cursor: pointer; z-index: 2; }
.lightbox-close:hover, .lightbox-close:focus-visible { outline: 2px solid #315e7b; outline-offset: 2px; }
.lightbox-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 44px; align-items: center; }
.lightbox-media { margin: 0; display: flex; justify-content: center; }
.lightbox-img {
  inline-size: 238px;
  block-size: 238px;
  border-radius: 50%;
  padding: 7px;
  overflow: hidden;
  border: 1px solid #c9c1b5;
  background: #fff;
  box-shadow: 0 12px 30px rgba(23, 50, 74, .12);
}
.lightbox-img img, .lightbox-img .portrait-placeholder { width: 100%; height: 100%; border-radius: 50%; object-fit: var(--fit, cover); object-position: var(--pos, 50% 38%); display: block; }
.lightbox-img img { filter: none; }
.lightbox-kicker { margin: 0; color: #71818c; font-size: .92rem; }
.lightbox-details h2 { font-family: var(--serif); font-size: clamp(2.1rem, 4vw, 3.5rem); line-height: 1.05; margin: 4px 0 10px; color: #17324a; }
.service-line { display: flex; gap: 8px; flex-wrap: wrap; font-weight: 600; color: #36596f; margin: 0 0 9px; }
.service-line .dot { opacity: .5; }
.lightbox-role { margin: 0 0 16px; color: #536a78; }
.preview-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 18px; margin: 0 0 18px; padding: 0; list-style: none; color: #405967; font-size: .92rem; }
.preview-facts li { padding-top: 7px; border-top: 1px solid #e4ddd2; }
.lightbox-summary { font-family: var(--serif); font-size: 1.12rem; line-height: 1.8; margin: 0; max-width: 64ch; }
.lightbox-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.primary-button, .secondary-button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; border-radius: 999px; padding: 9px 18px; text-decoration: none; cursor: pointer; }
.primary-button { background: #173b59; color: #fff; border: 1px solid #173b59; }
.secondary-button { background: transparent; color: #173b59; border: 1px solid #aebbc3; }
.primary-button:hover, .primary-button:focus-visible, .secondary-button:hover, .secondary-button:focus-visible { outline: 2px solid #45718c; outline-offset: 2px; }
@keyframes backdropIn { to { opacity: 1; } }
@keyframes dialogIn { to { opacity: 1; transform: none; } }

/* Individual memorial pages */
.person-page { background: #eee9df; color: var(--ink); min-height: 100vh; }
.person-topbar { background: #12314b; color: #f7f3eb; padding: 15px 24px; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.person-topbar-inner { max-width: 1220px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.person-topbar a { color: #fff; text-decoration: none; }
.person-brand { font-family: var(--serif); font-size: 1.18rem; }
.back-link { font-size: .93rem; opacity: .92; }
.person-main { max-width: 1220px; margin: 0 auto; padding: 44px 24px 82px; }

.person-intro {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 44px;
  align-items: center;
  background: var(--paper);
  border: 1px solid #d9d1c4;
  border-radius: 26px;
  padding: 34px 38px;
  box-shadow: 0 10px 34px rgba(33, 49, 61, .07);
}
.person-portrait {
  inline-size: 210px;
  block-size: 210px;
  margin: auto;
  border-radius: 50%;
  padding: 6px;
  overflow: hidden;
  border: 1px solid #bfb6aa;
  background: #fff;
  box-shadow: 0 10px 28px rgba(20, 48, 68, .11);
}
.person-portrait img, .person-portrait .portrait-placeholder { width: 100%; height: 100%; border-radius: 50%; display: block; object-fit: var(--fit, cover); object-position: var(--pos, 50% 38%); }
.person-head .place { color: #72818b; margin: 0 0 5px; font-size: .96rem; }
.person-head h1 { font-family: var(--serif); font-size: clamp(2.7rem, 5vw, 4.7rem); line-height: 1.02; margin: 0 0 12px; color: #17324a; font-weight: 700; }
.person-head .role { color: #4f6878; font-size: 1.04rem; margin: 10px 0 0; max-width: 76ch; }
.person-source { display: inline-block; margin-top: 16px; color: #214f6b; text-underline-offset: 3px; }
.facts-panel { margin-top: 22px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 26px; max-width: 900px; }
.fact { padding: 10px 0; border-top: 1px solid #e2dacf; color: #415966; }

.story-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 30px; margin-top: 30px; align-items: start; }
.story-stack { display: grid; gap: 22px; min-width: 0; }
.story-section, .aside-card { background: var(--paper); border: 1px solid #d9d1c4; border-radius: 20px; }
.story-section { padding: 34px 40px 38px; }
.aside-card { padding: 24px; }
.story-section h2, .aside-card h2 { font-family: var(--serif); color: #17324a; margin: 0 0 19px; font-size: 1.72rem; line-height: 1.2; }
.story-section h2 { padding-bottom: 12px; border-bottom: 1px solid #e4ddd3; }
.story-copy { max-width: 72ch; }
.story-copy p { font-size: 1.04rem; line-height: 1.95; margin: 0 0 1.15em; color: #2f4655; }
.story-copy p:last-child { margin-bottom: 0; }
.person-aside { display: grid; gap: 18px; position: sticky; top: 20px; }
.aside-summary { font-family: var(--serif); font-size: 1.08rem; line-height: 1.85; color: #38505f; }
.face-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.face-gallery figure { margin: 0; }
.face-gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; object-position: center; border-radius: 12px; display: block; border: 1px solid #e2dbd1; }
.memorial-links { display: grid; gap: 8px; }
.memorial-links a { color: #214f6b; text-underline-offset: 3px; overflow-wrap: anywhere; }
.page-footer { text-align: center; color: #687984; margin-top: 38px; font-family: var(--serif); }

@media (max-width: 900px) {
  .person-intro { grid-template-columns: 190px minmax(0, 1fr); gap: 30px; padding: 28px; }
  .person-portrait { inline-size: 175px; block-size: 175px; }
  .story-layout { grid-template-columns: minmax(0, 1fr) 260px; }
  .story-section { padding: 30px; }
}

@media (max-width: 820px) {
  :root { --portrait-size: 130px; }
  .hero { min-height: 520px; background-image: linear-gradient(rgba(11, 37, 57, .86), rgba(12, 42, 64, .92)), url('../img/bg-tall.webp'); padding: 58px 22px; }
  .hero::after { inset: 14px; }
  .hero h1 { font-size: clamp(3rem, 14vw, 5rem); line-height: 1.02; }
  .dedication { font-size: .98rem; }
  .toolbar { flex-direction: column; gap: 7px; padding: 12px 0; }
  .search-control { width: min(620px, calc(100vw - 42px)); }
  .result-count { min-width: 0; }
  .index-section { padding-inline: 16px; }
  .memorial-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 13px; }
  .memory-card { grid-template-rows: var(--portrait-size) 2.7em 1.4em; min-height: 205px; }
  .card-name { font-size: 1rem; }
  .lightbox { padding: 12px; }
  .lightbox-card { padding: 54px 22px 28px; border-radius: 18px; max-height: 91vh; }
  .lightbox-layout { grid-template-columns: 1fr; gap: 22px; text-align: center; }
  .lightbox-img { inline-size: 205px; block-size: 205px; }
  .preview-facts { grid-template-columns: 1fr; text-align: right; }
  .lightbox-actions { justify-content: center; }
  .person-main { padding: 24px 14px 55px; }
  .person-intro { grid-template-columns: 1fr; padding: 26px 20px; gap: 22px; text-align: center; }
  .person-portrait { inline-size: min(205px, 68vw); block-size: min(205px, 68vw); }
  .person-head h1 { font-size: clamp(2.7rem, 12vw, 4rem); }
  .facts-panel { text-align: right; }
  .story-layout { grid-template-columns: 1fr; }
  .person-aside { position: static; order: -1; }
  .story-section, .aside-card { padding: 22px 19px; }
}

@media (max-width: 480px) {
  :root { --portrait-size: 138px; }
  .memorial-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap-inline: 12px; }
  .facts-panel { grid-template-columns: 1fr; }
  .face-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .person-topbar-inner { align-items: flex-start; flex-direction: column; gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .gentle-enter, .lightbox-backdrop, .lightbox-card { animation: none !important; }
  .memory-card, .portrait-ring { transition: none; }
}

/* =========================================================
   ORIGINAL ATTACHED DESIGN - visual restoration
   ========================================================= */
:root {
  --heritage-blue: #304a7d;
  --heritage-blue-deep: #263f6d;
  --heritage-blue-dark: #20385f;
  --heritage-cyan: #55b8d4;
  --heritage-white: #f8f7f3;
  --heritage-soft: #e3e9ed;
  --heritage-serif: "David Libre", "Noto Serif Hebrew", "Frank Ruhl Libre", "Times New Roman", serif;
  --heritage-sans: "Arial Hebrew", "Noto Sans Hebrew", "Heebo", Arial, sans-serif;
}

body {
  font-family: var(--heritage-sans);
  background: var(--heritage-blue-deep);
  color: var(--heritage-white);
}

.hero {
  min-height: 650px;
  padding: 28px 28px 58px;
  background:
    linear-gradient(90deg, rgba(35, 58, 99, .70) 0%, rgba(48, 74, 125, .88) 52%, rgba(48, 74, 125, .98) 100%),
    url('../img/leaf-bg.webp') 38% center / cover no-repeat;
  text-align: initial;
  place-items: center;
}
.hero::after { display: none; }
.hero-inner { width: min(1050px, 100%); margin: auto; }
.eyebrow {
  text-align: center;
  color: var(--heritage-soft);
  font-size: .92rem;
  letter-spacing: .22em;
  margin: 0 0 22px;
}
.hero-rule {
  width: 100%;
  max-width: none;
  height: 1px;
  margin: 0;
  background: linear-gradient(90deg, transparent 0%, var(--heritage-cyan) 10%, var(--heritage-cyan) 90%, transparent 100%);
  opacity: .9;
}
.hero-composition {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
  gap: clamp(48px, 8vw, 110px);
  align-items: center;
  padding: 44px 38px 42px;
}
.hero h1 {
  grid-column: 1;
  margin: 0;
  text-align: right;
  font-family: var(--heritage-serif);
  font-size: clamp(4.4rem, 8.2vw, 7rem);
  font-weight: 400;
  line-height: .83;
  letter-spacing: -.04em;
  color: #fff;
}
.poem {
  grid-column: 2;
  margin: 0;
  text-align: right;
  font-family: var(--heritage-serif);
  font-size: clamp(1.55rem, 2.75vw, 2.35rem);
  line-height: 1.58;
  font-weight: 400;
  color: #fff;
}
.hero-rule-bottom { margin-bottom: 34px; }
.dedication {
  max-width: 770px;
  text-align: center;
  color: var(--heritage-white);
  font-family: var(--heritage-serif);
  font-size: 1.12rem;
  line-height: 2;
}
.hero-links { margin-top: 24px; gap: 22px; }
.hero-links a {
  color: var(--heritage-white);
  border-bottom: 1px solid rgba(85, 184, 212, .78);
  padding-inline: 2px;
}

.index-section {
  min-height: 100vh;
  padding: 0 30px 88px;
  background:
    linear-gradient(rgba(45, 70, 118, .94), rgba(36, 59, 99, .98)),
    url('../img/leaf-bg.webp') left 18% / min(980px, 72vw) auto no-repeat;
}
.toolbar {
  background: rgba(43, 67, 112, .96);
  border-bottom: 1px solid rgba(85, 184, 212, .40);
  box-shadow: none;
  backdrop-filter: blur(8px);
}
.search-control {
  height: 48px;
  background: rgba(255,255,255,.035);
  border-color: rgba(248,247,243,.34);
}
.search-control:focus-within {
  background: rgba(255,255,255,.055);
  border-color: rgba(85,184,212,.9);
}
.search-control svg { fill: #d9e4e8; }
.result-count { color: #dbe5e8; }

.memorial-grid {
  max-width: 1360px;
  margin-top: 44px;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 44px 30px;
}
.memory-card {
  grid-template-rows: var(--portrait-size) 2.8em 1.5em;
  row-gap: 13px;
  min-height: 236px;
}
.memory-card:hover,
.memory-card:focus-visible { transform: translateY(-1px); }
.portrait-ring {
  border: 2px solid rgba(248,247,243,.72);
  padding: 5px;
  background: transparent;
  box-shadow: none;
}
.memory-card:hover .portrait-ring,
.memory-card:focus-visible .portrait-ring {
  border-color: #fff;
  box-shadow: 0 0 0 1px rgba(85,184,212,.42);
}
.portrait-ring img { filter: grayscale(1) contrast(1.04); }
.card-name {
  color: #fff;
  font-family: var(--heritage-serif);
  font-size: 1.12rem;
  font-weight: 400;
}
.card-place { color: #d7e1e5; }
.period-divider {
  color: #fff;
  font-family: var(--heritage-serif);
  font-weight: 400;
}
.period-divider::before,
.period-divider::after { background: rgba(85,184,212,.5); }

.lightbox-backdrop {
  background: rgba(17, 34, 58, .82);
  backdrop-filter: blur(6px);
}
.lightbox-card {
  background:
    linear-gradient(rgba(47,73,123,.96), rgba(38,62,103,.98)),
    url('../img/leaf-bg.webp') 15% center / cover no-repeat;
  color: var(--heritage-white);
  border: 1px solid rgba(248,247,243,.35);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(10, 24, 43, .38);
}
.lightbox-close {
  background: transparent;
  border: 1px solid rgba(248,247,243,.5);
  color: #fff;
}
.lightbox-close:hover,
.lightbox-close:focus-visible { outline-color: var(--heritage-cyan); }
.lightbox-img {
  border: 2px solid rgba(248,247,243,.76);
  background: transparent;
  box-shadow: none;
  padding: 6px;
}
.lightbox-kicker,
.lightbox-role { color: #dbe4e8; }
.lightbox-details h2 {
  color: #fff;
  font-family: var(--heritage-serif);
  font-weight: 400;
}
.service-line { color: #edf2f3; }
.preview-facts { color: #e3e9eb; }
.preview-facts li { border-top-color: rgba(85,184,212,.35); }
.lightbox-summary { color: #fff; font-family: var(--heritage-serif); }
.primary-button,
.secondary-button { border-radius: 4px; }
.primary-button {
  background: #f6f5f0;
  color: var(--heritage-blue-dark);
  border-color: #f6f5f0;
}
.secondary-button {
  background: transparent;
  color: #fff;
  border-color: rgba(248,247,243,.55);
}
.primary-button:hover,
.primary-button:focus-visible,
.secondary-button:hover,
.secondary-button:focus-visible { outline-color: var(--heritage-cyan); }

.person-page {
  min-height: 100vh;
  color: var(--heritage-white);
  background:
    linear-gradient(90deg, rgba(39,62,104,.88), rgba(48,74,125,.97)),
    url('../img/leaf-bg.webp') left top / cover fixed no-repeat;
}
.person-topbar {
  background: rgba(34,55,92,.9);
  color: #fff;
  border-bottom: 1px solid rgba(85,184,212,.38);
}
.person-brand { font-family: var(--heritage-serif); font-weight: 400; }
.person-intro,
.story-section,
.aside-card {
  background: rgba(45,70,117,.84);
  color: #fff;
  border: 1px solid rgba(248,247,243,.25);
  border-radius: 8px;
  box-shadow: none;
  backdrop-filter: blur(2px);
}
.person-intro { border-top-color: rgba(85,184,212,.65); }
.person-portrait {
  border: 2px solid rgba(248,247,243,.76);
  background: transparent;
  padding: 6px;
  box-shadow: none;
}
.person-head .place,
.person-head .role,
.fact,
.aside-summary,
.story-copy p,
.page-footer { color: #eef1f0; }
.person-head h1,
.story-section h2,
.aside-card h2 {
  color: #fff;
  font-family: var(--heritage-serif);
  font-weight: 400;
}
.fact,
.story-section h2 { border-color: rgba(85,184,212,.32); }
.person-source,
.memorial-links a { color: #bfe6f0; }
.story-copy { max-width: 70ch; }
.story-copy p { line-height: 2; }
.face-gallery img {
  border: 1px solid rgba(248,247,243,.3);
  border-radius: 6px;
}
.page-footer {
  padding-top: 20px;
  border-top: 1px solid rgba(85,184,212,.34);
  font-family: var(--heritage-serif);
}

@media (max-width: 820px) {
  .hero {
    min-height: 630px;
    padding: 44px 20px 48px;
    background:
      linear-gradient(rgba(42,66,110,.84), rgba(43,68,113,.95)),
      url('../img/leaf-bg.webp') 30% center / cover no-repeat;
  }
  .hero-composition {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 34px 8px 32px;
  }
  .hero h1,
  .poem {
    grid-column: 1;
    text-align: center;
  }
  .hero h1 {
    font-size: clamp(3.9rem, 18vw, 5.7rem);
    line-height: .88;
  }
  .poem { font-size: clamp(1.35rem, 6vw, 1.8rem); }
  .hero-rule-bottom { margin-bottom: 26px; }
  .dedication { font-size: 1rem; line-height: 1.9; }
  .index-section {
    background:
      linear-gradient(rgba(45,70,118,.95), rgba(36,59,99,.99)),
      url('../img/leaf-bg.webp') 20% top / auto 760px no-repeat;
  }
  .person-page {
    background:
      linear-gradient(rgba(39,62,104,.94), rgba(48,74,125,.98)),
      url('../img/leaf-bg.webp') 25% top / auto 820px no-repeat;
  }
}

@media (max-width: 480px) {
  .hero { min-height: 600px; }
  .eyebrow { font-size: .82rem; }
  .hero-composition { padding-inline: 0; }
  .hero h1 { font-size: clamp(3.6rem, 20vw, 5rem); }
}

/* =========================================================
   INDIVIDUAL PAGE - editorial refinement (Patch 13)
   Keeps the original blue memorial language, but improves
   hierarchy, readability and balance on personal pages.
   ========================================================= */
.person-page {
  background:
    linear-gradient(90deg, rgba(35,57,96,.92), rgba(48,74,125,.97)),
    url('../img/leaf-bg.webp') 18% top / cover fixed no-repeat;
}

.person-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 12px 24px;
  background: rgba(31,51,86,.94);
  backdrop-filter: blur(10px);
}
.person-topbar-inner { max-width: 1280px; }
.person-brand { font-size: 1.08rem; }
.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(85,184,212,.55);
  opacity: 1;
}
.back-link:hover,
.back-link:focus-visible {
  border-color: #fff;
  outline: none;
}

.person-main {
  max-width: 1280px;
  padding: 34px 28px 78px;
}

.person-intro {
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  padding: 34px 42px 38px;
  background: linear-gradient(135deg, rgba(47,73,123,.76), rgba(35,58,99,.78));
  border: 1px solid rgba(248,247,243,.23);
  border-top: 1px solid rgba(85,184,212,.78);
  border-radius: 10px;
  backdrop-filter: blur(3px);
}

.person-portrait {
  inline-size: 196px;
  block-size: 196px;
  padding: 6px;
  border: 2px solid rgba(248,247,243,.84);
  box-shadow: 0 0 0 1px rgba(85,184,212,.22);
}

.person-head { min-width: 0; }
.person-head .place {
  margin: 0 0 4px;
  color: #dce8eb;
  font-size: .92rem;
  font-weight: 600;
}
.person-head h1 {
  margin: 0 0 9px;
  font-size: clamp(2.65rem, 4.5vw, 4.05rem);
  line-height: 1.02;
  letter-spacing: -.02em;
}
.person-head .service-line {
  margin: 0 0 7px;
  font-size: 1rem;
  color: #f5f7f7;
}
.person-head .role {
  margin: 6px 0 0;
  max-width: 66ch;
  color: #e2eaec;
  font-size: 1rem;
  line-height: 1.65;
}

.facts-panel {
  max-width: none;
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0 26px;
}
.fact {
  min-height: 46px;
  display: flex;
  align-items: center;
  padding: 9px 0;
  border-top: 1px solid rgba(85,184,212,.33);
  color: #edf2f2;
  font-size: .95rem;
  line-height: 1.55;
}

.story-layout {
  grid-template-columns: minmax(0, 820px) minmax(270px, 320px);
  justify-content: center;
  gap: 28px;
  margin-top: 28px;
}
.story-stack { gap: 18px; }

.story-section,
.aside-card {
  background: rgba(36,59,99,.76);
  border: 1px solid rgba(248,247,243,.18);
  border-top-color: rgba(85,184,212,.52);
  border-radius: 9px;
  backdrop-filter: blur(3px);
}
.story-section { padding: 32px 42px 36px; }
.aside-card { padding: 24px 22px; }

.story-section h2,
.aside-card h2 {
  margin: 0 0 20px;
  font-size: 1.75rem;
  line-height: 1.2;
  letter-spacing: -.01em;
}
.story-section h2 {
  padding-bottom: 11px;
  border-bottom: 1px solid rgba(85,184,212,.38);
}

.story-copy {
  max-width: 66ch;
  margin-inline: auto;
}
.story-copy p {
  margin: 0 0 1.2em;
  color: #f2f4f3;
  font-size: 1.065rem;
  line-height: 2;
  text-wrap: pretty;
}
.story-copy p:last-child { margin-bottom: 0; }

.person-aside {
  gap: 16px;
  top: 72px;
}
.aside-summary {
  color: #eef2f2;
  font-family: var(--heritage-sans);
  font-size: 1rem;
  line-height: 1.9;
}

.face-gallery {
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 9px;
}
.face-gallery img {
  border-radius: 7px;
  border-color: rgba(248,247,243,.24);
}

.page-footer {
  max-width: 820px;
  margin: 36px auto 0;
  padding-top: 22px;
  font-size: 1.1rem;
}

@media (max-width: 1050px) {
  .story-layout {
    grid-template-columns: minmax(0, 1fr) 280px;
  }
  .story-section { padding-inline: 32px; }
}

@media (max-width: 820px) {
  .person-topbar { position: static; }
  .person-main { padding: 22px 14px 52px; }
  .person-intro {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 26px 20px 28px;
    text-align: center;
  }
  .person-portrait {
    inline-size: min(188px, 62vw);
    block-size: min(188px, 62vw);
  }
  .person-head h1 { font-size: clamp(2.55rem, 11vw, 3.7rem); }
  .person-head .service-line { justify-content: center; }
  .person-head .role { margin-inline: auto; }
  .facts-panel {
    grid-template-columns: repeat(2, minmax(0,1fr));
    text-align: right;
    gap-inline: 18px;
  }
  .story-layout { grid-template-columns: 1fr; gap: 18px; }
  .person-aside {
    position: static;
    order: -1;
    grid-template-columns: repeat(2, minmax(0,1fr));
  }
  .story-section { padding: 26px 22px 30px; }
  .aside-card { padding: 21px 19px; }
  .story-copy p { font-size: 1.02rem; line-height: 1.9; }
}

@media (max-width: 560px) {
  .person-topbar { padding-inline: 16px; }
  .person-topbar-inner {
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }
  .person-brand { font-size: 1rem; }
  .back-link { font-size: .86rem; }
  .facts-panel { grid-template-columns: 1fr; }
  .person-aside { grid-template-columns: 1fr; }
  .story-section h2,
  .aside-card h2 { font-size: 1.55rem; }
}


/* PATCH 14 - PERSON STORY MEDIA */
.story-subheading {
  max-width: 66ch;
  margin: 2.15rem auto .85rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(85,184,212,.32);
  color: #f8f7f3;
  font-size: 1.32rem;
  line-height: 1.35;
}

.story-copy .story-subheading:first-child {
  margin-top: 0;
}

.video-card {
  overflow: hidden;
}

.memorial-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(248,247,243,.2);
  border-radius: 8px;
  background: #101c31;
  object-fit: contain;
}

@media (max-width: 820px) {
  .video-card {
    grid-column: 1 / -1;
  }
}


/* PATCH 15 - UNIFIED PERSON PAGES */

/* Homepage portrait frame: one geometry for every person. */
.portrait-ring {
  inline-size: var(--portrait-size);
  block-size: var(--portrait-size);
  padding: 5px;
  overflow: hidden;
  border-radius: 50%;
  border: 1px solid rgba(245, 240, 232, .5);
  background: rgba(255,255,255,.035);
  box-shadow: 0 7px 22px rgba(0,0,0,.15);
}
.portrait-ring img,
.portrait-ring .portrait-placeholder {
  inline-size: 100%;
  block-size: 100%;
  border-radius: 50%;
  display: block;
  object-fit: var(--fit, cover);
  object-position: var(--pos, 50% 38%);
}

/* One editorial system for all individual pages. */
.person-main {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
  padding: 30px 0 72px;
}

.person-intro {
  display: grid;
  grid-template-columns: 184px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  padding: 30px 34px 32px;
  border: 1px solid rgba(248,247,243,.2);
  border-top: 1px solid rgba(85,184,212,.72);
  border-radius: 10px;
  background: rgba(42,66,109,.74);
  backdrop-filter: blur(3px);
}

.person-portrait {
  inline-size: 178px;
  block-size: 178px;
  margin: 0;
  padding: 5px;
  overflow: hidden;
  border-radius: 50%;
  border: 1px solid rgba(245,240,232,.55);
  background: rgba(255,255,255,.035);
  box-shadow: 0 8px 24px rgba(0,0,0,.16);
}
.person-portrait img,
.person-portrait .portrait-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: block;
  object-fit: var(--fit, cover);
  object-position: var(--pos, 50% 38%);
}
.person-portrait .portrait-placeholder {
  display: grid;
  place-items: center;
  padding: 14px;
  text-align: center;
  color: #17324a;
  background: #c9d0d1;
  font-size: .85rem;
  line-height: 1.35;
}

.person-head .place {
  margin: 0 0 5px;
  color: #c9d9df;
  font-size: .9rem;
  font-weight: 600;
}
.person-head h1 {
  margin: 0 0 10px;
  font-size: clamp(2.25rem, 4.2vw, 3.45rem);
  line-height: 1.05;
  letter-spacing: -.018em;
}
.person-head .service-line {
  margin: 0 0 6px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: #f5f7f7;
  font-size: .98rem;
  font-weight: 600;
}
.person-head .role {
  max-width: 72ch;
  margin: 5px 0 0;
  color: #dfe8eb;
  font-size: .97rem;
  line-height: 1.65;
}

.facts-panel {
  margin-top: 19px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 28px;
}
.fact {
  min-height: 43px;
  display: flex;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid rgba(85,184,212,.3);
  color: #edf2f2;
  font-size: .94rem;
  line-height: 1.5;
}
.fact-empty { display: none; }

.story-layout {
  display: grid;
  grid-template-columns: minmax(0, 790px) minmax(260px, 300px);
  justify-content: center;
  gap: 24px;
  margin-top: 24px;
  align-items: start;
}

.story-section,
.aside-card {
  border: 1px solid rgba(248,247,243,.17);
  border-top-color: rgba(85,184,212,.5);
  border-radius: 9px;
  background: rgba(36,59,99,.74);
  backdrop-filter: blur(3px);
}

.story-section {
  padding: 31px 40px 36px;
}
.story-section h2,
.aside-card h2 {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1.25;
}
.story-section h2 {
  margin-bottom: 22px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(85,184,212,.34);
}
.story-copy {
  max-width: 64ch;
  margin-inline: auto;
}
.story-copy p {
  margin: 0 0 1.18em;
  color: #f2f4f3;
  font-size: 1.03rem;
  line-height: 1.92;
  text-wrap: pretty;
}
.story-copy p:last-child {
  margin-bottom: 0;
}

.person-aside {
  position: sticky;
  top: 72px;
  display: grid;
  gap: 14px;
}
.aside-card {
  padding: 21px 19px;
}
.aside-card h2 {
  margin-bottom: 15px;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(85,184,212,.28);
}
.aside-summary {
  color: #eef2f2;
  font-size: .96rem;
  line-height: 1.82;
}

.face-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.face-gallery figure {
  margin: 0;
  overflow: hidden;
  border-radius: 7px;
  background: rgba(255,255,255,.04);
}
.face-gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: 50% 35%;
  border: 1px solid rgba(248,247,243,.2);
  border-radius: 7px;
}

.memorial-links {
  display: grid;
  gap: 9px;
}
.memorial-links a {
  display: block;
  padding: 9px 0;
  border-bottom: 1px solid rgba(85,184,212,.23);
  color: #f2f4f3;
  line-height: 1.55;
}
.memorial-links a:last-child {
  border-bottom: 0;
}

.qr-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 14px;
}
.qr-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  display: block;
  padding: 5px;
  border-radius: 7px;
  background: #fff;
}

.video-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 7px;
  background: #101c31;
}
.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.page-footer {
  max-width: 790px;
  margin: 30px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(85,184,212,.25);
  color: #f2f4f3;
  text-align: center;
  font-size: 1rem;
}

@media (max-width: 900px) {
  .story-layout {
    grid-template-columns: minmax(0, 1fr) 250px;
  }
  .story-section {
    padding-inline: 30px;
  }
}

@media (max-width: 760px) {
  .person-main {
    width: min(100% - 24px, 700px);
    padding-top: 20px;
  }
  .person-intro {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 24px 18px 26px;
    text-align: center;
  }
  .person-portrait {
    inline-size: min(176px, 58vw);
    block-size: min(176px, 58vw);
    margin-inline: auto;
  }
  .person-head .service-line {
    justify-content: center;
  }
  .person-head .role {
    margin-inline: auto;
  }
  .facts-panel {
    grid-template-columns: 1fr;
    text-align: right;
  }
  .story-layout {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  .person-aside {
    position: static;
    order: -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .story-section {
    padding: 25px 20px 29px;
  }
}

@media (max-width: 520px) {
  .person-aside {
    grid-template-columns: 1fr;
  }
  .person-head h1 {
    font-size: clamp(2.15rem, 10vw, 3rem);
  }
  .qr-grid {
    grid-template-columns: 1fr 1fr;
  }
}


/* PATCH 17 - OMER YOUTUBE */
.omer-video-section {
  width: min(790px, 100%);
  margin: 24px auto 0;
  padding: 24px;
  border: 1px solid rgba(248,247,243,.17);
  border-top: 1px solid rgba(85,184,212,.55);
  border-radius: 9px;
  background: rgba(36,59,99,.74);
  backdrop-filter: blur(3px);
}

.omer-video-section h2 {
  display: block;
  position: relative;
  z-index: 1;
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(85,184,212,.28);
  color: #fff;
  font-family: var(--heritage-serif, var(--serif));
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.25;
  opacity: 1;
  visibility: visible;
}

.omer-video-section .video-embed {
  width: 100%;
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #101c31;
}

.omer-video-section .video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (max-width: 760px) {
  .omer-video-section {
    padding: 16px;
    margin-top: 16px;
  }
}
