/* paulpedersen.org — warm restoration palette
   Migrated 2026-05-22. Original 2008 site preserved at ../html/ */

:root {
  --bg: #2a2f3e;
  --bg-soft: rgba(255, 255, 255, 0.04);
  --bg-card: rgba(255, 255, 255, 0.05);
  --text: #e8e4d8;
  --text-muted: #a8a497;
  --text-faint: #7a7568;
  --accent: #d4a574;
  --accent-soft: rgba(212, 165, 116, 0.25);
  --link: #f0c896;
  --link-hover: #ffd9aa;
  --hr: rgba(232, 228, 216, 0.12);
  --serif: 'Source Serif Pro', 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, sans-serif;
}

@import url('https://fonts.googleapis.com/css2?family=Source+Serif+Pro:ital,wght@0,400;0,600;1,400&family=Inter:wght@400;500;600&display=swap');

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  background: var(--bg) !important;
  color: var(--text);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.7;
  margin: 0;
  padding: 60px 24px 80px;
  max-width: 720px;
  margin: 0 auto;
}

/* Type */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.005em;
  line-height: 1.25;
}
h1 { font-size: 2.4em; margin: 0 0 0.25em; font-weight: 400; letter-spacing: -0.01em; }
h2 { font-size: 1.6em; margin: 1.6em 0 0.5em; }
h3 { font-size: 1.05em; font-weight: 400; font-style: italic; color: var(--text-muted); margin: 0 0 0.4em; letter-spacing: 0.02em; }
h4 { font-size: 0.95em; color: var(--text-muted); font-weight: 400; margin: 0.4em 0; font-style: italic; }

p { margin: 1em 0; }

a {
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-soft);
  transition: color 0.15s ease, border-color 0.15s ease;
}
a:hover { color: var(--link-hover); border-bottom-color: var(--link-hover); }
a:visited { color: var(--link); }

hr {
  border: 0;
  border-top: 1px solid var(--hr);
  margin: 2.4em 0;
  background: none;
}

img { max-width: 100%; height: auto; border: 0; }

/* === Override deprecated presentational HTML in legacy snapshot files === */
body[bgcolor], body[link], body[alink], body[vlink] {
  background: var(--bg) !important;
  color: var(--text) !important;
}
font, font[color], font[size], font[face] {
  color: inherit !important;
  background-color: transparent !important;
  font-family: inherit !important;
  font-size: inherit !important;
}
tt, tt b { font-family: var(--serif) !important; font-weight: normal !important; }
table { border-collapse: collapse; max-width: 100%; }
table[bgcolor], td[bgcolor] { background: transparent !important; }
center { text-align: left; }

/* Hero portrait — Paul Soaring Over Waves */
img[src*="Paul-Soaring"] {
  display: block;
  width: 180px !important;
  height: 180px !important;
  float: none !important;
  margin: 0 auto 1.5em;
  border-radius: 50%;
  border: 2px solid var(--accent);
  object-fit: cover;
}

