:root {
  --ink: #454248;
  --muted: #706b72;
  --paper: #fffdf9;
  --panel: #ffffff;
  --red: #b32f36;
  --red-dark: #842229;
  --gold-pale: #fff3c9;
  --line: #ddd6ce;
  --shadow: 0 12px 32px rgba(55, 42, 38, 0.10);
}

* {
  box-sizing: border-box;
}

html {
  background: #eee9e3;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(228, 186, 85, 0.15), transparent 30rem),
    var(--paper);
  font: 17px/1.65 Georgia, "Times New Roman", serif;
}

a {
  color: var(--red-dark);
  text-underline-offset: 0.16em;
}

a:hover,
a:focus-visible {
  color: var(--red);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 10;
  padding: 0.6rem 0.9rem;
  background: white;
}

.site-header {
  border-top: 5px solid var(--red);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 249, 0.96);
}

.site-header-inner,
main,
footer {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 1rem 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.93rem;
}

.site-header nav a {
  padding: 0.55rem 0.75rem;
  color: var(--muted);
  border-radius: 999px;
  text-decoration: none;
}

.site-header nav a:hover,
.site-header nav a:focus-visible,
.site-header nav a.selected {
  color: white;
  background: var(--red);
}

main {
  min-height: 70vh;
  padding: 1.5rem 0 3.5rem;
}

.archive-notice {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.45rem 1rem;
  margin: 0 0 2rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid #e5c774;
  border-radius: 0.65rem;
  background: var(--gold-pale);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.88rem;
  line-height: 1.45;
}

.archive-notice strong {
  color: var(--red-dark);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

h1,
h2,
h3,
h4 {
  color: #343036;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.2;
}

h1 {
  font-size: clamp(1.8rem, 4vw, 2.7rem);
}

h4 {
  margin-top: 2rem;
  color: var(--red-dark);
  font-size: 1.1rem;
  letter-spacing: 0.035em;
}

.legacy-body > .body,
.gallery-intro,
.artwork {
  padding: clamp(1rem, 3vw, 2.4rem);
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.legacy-body p,
.legacy-body li {
  max-width: 78ch;
}

.legacy-body center > p,
.gallery-intro center > p {
  max-width: none;
  margin: -0.25rem 0 1.5rem;
  padding: 0.7rem 1rem;
  border-radius: 0.4rem;
  background: var(--gold-pale) !important;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.95rem;
}

.legacy-body img,
.artwork img {
  max-width: 100%;
  height: auto;
}

#mainImage {
  display: block;
  width: 100%;
  margin: 0 auto 1.5rem;
  border-radius: 0.5rem;
}

#bookImage,
#donateImage,
#saveTheChildren > img {
  display: block;
  margin: 1rem auto 2rem;
}

.row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(0, 3fr);
  gap: 1.5rem;
  align-items: start;
}

.bio {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
}

.bio:last-child {
  border-bottom: 0;
}

.bio img {
  display: block;
  width: 100%;
}

.videoFrame {
  display: inline-block;
  width: min(100%, 500px);
  margin: 0 1rem 1.5rem 0;
  vertical-align: top;
}

.videoFrame iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border: 0;
}

#endVideoFrames {
  clear: both;
}

.gallery-intro {
  margin-bottom: 1.5rem;
  text-align: center;
}

.flags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 1.2rem;
}

.flags img.flagIcon {
  width: auto;
  height: 22px;
  padding: 0;
  border: 1px solid rgba(0, 0, 0, 0.12);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.gallery-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: var(--panel);
  box-shadow: 0 5px 18px rgba(55, 42, 38, 0.08);
}

.gallery-card > a {
  display: block;
  color: inherit;
  text-decoration: none;
}

.gallery-card > a:hover h2,
.gallery-card > a:focus-visible h2 {
  color: var(--red);
}

.gallery-card > a > img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: contain;
  background: #f4f0eb;
}

.gallery-card h2 {
  margin: 0;
  padding: 0.8rem 0.85rem 0.3rem;
  font-size: 1rem;
}

.gallery-card .caption {
  padding: 0 0.85rem 1rem;
  color: var(--muted);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.78rem;
  line-height: 1.45;
}

.gallery-card .caption img,
.artwork-caption img {
  width: 12px;
  height: 12px;
  margin-left: 0.2rem;
}

.artwork {
  text-align: center;
}

.artwork-nav {
  display: flex;
  justify-content: center;
  gap: 0.7rem;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.9rem;
}

.artwork-image {
  display: block;
  max-height: 75vh;
  margin: 1.5rem auto;
  object-fit: contain;
}

.artwork-caption,
.artwork-description {
  max-width: 760px;
  margin: 1rem auto 0;
}

.artwork-description img {
  display: block;
  max-height: 75vh;
  margin: 1.5rem auto;
  object-fit: contain;
}

footer {
  padding: 1.5rem 0 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.82rem;
}

@media (max-width: 880px) {
  .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 650px) {
  body {
    font-size: 16px;
  }

  .archive-notice,
  .row {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-card > a > img {
    height: 190px;
  }
}

@media (max-width: 420px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}
