/* updates */

:root {
  /* Winter Day palette: schemecolor.com/winter-day.php */
  --color-bg: #3e5138;   
  --color-headlines: #ffcf85;
  --color-text: #e2dfdc;     /* Memphis */
  --color-muted: rgba(226, 223, 220, 0.65);
  --color-accent: #ffffff;
  --color-accent-visited: #ffffff;
  --color-accent-soft: #79a4b1;  /* Country Blue, for decorative underline */
  --color-accent-hover: #79a4b1;  /* Country Blue */
  --color-border: rgba(226, 223, 220, 0.25);
  --font-display: 'Winky Sans', var(--font-body);
  --font-body: 'Source Serif 4', Georgia, 'Times New Roman', serif;
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.65;
  padding-top: clamp(2.4rem, 6vw, 5rem);
  padding-bottom: clamp(4rem, 10vw, 8rem);
  padding-left: 1vw;
  padding-right: clamp(2rem, 7vw, 9rem);
}

body p,
body form,
body li {
  max-width: 640px;
  font-size: clamp(1.6rem, 2.1rem, 3.0rem);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--color-headlines);
  letter-spacing: -0.01em;
}

h1 {
  font-weight: 400;
  font-size: clamp(3.2rem, 6vw, 4.8rem);
}

h2 {
  font-weight: 500;
  font-size: clamp(2.4rem, 5.2vw, 3.2rem);
}

h3 {
  font-weight: 500;
  font-size: clamp(2rem, 3.5vw, 2.6rem);
}

h5, h6 {
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-muted);
}

a {
  color: var(--color-accent);
  text-decoration: underline;
  text-decoration-color: var(--color-accent-soft);
  text-underline-offset: 0.15em;
}

a:visited {
  color: var(--color-accent-visited);
}

a:hover, a:focus {
  color: var(--color-accent-hover);
  text-decoration-color: currentColor;
}

img, video {
  max-width: 90vw;
  height: auto;
  border-radius: 4px;
}

p img, video {
  max-width: 90vw;
}

#content img {
  cursor: zoom-in;
}

/* Lightbox
   –––––––––––––––––––––––––––––––––––––––––––––––––– */

.lightbox-open {
  overflow: hidden;
}

.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(2rem, 6vw, 5rem);
  background: rgba(15, 19, 13, 0.92);
  animation: lightbox-fade-in 0.15s ease-out;
  overflow-y: auto;
}

.lightbox-overlay[hidden] {
  display: none;
}

.lightbox-frame {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 100%;
  max-height: 100%;
}

.lightbox-img {
  display: block;
  max-width: 100%;
  max-height: 80vh;
  width: auto;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
  margin: 1.2rem 0 0;
  max-width: 70ch;
  font-family: var(--font-body);
  font-style: italic;
  font-size: 1.4rem;
  color: var(--color-muted);
  text-align: center;
}

.lightbox-caption[hidden] {
  display: none;
}

.lightbox-close,
.lightbox-nav {
  position: fixed;
  z-index: 1;
  background: transparent;
  border: none;
  color: var(--color-text);
  cursor: pointer;
  line-height: 1;
}

.lightbox-close {
  top: clamp(1rem, 3vw, 2rem);
  right: clamp(1rem, 3vw, 2rem);
  font-size: 3.2rem;
  padding: 0.4rem 1rem;
}

.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  font-size: 4rem;
  padding: 1rem 1.6rem;
}

.lightbox-prev {
  left: clamp(0.5rem, 2vw, 2rem);
}

.lightbox-next {
  right: clamp(0.5rem, 2vw, 2rem);
}

.lightbox-close:hover,
.lightbox-close:focus,
.lightbox-nav:hover,
.lightbox-nav:focus {
  color: var(--color-accent-hover);
}

.lightbox-counter {
  position: fixed;
  bottom: clamp(1rem, 3vw, 2rem);
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.3rem;
  color: var(--color-muted);
  letter-spacing: 0.04em;
}

@keyframes lightbox-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .lightbox-overlay {
    animation: none;
  }
}

@media (max-width: 480px) {
  .lightbox-nav {
    font-size: 3rem;
    padding: 0.8rem 1rem;
  }

  .lightbox-close {
    font-size: 2.6rem;
  }
}

table {
  display: block;
  overflow-x: auto;
  max-width: 100%;
  border-collapse: collapse;
  -webkit-overflow-scrolling: touch;
}

th, td {
  padding: 0.8rem 1.2rem;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
  white-space: nowrap;
}

blockquote {
  border-left-color: var(--color-border);
  color: var(--color-muted);
  font-family: var(--font-display);
  font-style: italic;
}

#content, #footer, #nav h4 {
  max-width: 90vw;
  margin-left: auto;
  margin-right: auto;
}

#nav {
  max-width: 960px;
  margin: 0 auto 2rem;
}

#nav h4 {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
}

#nav a {
  color: var(--color-muted);
  text-decoration: none;
  display: inline-block;
  padding: 0.6rem 0;
}

#nav a:hover {
  color: var(--color-accent);
}

#footer {
  font-size: 1.3rem;
  color: var(--color-muted);
}

#footer hr {
  border-top: 0.1rem solid var(--color-border);
  margin-top: 6rem;
}

@media (max-width: 480px) {
  body p, body form, body li {
    max-width: 100%;
  }

  th, td {
    font-size: 1.3rem;
    padding: 0.6rem 0.8rem;
    white-space: normal;
  }
}