/* Paul and Cat photo */
img[src*="Paul-and-Cat"] {
  float: none !important;
  display: block;
  margin: 2em auto;
  max-width: 360px;
  width: auto !important;
  height: auto !important;
  border-radius: 6px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

/* === Guestbook entries === */
/* The legacy pattern is <P><B>Name: </B>... <BR><B>E-mail:</B>... <HR width=300> */
p b:first-child {
  font-family: var(--sans);
  font-size: 0.72em;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
/* Card styling — only for paragraphs that LOOK like guestbook entries
   (legacy easy_php_guestbook output: <P><B>Name: </B>...).
   :has() is supported in all modern browsers (Chrome 105+, Firefox 121+, Safari 15.4+). */
.guestbook-entry,
p:has(> b:first-child) {
  padding: 1.4em 1.6em;
  margin: 1.5em 0;
  background: var(--bg-card);
  border-left: 2px solid var(--accent);
  border-radius: 4px;
}
/* The legacy guestbook script terminates entries with <HR width=300> inside the <P> */
p > hr[width="300"], p hr[width="300"] { display: none; }

/* Frozen guestbook notice (set by our migration) */
div[style*="background:rgba(255,255,255,0.05)"] {
  background: rgba(212, 165, 116, 0.08) !important;
  border: 1px solid var(--accent-soft) !important;
  font-family: var(--sans) !important;
  font-size: 0.95em;
  color: var(--text-muted) !important;
  border-radius: 6px !important;
  padding: 1.5em 2em !important;
}

/* Navigation (legacy `-=|=-` separator pattern) — make compact */
.legacy-nav {
  font-family: var(--sans);
  font-size: 0.95em;
  text-align: center;
  margin: 1.5em 0 2em;
  padding-bottom: 1.2em;
  border-bottom: 1px solid var(--hr);
}
.legacy-nav a {
  display: inline-block;
  padding: 0.3em 0.6em;
  border-bottom: none;
}
.legacy-nav a:hover { color: var(--link-hover); }
.legacy-nav .sep {
  color: var(--text-faint);
  font-size: 0.85em;
  margin: 0 0.2em;
}

/* === Header (new clean markup for index.html) === */
.memorial-header {
  text-align: center;
  margin-bottom: 2.5em;
}
.memorial-header h1 { margin-top: 0.6em; font-size: 2.4em; }
.memorial-header .dedication { font-style: italic; color: var(--text-muted); font-size: 1.05em; margin: 0; }
.memorial-header .dates {
  font-family: var(--sans);
  letter-spacing: 0.1em;
  font-size: 0.9em;
  color: var(--text-muted);
  margin-top: 0.4em;
}

/* Bio text — legacy <tt><b><font size="+1"> ... </font></b></tt> chains */
.bio {
  font-size: 1.02em;
  line-height: 1.75;
}

/* Footer */
.footer {
  margin-top: 4em;
  padding-top: 1.5em;
  border-top: 1px solid var(--hr);
  text-align: center;
  font-family: var(--sans);
  font-size: 0.85em;
  color: var(--text-faint);
  font-style: normal;
}
.footer a { color: var(--text-muted); }

/* Reform WISHA "Updated" callout */
.update-note {
  text-align: center;
  font-size: 0.9em;
  font-style: italic;
  color: var(--text-muted);
  margin: 0 0 1.5em;
}

/* Responsive */
@media (max-width: 640px) {
  body { padding: 40px 18px 60px; font-size: 16px; }
  h1, .memorial-header h1 { font-size: 1.8em; }
  body p { padding: 1.1em 1.2em; }
  img[src*="Paul-Soaring"] { width: 140px !important; height: 140px !important; }
  img[src*="Paul-and-Cat"] { max-width: 100%; }
}

/* Print */
@media print {
  body { background: white; color: black; max-width: none; }
  a { color: black; border-bottom: none; }
}

/* === Advocacy-page specific === */
.advocacy h1 { font-size: 2.2em; margin-bottom: 0.2em; }
.advocacy .subtitle { font-style: italic; color: var(--text-muted); margin: 0 0 2em; font-size: 1.05em; }
.advocacy h2 {
  font-size: 1.3em;
  margin-top: 2.4em;
  margin-bottom: 0.6em;
  color: var(--text);
  letter-spacing: 0;
  font-weight: 600;
}
.advocacy h2::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--accent);
  margin-right: 12px;
  vertical-align: middle;
}
.advocacy .data-card {
  background: var(--bg-card);
  border-left: 3px solid var(--accent);
  padding: 1.2em 1.5em;
  margin: 1.5em 0;
  border-radius: 4px;
}
.advocacy .data-card .stat {
  font-size: 1.6em;
  font-weight: 600;
  color: var(--accent);
  display: block;
  line-height: 1.1;
  margin-bottom: 0.3em;
  font-family: var(--serif);
}
.advocacy .data-card .stat-label {
  font-family: var(--sans);
  font-size: 0.85em;
  color: var(--text-muted);
}
.advocacy ul.actions {
  list-style: none;
  padding: 0;
  margin: 1em 0;
}
.advocacy ul.actions li {
  padding: 1em 1.3em;
  margin: 0.8em 0;
  background: var(--bg-soft);
  border-radius: 4px;
  border-left: 2px solid var(--accent-soft);
}
.advocacy ul.actions li strong {
  display: block;
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.95em;
  font-weight: 600;
  margin-bottom: 0.3em;
  letter-spacing: 0.02em;
}
.advocacy .sources {
  margin-top: 4em;
  padding-top: 1.5em;
  border-top: 1px solid var(--hr);
  font-size: 0.85em;
  color: var(--text-muted);
  font-family: var(--sans);
}
.advocacy .sources h3 {
  font-family: var(--sans);
  font-size: 0.85em;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-style: normal;
  margin-bottom: 0.6em;
}
.advocacy .sources ol {
  padding-left: 1.5em;
  margin: 0;
}
.advocacy .sources li {
  margin: 0.4em 0;
  line-height: 1.5;
}
.advocacy .sources a {
  word-break: break-word;
  font-size: 0.95em;
}

/* === YouTube / video embed container (responsive 16:9) === */
.video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  margin: 2em 0 0.5em;
  background: var(--bg-soft);
  border-radius: 6px;
}
.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-caption {
  font-style: italic;
  font-size: 0.9em;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.5em;
  margin-bottom: 2em;
}
.video-caption a { color: var(--text-muted); }

/* === Photo gallery — responsive thumbnail grid + lightbox === */
.gallery-intro {
  font-style: italic;
  color: var(--text-muted);
  margin-bottom: 2em;
  text-align: center;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin: 2em 0;
}
.gallery-grid button {
  padding: 0;
  border: 0;
  background: var(--bg-card);
  cursor: pointer;
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.gallery-grid button:hover,
.gallery-grid button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Lightbox overlay */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  flex-direction: column;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 92vw;
  max-height: 82vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}
.lightbox .lb-counter {
  color: var(--text-muted);
  font-family: var(--sans);
  font-size: 0.9em;
  margin-top: 1em;
  letter-spacing: 0.05em;
}
.lightbox button.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(232, 228, 216, 0.1);
  color: var(--text);
  border: 1px solid rgba(232, 228, 216, 0.2);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: 1.5em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.lightbox button.lb-nav:hover { background: rgba(232, 228, 216, 0.2); }
.lightbox button.lb-prev { left: 20px; }
.lightbox button.lb-next { right: 20px; }
.lightbox button.lb-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: transparent;
  color: var(--text);
  border: 0;
  font-size: 2em;
  cursor: pointer;
  width: 40px;
  height: 40px;
  line-height: 1;
}
@media (max-width: 640px) {
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
  .lightbox button.lb-nav { width: 40px; height: 40px; font-size: 1.2em; }
  .lightbox button.lb-prev { left: 8px; }
  .lightbox button.lb-next { right: 8px; }
}

/* Gallery album sections */
.album-heading {
  font-size: 1.2em;
  margin: 2em 0 0.5em;
  color: var(--text);
  border-bottom: 1px solid var(--hr);
  padding-bottom: 0.4em;
}
.album-count {
  font-family: var(--sans);
  font-size: 0.7em;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 0.6em;
}
