:root{
  --accent:#96938A;
  --ink:#2e2b27; --muted:#6f6a62; --faint:#938d84;
  --bg:#faf9f7; --card:#fff; --line:#e6e2db;
  --measure:38rem;
}
*{box-sizing:border-box}
html{color-scheme:light}
body{
  margin:0; background:var(--bg); color:var(--ink);
  font-family:'Source Sans Pro',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  font-size:17px; line-height:1.6; -webkit-text-size-adjust:100%;
}
img{max-width:100%; height:auto; display:block}
a{color:#6c665c}
a:hover{color:var(--ink)}

/* header ---------------------------------------------------------------- */
.hero{
  text-align:center; padding:3rem 1rem .4rem;
  background:linear-gradient(#f2f0ec,var(--bg));
}
/* The portrait is 3:4, so it is shown whole rather than cropped to a banner. */
.portrait{
  width:clamp(150px,27vw,196px); height:auto; margin:0 auto 1.7rem;
  border:7px solid #fff; border-radius:2px;
  box-shadow:0 2px 4px rgba(46,43,39,.10), 0 10px 30px rgba(46,43,39,.11);
}
.hero h1{
  font-family:'Source Serif Pro',Georgia,serif; font-weight:400;
  font-size:clamp(2rem,6.2vw,3.1rem); line-height:1.12;
  margin:0 0 .5rem; letter-spacing:.01em;
}
.lifespan{color:var(--muted); font-size:1.02rem}
.lifespan .sep{color:var(--accent); padding:0 .5rem}
.rule{
  width:3.5rem; height:2px; background:var(--accent);
  border:0; margin:1.5rem auto 0; opacity:.6;
}

/* nav ------------------------------------------------------------------- */
nav{
  display:flex; justify-content:center; gap:clamp(.9rem,4vw,2.6rem);
  flex-wrap:wrap; padding:1.4rem 1rem 0; margin-bottom:2.4rem;
  border-bottom:1px solid var(--line);
}
nav a{
  text-decoration:none; color:var(--muted); font-size:.82rem;
  text-transform:uppercase; letter-spacing:.14em;
  padding:0 .15rem .9rem; border-bottom:2px solid transparent; white-space:nowrap;
}
nav a:hover{color:var(--ink)}
nav a[aria-current="page"]{color:var(--ink); border-bottom-color:var(--accent)}

/* layout ---------------------------------------------------------------- */
main{padding:0 1rem 4rem}
.wrap{max-width:var(--measure); margin:0 auto}
.wide{max-width:62rem; margin:0 auto}
.serif{font-family:'Source Serif Pro',Georgia,serif}

h2.section{
  font-family:'Source Serif Pro',Georgia,serif; font-weight:400;
  font-size:1.6rem; margin:0 0 .3rem; text-align:center;
}
.section-note{
  text-align:center; color:var(--faint); font-size:.86rem;
  margin:0 0 2.4rem; letter-spacing:.02em;
}

.headline{
  font-family:'Source Serif Pro',Georgia,serif; font-size:1.2rem;
  line-height:1.6; text-align:center; color:#4a463f; margin:0 0 2.6rem;
}
.obit{font-family:'Source Serif Pro',Georgia,serif; font-size:1.1rem; line-height:1.78}
.obit p{margin:0 0 1.15em}

.donate{
  display:flex; gap:1rem; align-items:center; margin:3rem auto 0;
  padding:1.1rem 1.2rem; background:var(--card);
  border:1px solid var(--line); border-radius:4px; text-decoration:none;
}
.donate:hover{border-color:var(--accent)}
.donate img{width:104px; flex:0 0 104px; height:auto; border-radius:2px}
.donate span{font-size:.97rem; line-height:1.45; color:var(--ink)}
.donate em{display:block; color:var(--faint); font-style:normal; font-size:.82rem; margin-top:.25rem}

.jump{
  display:flex; gap:.8rem; justify-content:center; flex-wrap:wrap;
  margin:3rem 0 0; padding:0; list-style:none;
}
.jump a{
  display:block; text-decoration:none; color:var(--ink);
  border:1px solid var(--line); background:var(--card);
  border-radius:4px; padding:.7rem 1.3rem; font-size:.92rem;
}
.jump a:hover{border-color:var(--accent)}
.jump b{font-weight:600}

/* memories -------------------------------------------------------------- */
.memory{
  background:var(--card); border:1px solid var(--line); border-radius:4px;
  padding:1.5rem clamp(1.1rem,3vw,1.9rem); margin:0 0 1.5rem;
}
.byline{margin-bottom:.9rem}
.byline .who{font-weight:600; font-size:1.02rem}
.byline .meta{color:var(--faint); font-size:.84rem; margin-top:.1rem}
.byline .rel{
  text-transform:uppercase; letter-spacing:.09em; font-size:.72rem;
  color:var(--accent); margin-left:.5rem;
}
.memory .text{font-family:'Source Serif Pro',Georgia,serif; font-size:1.06rem; line-height:1.72}
.memory .text p{margin:0 0 .9em}
.memory .text p:last-child{margin-bottom:0}

.shots{display:grid; gap:.6rem; margin-top:1.2rem}
.shots.n1{grid-template-columns:1fr}
.shots.n2{grid-template-columns:repeat(2,1fr)}
.shots.many{grid-template-columns:repeat(auto-fill,minmax(150px,1fr))}
.shots a{display:block; background:#efece7; border-radius:3px; overflow:hidden}
.shots.n1 a img{max-height:30rem; width:100%; object-fit:contain; background:#efece7}
.shots:not(.n1) a img{aspect-ratio:1/1; object-fit:cover; width:100%}
.shots figure{margin:0}
.shots figcaption{
  font-size:.82rem; color:var(--muted); line-height:1.45; padding:.4rem .1rem 0;
}

.replies{margin:1.3rem 0 0; padding:.2rem 0 0 1rem; border-left:2px solid var(--line)}
.reply{margin-top:.9rem}
.reply:first-child{margin-top:.3rem}
.reply .who{font-weight:600; font-size:.9rem}
.reply .meta{color:var(--faint); font-size:.78rem}
.reply p{margin:.2rem 0 0; font-size:.95rem}

/* photos ---------------------------------------------------------------- */
.gallery{
  display:grid; gap:1rem;
  grid-template-columns:repeat(auto-fill,minmax(min(100%,210px),1fr));
}
.tile{margin:0}
.tile a{display:block; background:#efece7; border-radius:3px; overflow:hidden}
.tile a img{aspect-ratio:1/1; object-fit:cover; width:100%; transition:opacity .15s}
.tile a:hover img{opacity:.88}
.tile figcaption{padding:.45rem .1rem 0; font-size:.83rem; line-height:1.45; color:var(--muted)}
.tile .cap{color:var(--ink); display:block}
.tile .by{color:var(--faint); font-size:.78rem}

/* lightbox -------------------------------------------------------------- */
.lb{
  position:fixed; inset:0; z-index:50; display:none;
  background:rgba(26,24,21,.94); padding:1.5rem;
}
.lb.is-open{
  display:flex; flex-direction:column;
  align-items:center; justify-content:center; gap:1rem;
}
.lb img{max-width:100%; max-height:80vh; width:auto; height:auto}
.lb .cap{
  color:#e8e4dd; text-align:center; font-size:.9rem;
  margin:0; max-width:40rem; line-height:1.5;
}
.lb .cap a{color:#cfc8bd}
.lb .close{
  position:absolute; top:.6rem; right:.9rem; background:none; border:0;
  color:#e8e4dd; font-size:2rem; line-height:1; cursor:pointer; padding:.3rem .6rem;
}

footer{
  border-top:1px solid var(--line); margin-top:3rem; padding:1.8rem 1rem 0;
  text-align:center; color:var(--faint); font-size:.82rem; line-height:1.7;
}

@media (max-width:420px){
  body{font-size:16px}
  .memory{padding:1.2rem 1rem}
}
