:root {
  color-scheme: light;
  --page: #f6f3ed;
  --surface: #ffffff;
  --surface-soft: #fbf9f4;
  --text: #292d34;
  --muted: #63676d;
  --line: #ded8cd;
  --line-strong: #cfc4b1;
  --gold: #806022;
  --gold-light: #ad8b46;
  --gold-wash: #f0e9da;
  --shadow: 0 12px 34px rgb(73 57 29 / 7%);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--page); color: var(--text); color-scheme: light; }
body { margin: 0; min-width: 0; overflow-x: hidden; background: var(--page); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.6; }
body.lightbox-open { overflow: hidden; }
img { max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--gold-light); outline-offset: 4px; border-radius: 5px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; font-weight: 500; line-height: 1.14; letter-spacing: -.018em; }
h1 { margin-bottom: 8px; font-size: clamp(2rem, 4vw, 3.2rem); }
h2 { margin-bottom: 12px; font-size: clamp(1.35rem, 2.2vw, 1.8rem); }
h3 { margin-bottom: 8px; font-size: 1.2rem; }
.muted { color: var(--muted); }
.eyebrow { margin-bottom: 6px; color: var(--gold); font-size: .72rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 20; transform: translateY(-160%); padding: 9px 13px; border: 1px solid var(--gold-light); border-radius: 6px; background: var(--surface); }
.skip-link:focus { transform: none; }

