:root {
  --bg: #fbfaf7;
  --tint: #f3f0ea;
  --ink: #1c1b19;
  --muted: #5f5b53;
  --line: #e2ddd3;
  --accent: #b4531f;
  --accent-dark: #8f3f14;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max: 1080px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 1rem/1.65 var(--sans); -webkit-text-size-adjust: 100%; }
img { max-width: 100%; display: block; }
a { color: var(--accent-dark); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.wrap { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }
.skip { position: absolute; left: -999px; background: var(--ink); color: #fff; padding: .5rem 1rem; z-index: 20; }
.skip:focus { left: 1rem; top: 1rem; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0; }
h2 { font-size: clamp(1.5rem, 3vw, 1.9rem); }
h3 { font-size: 1.08rem; }
section { padding: clamp(3rem, 8vw, 5.5rem) 0; }
.tint { background: var(--tint); border-block: 1px solid var(--line); }

/* header */
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(251, 250, 247, .96); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: .65rem; font-family: var(--serif); font-weight: 600; font-size: 1.1rem; color: var(--ink); text-decoration: none; }
.brand-logo { width: 42px; height: 42px; flex: 0 0 42px; object-fit: contain; border-radius: 4px; }
nav { display: flex; gap: 1.5rem; }
nav a { color: var(--muted); text-decoration: none; font-size: .95rem; padding: .25rem 0; border-bottom: 2px solid transparent; }
nav a:hover, nav a.active { color: var(--ink); border-color: var(--accent); }
.menu-btn { display: none; font: inherit; font-size: .95rem; background: none; border: 1px solid var(--line); border-radius: 4px; padding: .35rem .8rem; color: var(--ink); cursor: pointer; }

/* hero */
.hero { padding-block: clamp(2.5rem, 8vw, 5rem); }
.hero-grid { display: grid; grid-template-columns: 1fr 280px; gap: 3rem; align-items: center; }
.eyebrow { margin: 0 0 .75rem; color: var(--accent-dark); font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; }
h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); margin-bottom: 1rem; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 34em; margin: 0 0 1.75rem; }
.portrait { width: 280px; height: 280px; border-radius: 50%; object-fit: cover; border: 6px solid #fff; box-shadow: 0 0 0 1px var(--line); justify-self: end; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.btn { display: inline-block; padding: .7rem 1.2rem; border-radius: 4px; background: var(--accent); color: #fff; text-decoration: none; font-size: .95rem; border: 1px solid var(--accent); }
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn.ghost { background: transparent; color: var(--ink); border-color: #bdb6a8; }
.btn.ghost:hover { background: #fff; color: var(--ink); border-color: var(--ink); }

/* two column blocks */
.two-col { display: grid; grid-template-columns: 200px 1fr; gap: 2rem; align-items: start; }
.prose { max-width: 42rem; }
.prose p { margin: 0 0 1rem; }
address { font-style: normal; margin-bottom: 1rem; }
.contact-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(230px, 1fr); column-gap: 2.5rem; max-width: 46rem; }
.contact-address { margin: 0; padding-right: 2.5rem; border-right: 1px solid var(--line); }
.contact-label { display: block; margin-bottom: .65rem; color: var(--accent-dark); font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.contact-links { display: flex; flex-direction: column; align-items: flex-start; gap: .45rem; }
.contact-links a { color: var(--ink); font-family: var(--serif); font-size: 1.05rem; font-weight: 600; text-decoration-color: var(--line); text-decoration-thickness: 1px; transition: color .2s, text-decoration-color .2s; }
.contact-links a:hover { color: var(--accent-dark); text-decoration-color: var(--accent); }
.contact-note { grid-column: 1 / -1; margin: 1.75rem 0 0; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.facts { margin: 1.75rem 0 0; border-top: 1px solid var(--line); }
.facts div { display: grid; grid-template-columns: 110px 1fr; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); font-size: .9rem; }
.facts dd { margin: 0; }

/* roles */
.cards { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.cards li { background: var(--bg); padding: 1.4rem; }
.cards h3 { margin-bottom: .4rem; }
.cards p { margin: 0; color: var(--muted); font-size: .95rem; }

/* background */
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 2.5rem; margin-top: 2rem; }
.cols h3 { padding-bottom: .6rem; margin-bottom: .9rem; border-bottom: 2px solid var(--accent); }
.plain { list-style: none; margin: 0; padding: 0; }
.plain li { padding: .55rem 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.plain strong { font-weight: 600; }

/* activity */
.head-row { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; }
.filters { display: flex; flex-wrap: wrap; gap: .4rem; }
.filters button { font: inherit; font-size: .9rem; padding: .35rem .9rem; border: 1px solid #bdb6a8; border-radius: 999px; background: transparent; color: var(--ink); cursor: pointer; }
.filters button:hover { border-color: var(--ink); }
.filters button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 170px 1fr; gap: 1.5rem; padding: 1.25rem 0; border-top: 1px solid var(--line); }
.timeline li:last-child { border-bottom: 1px solid var(--line); }
.timeline time { font-size: .9rem; color: var(--accent-dark); font-weight: 600; }
.timeline .place { display: block; color: var(--muted); font-size: .85rem; font-weight: 400; margin-top: .15rem; }
.timeline h3 { margin-bottom: .3rem; }
.timeline p { margin: 0; color: var(--muted); font-size: .95rem; max-width: 46rem; }

/* gallery */
.gallery { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--tint); }
.gallery span { display: block; margin-top: .5rem; font-size: .85rem; color: var(--muted); }
.gallery-summary { max-width: 42rem; margin: 1.25rem 0 0; color: var(--muted); }
.gallery:not(.expanded) li:nth-child(n + 4) { display: none; }
.gallery-more-wrap { display: flex; margin-top: 1.5rem; }
.gallery-more { display: inline-block; padding: .65rem 1.35rem; border: 1px solid var(--accent); border-radius: 4px; background: transparent; color: var(--accent-dark); font: 600 .92rem var(--sans); text-decoration: none; cursor: pointer; transition: background .25s, color .25s, transform .2s; }
.gallery-more:hover { background: var(--accent); color: #fff; transform: translateY(-2px); }
.gallery-more:active { transform: none; }

footer { padding: 1.5rem 0; border-top: 1px solid var(--line); font-size: .9rem; color: var(--muted); }
footer .wrap { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
footer p { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.25rem; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2rem; }
  .portrait { order: -1; justify-self: start; width: 160px; height: 160px; }
  .two-col { grid-template-columns: 1fr; gap: 1rem; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .timeline li { grid-template-columns: 1fr; gap: .4rem; }
}

@media (max-width: 720px) {
  .menu-btn { display: none; }
  nav { display: flex; position: static; flex-direction: row; gap: 0; background: transparent; border: 0; padding: 0; }
  nav a { padding: .4rem .75rem; border: 1px solid var(--line); border-radius: 4px; }
}

@media (max-width: 480px) {
  .gallery { grid-template-columns: 1fr; }
  .facts div { grid-template-columns: 1fr; gap: .1rem; }
  .btn { width: 100%; text-align: center; }
  .contact-card { grid-template-columns: 1fr; gap: 1.5rem; }
  .contact-address { padding: 0 0 1.5rem; border-right: 0; border-bottom: 1px solid var(--line); }
  .contact-note { grid-column: auto; margin-top: .25rem; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

@media print {
  .site-header, .filters, .actions { display: none; }
  section { padding: 1.5rem 0; }
}

/* ---------- motion ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(22px); } }
@keyframes pop { from { opacity: 0; transform: scale(.88); } }
@keyframes fadein { from { opacity: 0; } }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } }
@keyframes ring {
  from { box-shadow: 0 0 0 1px var(--line), 0 0 0 0 rgba(180, 83, 31, .35); }
  to   { box-shadow: 0 0 0 1px var(--line), 0 0 0 22px rgba(180, 83, 31, 0); }
}

/* page load */
.hero-grid > div > * { animation: rise .9s cubic-bezier(.2, .7, .2, 1) backwards; }
.hero-grid > div > :nth-child(2) { animation-delay: .1s; }
.hero-grid > div > :nth-child(3) { animation-delay: .2s; }
.hero-grid > div > :nth-child(4) { animation-delay: .3s; }
.portrait { animation: pop 1s cubic-bezier(.2, .7, .2, 1) .2s backwards, ring 2.4s ease-out 1.2s 2; }

/* scroll reveal (only when JS is running) */
.js [data-reveal] { opacity: 0; }
.js [data-reveal].in { opacity: 1; animation: rise .8s cubic-bezier(.2, .7, .2, 1) calc(var(--i, 0) * 80ms) backwards; }

/* header */
.site-header { transition: box-shadow .3s; }
.site-header.scrolled { box-shadow: 0 2px 16px rgba(28, 27, 25, .08); }

@media (min-width: 721px) {
  nav a { border-bottom: 0; background: linear-gradient(var(--accent), var(--accent)) left bottom / 0 2px no-repeat; transition: background-size .3s ease, color .2s; }
  nav a:hover, nav a.active { background-size: 100% 2px; }
}
@media (max-width: 720px) { nav.open { animation: drop .25s ease-out; } }

/* headings get an underline that draws in */
section h2 { position: relative; padding-bottom: .7rem; }
section h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 40px; height: 2px; background: var(--accent); transform-origin: left; transition: transform .8s cubic-bezier(.2, .7, .2, 1) .25s; }
.js section h2:not(.in)::after { transform: scaleX(0); }

/* buttons */
.btn { transition: background .25s, border-color .25s, color .25s, transform .2s; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: none; }
.btn:not(.ghost)::after { content: "\2193"; display: inline-block; margin-left: .5rem; transition: transform .25s; }
.btn:not(.ghost):hover::after { transform: translateY(3px); }

/* cards */
.cards li { position: relative; transition: background .3s; }
.cards li::before { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .45s cubic-bezier(.2, .7, .2, 1); }
.cards li:hover { background: #fff; }
.cards li:hover::before { transform: scaleX(1); }

/* timeline */
.timeline li { position: relative; transition: background .3s; }
.timeline li::before { content: ""; position: absolute; left: -1rem; top: 0; bottom: 0; width: 3px; background: var(--accent); transform: scaleY(0); transform-origin: top; transition: transform .35s ease; }
.timeline li:hover { background: rgba(255, 255, 255, .55); }
.timeline li:hover::before { transform: scaleY(1); }
.filters button { transition: background .2s, color .2s, border-color .2s; }

/* gallery and lightbox */
.gallery .ph { position: relative; display: block; width: 100%; padding: 0; border: 0; background: var(--tint); overflow: hidden; cursor: zoom-in; }
.gallery .ph img { transition: transform .8s cubic-bezier(.2, .7, .2, 1); }
.gallery .ph:hover img, .gallery .ph:focus-visible img { transform: scale(1.06); }
.gallery .ph::after { content: "View"; position: absolute; right: .6rem; bottom: .6rem; padding: .2rem .7rem; border-radius: 99px; background: rgba(255, 255, 255, .94); color: var(--ink); font: .75rem var(--sans); opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .3s; }
.gallery .ph:hover::after, .gallery .ph:focus-visible::after { opacity: 1; transform: none; }

.lightbox { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; background: rgba(20, 18, 15, .93); opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox figure { margin: 0; max-width: min(92vw, 1000px); transform: scale(.96); transition: transform .35s cubic-bezier(.2, .7, .2, 1); }
.lightbox.open figure { transform: none; }
.lightbox img { max-height: 76vh; width: auto; margin: 0 auto; }
.lightbox img.fade { animation: fadein .4s; }
.lightbox figcaption { margin-top: .8rem; text-align: center; color: #e9e5dc; font-size: .9rem; }
.lb-btn { position: absolute; padding: .5rem 1rem; background: none; border: 0; color: #fff; font-size: 2.4rem; line-height: 1; opacity: .7; cursor: pointer; transition: opacity .2s; }
.lb-btn:hover { opacity: 1; }
.lb-close { top: .75rem; right: .75rem; }
.lb-prev, .lb-next { top: 50%; translate: 0 -50%; }
.lb-prev { left: .5rem; }
.lb-next { right: .5rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js [data-reveal] { opacity: 1; }
  .js section h2:not(.in)::after { transform: none; }
}
@media print { .js [data-reveal] { opacity: 1; } .lightbox { display: none; } }
