:root {
  --ink: #1b1f2a;
  --muted: #5b6170;
  --navy: #141d3e;
  --accent: #a3262a;
  --paper: #fbfaf7;
  --paper-alt: #f2efe8;
  --rule: #ddd8cc;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --header-h: 60px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.7 var(--serif);
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: var(--navy);
  text-underline-offset: 3px;
}
a:hover {
  color: var(--accent);
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 100;
}
.skip:focus {
  left: 1rem;
  top: 0.5rem;
}

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}
.prose {
  max-width: 780px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--navy);
  color: #fff;
}
.bar {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  font: 600 1.15rem/1 var(--serif);
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
}
.brand:hover {
  color: #fff;
}
.nav {
  display: flex;
  gap: 22px;
}
.nav a {
  font: 500 0.78rem/1 var(--sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.nav a:hover,
.nav a[aria-current] {
  color: #fff;
  border-bottom-color: var(--accent);
}
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 10px;
  cursor: pointer;
}
.burger,
.burger::before,
.burger::after {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  position: relative;
  transition: transform 0.2s;
}
.burger::before,
.burger::after {
  content: "";
  position: absolute;
  left: 0;
}
.burger::before {
  top: -7px;
}
.burger::after {
  top: 7px;
}
.nav-toggle[aria-expanded="true"] .burger {
  background: transparent;
}
.nav-toggle[aria-expanded="true"] .burger::before {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .burger::after {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 1080px) {
  .nav-toggle {
    display: block;
  }
  .nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--navy);
    padding: 8px 24px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }
  .nav.open {
    display: flex;
  }
  .nav a {
    padding: 14px 0;
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
  .nav a[aria-current] {
    border-bottom-color: rgba(255, 255, 255, 0.08);
    color: #fff;
  }
}

/* Hero */
.hero {
  position: relative;
  background: var(--navy);
}
.hero-bg img {
  width: 100%;
  height: clamp(320px, 42vw, 560px);
  object-fit: cover;
  object-position: 70% 30%;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(10, 14, 30, 0.85) 0%,
    rgba(10, 14, 30, 0.25) 45%,
    rgba(10, 14, 30, 0) 70%
  );
  pointer-events: none;
}
.hero-card {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 36px;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  gap: 24px;
  color: #fff;
  max-width: 1240px;
}
.portrait {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
}
.hero h1 {
  margin: 0 0 6px;
  font: 600 clamp(2rem, 4.5vw, 3.25rem)/1.1 var(--serif);
  letter-spacing: -0.01em;
}
.role {
  margin: 0;
  font: 400 clamp(0.95rem, 1.6vw, 1.15rem)/1.45 var(--sans);
  color: rgba(255, 255, 255, 0.88);
  max-width: 46ch;
}

@media (max-width: 760px) {
  .hero-bg img {
    height: 420px;
    object-position: 75% 20%;
  }
  .hero-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    bottom: 24px;
  }
  .portrait {
    width: 96px;
    height: 96px;
  }
}