.topbar { position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--line); background: rgb(255 255 255 / 96%); backdrop-filter: blur(14px); }
.head { width: min(1440px, 100%); min-height: 86px; margin: auto; padding: 10px 24px; display: grid; grid-template-columns: 196px minmax(0, 760px) 245px; align-items: center; justify-content: center; gap: 26px; }
.brand { min-width: 190px; display: inline-flex; flex-direction: column; align-items: flex-start; grid-column: 1; }
.brand-logo {
  width: 150px;
  height: auto;
  display: block;
  border: 1px solid var(--gold-light);
  border-radius: 20px;
  box-shadow: 0 6px 18px rgb(73 57 29 / 14%);
}
.brand-note { margin-top: 3px; color: var(--muted); font-size: .67rem; letter-spacing: .045em; }
.topnav { display: flex; align-items: center; justify-content: flex-end; gap: 4px; flex-wrap: wrap; grid-column: 2 / 4; }
.topnav a { padding: 8px 10px; border-radius: 7px; color: #44494f; font-size: .84rem; font-weight: 650; }
.topnav a:hover, .topnav a[aria-current="page"] { background: var(--gold-wash); color: var(--gold); }

.site { width: min(1440px, 100%); margin: 28px auto 0; padding: 0 24px; display: grid; grid-template-columns: 196px minmax(0, 760px) 245px; justify-content: center; align-items: start; gap: 26px; }
.panel, .post-card, .profile-card, .feature-card { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.left-panel { position: sticky; top: 114px; padding: 18px; }
.side-nav { display: grid; gap: 3px; }
.side-nav a { padding: 10px 11px; border-radius: 8px; color: #454a50; font-size: .91rem; font-weight: 650; }
.side-nav a:hover, .side-nav a.active { background: var(--gold-wash); color: var(--gold); }
.quiet-note { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: .75rem; line-height: 1.55; }
.right-panel { position: sticky; top: 114px; display: grid; gap: 16px; }
.side-section { padding: 17px; }
.side-section h2 { font-size: 1.25rem; }
.stats { margin: 0; display: grid; gap: 9px; }
.stats div { padding-top: 9px; display: flex; justify-content: space-between; border-top: 1px solid var(--line); }
.stats dt { color: var(--muted); font-size: .81rem; }
.stats dd { margin: 0; color: var(--gold); font-family: Georgia, serif; font-size: 1.05rem; }
.activity-list, .connection-list { display: grid; gap: 10px; }
.mini-person { display: grid; grid-template-columns: 36px minmax(0, 1fr); align-items: center; gap: 9px; }
.mini-person img { width: 36px; height: 36px; display: block; border: 1px solid var(--gold-light); border-radius: 50%; object-fit: cover; }
.mini-person strong { display: block; overflow: hidden; color: var(--text); font-size: .79rem; text-overflow: ellipsis; white-space: nowrap; }
.mini-person span { display: block; color: var(--muted); font-size: .68rem; }

main { min-width: 0; }
.intro { padding: 4px 2px 18px; }
.intro > p:last-child { margin-bottom: 0; }
.section-heading { margin-bottom: 9px; display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.section-heading h2, .section-heading p { margin-bottom: 0; }
.section-heading > .muted { flex: 0 0 auto; font-size: .75rem; }
.people { max-width: 100%; margin: 0 -4px 30px; padding: 5px 4px 14px; display: flex; gap: 14px; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-color: var(--line-strong) transparent; scroll-snap-type: x proximity; }
.person { min-width: 84px; display: block; scroll-snap-align: start; text-align: center; font-size: .73rem; font-weight: 700; }
.avatar { width: 64px; height: 64px; margin: 0 auto 7px; display: block; border: 2px solid var(--gold-light); border-radius: 50%; background: var(--surface-soft); object-fit: cover; transition: transform .18s ease, box-shadow .18s ease; }
.person:hover .avatar { transform: translateY(-2px); box-shadow: 0 6px 18px rgb(128 96 34 / 18%); }

.stream-heading { margin-top: 2px; }
.post-card { margin-bottom: 18px; padding: 21px; }
.post-header { margin-bottom: 15px; display: flex; align-items: center; gap: 12px; }
.post-header .avatar { width: 46px; height: 46px; margin: 0; flex: 0 0 auto; }
.post-author { min-width: 0; }
.postname { display: block; width: fit-content; color: var(--text); font-size: .94rem; font-weight: 800; }
.postname:hover { color: var(--gold); }
.post-time { margin-top: 1px; color: var(--muted); font-size: .72rem; font-variant-numeric: tabular-nums; line-height: 1.45; }
.post-label { color: var(--muted); font-size: .7rem; }
.post-copy { margin-bottom: 0; color: #34383e; font-family: Georgia, "Times New Roman", serif; font-size: 1.09rem; line-height: 1.65; }
.post-photo { width: 100%; height: auto; aspect-ratio: 16 / 9; margin-top: 17px; display: block; border: 1px solid var(--line); border-radius: 11px; background: #eee8dc; object-fit: cover; }
.post-actions { margin-top: 16px; padding-top: 13px; display: flex; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); color: var(--gold); font-size: .78rem; font-weight: 700; }
.post-actions span { white-space: nowrap; }
.response { margin-top: 12px; padding: 12px; display: grid; grid-template-columns: 31px minmax(0, 1fr); gap: 9px; border-radius: 10px; background: var(--surface-soft); }
.response img { width: 31px; height: 31px; border-radius: 50%; border: 1px solid var(--gold-light); object-fit: cover; }
.response p { margin: 1px 0 0; color: var(--muted); font-size: .76rem; line-height: 1.45; }
.response a { color: var(--text); font-weight: 800; }
.response a:hover { color: var(--gold); }

.profile-card { margin-bottom: 27px; overflow: hidden; }
.cover { width: 100%; aspect-ratio: 8 / 3; display: block; background: #eee8dc; object-fit: cover; }
.profile-body { padding: 0 24px 24px; }
.profile-portrait { width: 102px; height: 102px; margin: -50px 0 12px; position: relative; display: block; border: 4px solid var(--surface); border-radius: 50%; background: var(--surface-soft); box-shadow: 0 0 0 2px var(--gold-light); object-fit: cover; }
.profile-meta { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 16px; }
.profile-meta h2 { margin-bottom: 5px; font-size: 2rem; }
.profile-meta p { margin-bottom: 0; color: var(--muted); }
.back-link { margin-top: 7px; padding: 8px 12px; display: inline-block; border: 1px solid var(--gold-light); border-radius: 8px; color: var(--gold); font-size: .78rem; font-weight: 750; }
.back-link:hover { background: var(--gold-wash); }
.profile-sections { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.profile-sections p:last-child { margin-bottom: 0; }
.memory-gallery { margin-top: 13px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.memory-gallery a:first-child { grid-column: 1 / -1; }
.memory-gallery a { position: relative; overflow: hidden; border-radius: 9px; cursor: zoom-in; }
.memory-gallery a::after { content: "View"; position: absolute; right: 9px; bottom: 9px; padding: 4px 8px; border: 1px solid rgb(255 255 255 / 48%); border-radius: 999px; background: rgb(17 18 20 / 72%); color: #fff; font-size: .65rem; font-weight: 800; letter-spacing: .08em; opacity: 0; transform: translateY(3px); transition: opacity .18s ease, transform .18s ease; }
.memory-gallery a:hover::after, .memory-gallery a:focus-visible::after { opacity: 1; transform: none; }
.memory-gallery img { width: 100%; aspect-ratio: 16 / 9; display: block; border: 1px solid var(--line); border-radius: 9px; background: #eee8dc; object-fit: cover; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.memory-lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgb(10 11 13 / 97%); color: #fff; }
.memory-lightbox::backdrop { background: rgb(10 11 13 / 97%); }
.memory-lightbox[open] { display: grid; place-items: center; }
.lightbox-shell { width: 100%; height: 100%; padding: 66px 24px 52px; display: grid; grid-template-columns: 58px minmax(0, 1fr) 58px; align-items: center; gap: 18px; }
.lightbox-figure { min-width: 0; margin: 0; display: grid; place-items: center; gap: 12px; }
.lightbox-image { max-width: 100%; max-height: calc(100dvh - 142px); display: block; border-radius: 8px; box-shadow: 0 16px 60px rgb(0 0 0 / 46%); object-fit: contain; }
.lightbox-caption { width: min(100%, 1200px); display: flex; justify-content: space-between; gap: 20px; color: #e7e1d6; font-size: .78rem; letter-spacing: .025em; }
.lightbox-close, .lightbox-nav { border: 1px solid rgb(255 255 255 / 38%); background: rgb(255 255 255 / 10%); color: #fff; cursor: pointer; backdrop-filter: blur(8px); transition: background .18s ease, border-color .18s ease, transform .18s ease; }
.lightbox-close:hover, .lightbox-nav:hover { border-color: var(--gold-light); background: rgb(173 139 70 / 32%); }
.lightbox-close { position: absolute; top: 18px; right: 22px; z-index: 2; min-width: 82px; min-height: 38px; padding: 7px 12px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border-radius: 999px; font-size: .76rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.lightbox-close span:first-child { font-size: 1.25rem; font-weight: 400; line-height: 1; }
.lightbox-nav { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; font-family: Georgia, serif; font-size: 2.25rem; line-height: 1; }
.lightbox-nav:active { transform: scale(.94); }
.connections { display: flex; flex-wrap: wrap; gap: 8px; }
.connection-chip { padding: 6px 9px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; color: var(--text); font-size: .74rem; }
.connection-chip:hover { border-color: var(--gold-light); color: var(--gold); }
.connection-chip img { width: 25px; height: 25px; border-radius: 50%; object-fit: cover; }

.feature-grid { margin-top: 34px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.feature-card { padding: 18px; }
.feature-card h2 { font-size: 1.3rem; }
.feature-card p:not(.eyebrow) { color: var(--muted); font-size: .81rem; }
.text-link { color: var(--gold); font-size: .78rem; font-weight: 800; }
.status-pill { padding: 5px 8px; display: inline-block; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--muted); font-size: .69rem; }
.error-card { padding: 22px; border: 1px solid #c8897d; border-radius: 14px; background: #fff8f6; color: #713b32; }

footer { width: min(1440px, 100%); margin: 34px auto 0; padding: 26px 24px 42px; display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: .72rem; }

@media (max-width: 1180px) {
  .head { grid-template-columns: 180px minmax(0, 760px); }
  .topnav { grid-column: 2; }
  .site { grid-template-columns: 180px minmax(0, 760px); }
  .right-panel { display: none; }
}

@media (max-width: 820px) {
  .head { min-height: 74px; padding-inline: 18px; display: flex; }
  .topnav { grid-column: auto; }
  .brand-logo { width: 122px; height: auto; }
  .brand-note { display: none; }
  .topnav a:nth-child(n+4):not(:last-child) { display: none; }
  .site { margin-top: 20px; padding-inline: 16px; display: block; }
  .left-panel { display: none; }
  .feature-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .head { align-items: flex-start; flex-direction: column; gap: 6px; }
  .topnav { width: 100%; justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; }
  .topnav a { padding: 6px 8px; white-space: nowrap; }
  .topnav a:last-child { margin-left: auto; }
  .site { padding-inline: 13px; }
  .people { gap: 9px; }
  .person { min-width: 76px; }
  .avatar { width: 59px; height: 59px; }
  .post-card { padding: 16px; border-radius: 13px; }
  .post-actions { font-size: .7rem; }
  .profile-body { padding: 0 17px 20px; }
  .profile-meta { display: block; }
  .memory-gallery { grid-template-columns: 1fr; }
  .memory-gallery a:first-child { grid-column: auto; }
  .memory-gallery a::after { opacity: 1; transform: none; }
  .lightbox-shell { padding: 62px 9px 88px; display: block; }
  .lightbox-figure { height: 100%; align-content: center; }
  .lightbox-image { max-height: calc(100dvh - 170px); }
  .lightbox-caption { padding-inline: 4px; }
  .lightbox-close { top: 12px; right: 12px; }
  .lightbox-nav { position: absolute; bottom: 18px; width: 48px; height: 48px; }
  .lightbox-previous { left: calc(50% - 62px); }
  .lightbox-next { right: calc(50% - 62px); }
  footer { padding-inline: 16px; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