/* Sections */
.section {
  padding: clamp(56px, 8vw, 96px) 0;
}
.section.alt {
  background: var(--paper-alt);
}
h2 {
  margin: 0 0 32px;
  font: 600 clamp(1.7rem, 3vw, 2.25rem)/1.15 var(--serif);
  color: var(--navy);
}
h2::after {
  content: "";
  display: block;
  width: 48px;
  height: 3px;
  background: var(--accent);
  margin-top: 14px;
}
h3 {
  margin: 40px 0 12px;
  font: 600 0.8rem/1.3 var(--sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
h2 + h3,
.lead + h3 {
  margin-top: 0;
}
p {
  margin: 0 0 1.15em;
}
.prose p {
  hyphens: auto;
}
.prose > p:not(.lead):not(.note) {
  text-align: left;
}
.lead {
  font-size: 1.15rem;
  color: var(--ink);
}
.note {
  margin-top: 28px;
  font-size: 0.95rem;
  color: var(--muted);
  font-style: italic;
}
.note em,
.note cite {
  font-style: normal;
}

.items,
.biblio {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
}
.items > li,
.biblio > li {
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
}
.items > li:first-child,
.biblio > li:first-child {
  border-top: 1px solid var(--rule);
}
.biblio {
  counter-reset: b;
}
.biblio > li {
  position: relative;
  padding-left: 2.6em;
  counter-increment: b;
}
.biblio > li::before {
  content: counter(b, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 16px;
  font: 500 0.8rem/1.4 var(--sans);
  color: var(--accent);
}
cite {
  font-style: italic;
  font-weight: 600;
}
.sub {
  margin: 10px 0 0;
  padding-left: 1.2em;
  columns: 2;
  column-gap: 32px;
}
.sub li {
  break-inside: avoid;
  padding: 2px 0;
}
@media (max-width: 560px) {
  .sub {
    columns: 1;
  }
}

/* Contact */
.contact {
  background: var(--navy);
  color: #fff;
}
.contact h2 {
  color: #fff;
}
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  max-width: 780px;
}
.contact-card {
  display: block;
  padding: 22px 24px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  text-decoration: none;
  transition:
    background 0.2s,
    border-color 0.2s;
}
.contact-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
}
.contact-card .label {
  display: block;
  font: 500 0.75rem/1 var(--sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 10px;
}
.contact-card .value {
  font: 400 1.1rem/1.3 var(--serif);
  overflow-wrap: anywhere;
}
.social {
  list-style: none;
  padding: 0;
  margin: 32px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
}
.social a {
  font: 500 0.9rem/1 var(--sans);
  color: rgba(255, 255, 255, 0.85);
}
.social a:hover {
  color: #fff;
}

/* Footer */
.site-footer {
  background: #0d1430;
  color: rgba(255, 255, 255, 0.6);
  font: 400 0.85rem/1.5 var(--sans);
  padding: 22px 0;
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.site-footer p {
  margin: 0;
}
.to-top {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
}
.to-top:hover {
  color: #fff;
}
.wrap a {
  text-decoration: none;
  cursor: pointer;
  color: var(--rule);
}

@media print {
  .site-header,
  .hero-bg,
  .to-top,
  .skip {
    display: none;
  }
  .hero {
    background: none;
  }
  .hero::after {
    display: none;
  }
  .hero-card {
    position: static;
    color: #000;
  }
  .role {
    color: #333;
  }
  .contact {
    background: none;
    color: #000;
  }
  .contact h2,
  .contact-card,
  .social a {
    color: #000;
  }
}

/* Memorial */
.dates {
  margin: 0 0 8px;
  font: 500 0.85rem/1.3 var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
}
.contact-intro {
  max-width: 640px;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 32px;
}
.msg-form {
  max-width: 780px;
  display: grid;
  gap: 18px;
}
.msg-form .row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}
.msg-form label {
  display: grid;
  gap: 8px;
  font: 500 0.8rem/1.3 var(--sans);
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.75);
}
.msg-form .opt {
  font-weight: 400;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0;
}
.msg-form input,
.msg-form textarea {
  width: 100%;
  padding: 12px 14px;
  font: 400 1rem/1.5 var(--serif);
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 0;
}
.msg-form input:focus,
.msg-form textarea:focus {
  outline: none;
  border-color: #fff;
  background: rgba(255, 255, 255, 0.1);
}
.msg-form textarea {
  resize: vertical;
  min-height: 140px;
}
.msg-form button {
  justify-self: start;
  padding: 13px 28px;
  font: 600 0.85rem/1 var(--sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--navy);
  background: #fff;
  border: 0;
  cursor: pointer;
}
.msg-form button:hover {
  background: #e9e6df;
}
.msg-form button:disabled {
  opacity: 0.6;
  cursor: default;
}
.form-status {
  margin: 0;
  min-height: 1.5em;
  font: 400 0.95rem/1.5 var(--sans);
  color: rgba(255, 255, 255, 0.85);
}
.msg-form input.sr {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
}

.hidden {
  display: none;
}
