/* ---- Reset ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ---- Base ---- */

body {
  font-family: 'Lora', Georgia, serif;
  font-size: 18px;
  line-height: 1.8;
  color: #2a2520;
  background-color: #faf8f4;
}

a {
  color: #7a4f1e;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

em {
  font-style: italic;
}

/* ---- Site header ---- */

.site-header {
  background: #1e2a3a;
  border-bottom: 3px solid #c4922a;
}

.site-header-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  position: relative;
}

.site-title {
  display: flex;
  align-items: center;
  padding: 0 2rem 0 0;
  flex-shrink: 0;
}

.site-title a {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #f5f0e8;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.site-title a:hover {
  text-decoration: none;
  color: #c4922a;
}

/* ---- Navigation ---- */

nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
}

nav ul li {
  position: relative;
}

nav ul li > a {
  display: block;
  color: #c8bfaf;
  padding: 1.15rem 1rem;
  font-size: 0.82rem;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

nav ul li > a:hover {
  color: #f5f0e8;
  background: rgba(255,255,255,0.07);
  text-decoration: none;
}

/* Dropdown */
nav ul ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #162030;
  min-width: 260px;
  z-index: 1000;
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
  border-top: 2px solid #c4922a;
}

nav ul li:hover > ul,
nav ul li:focus-within > ul {
  display: block;
}

nav ul ul li > a {
  padding: 0.65rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  text-transform: none;
  color: #b0a898;
}

nav ul ul li > a:hover {
  color: #f5f0e8;
  background: rgba(196,146,42,0.15);
}

nav ul ul li:last-child > a {
  border-bottom: none;
}

/* ---- Mobile hamburger ---- */

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  padding: 1rem 0;
  margin-left: auto;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #c8bfaf;
  transition: background 0.2s;
}

.hamburger:hover span {
  background: #f5f0e8;
}

#nav-toggle {
  display: none;
}

/* ---- Main content ---- */

main {
  max-width: 760px;
  margin: 3rem auto;
  padding: 0 1.5rem 6rem;
}

h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2.2rem;
  font-weight: 400;
  color: #1e2a3a;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #c4922a;
  line-height: 1.3;
}

h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.4rem;
  font-weight: 400;
  font-style: italic;
  color: #1e2a3a;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

h3 {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #7a6a58;
  margin-top: 2rem;
  margin-bottom: 0.6rem;
}

p {
  margin-bottom: 1.3rem;
}

p:last-child {
  margin-bottom: 0;
}

hr {
  border: none;
  border-top: 1px solid #ddd8cf;
  margin: 2.5rem 0;
}

/* ---- Page meta (transcription dates etc.) ---- */

.page-meta {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.82rem;
  color: #9a8c7c;
  margin-bottom: 2.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #e4ddd4;
  letter-spacing: 0.03em;
}

/* ---- Figures / images ---- */

figure {
  margin: 2.25rem 0;
}

figure img {
  max-width: 100%;
  height: auto;
  display: block;
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
}

figcaption {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.8rem;
  color: #9a8c7c;
  margin-top: 0.6rem;
  font-style: italic;
  letter-spacing: 0.02em;
}

.image-row {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin: 2.25rem 0;
}

.image-row figure {
  flex: 1;
  min-width: 160px;
  margin: 0;
}

/* ---- Tape prev/next navigation ---- */

.tape-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid #ddd8cf;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tape-nav a {
  color: #7a4f1e;
  padding: 0.55rem 1.1rem;
  border: 1px solid #c4922a;
  border-radius: 2px;
  transition: background 0.15s, color 0.15s;
}

.tape-nav a:hover {
  background: #1e2a3a;
  color: #f5f0e8;
  border-color: #1e2a3a;
  text-decoration: none;
}

/* ---- Footer ---- */

footer {
  background: #1e2a3a;
  color: #8a9aaa;
  text-align: center;
  padding: 2.5rem 1rem;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

footer nav {
  margin-bottom: 0.75rem;
}

footer nav a {
  color: #c4922a;
  margin: 0 0.75rem;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
}

footer nav a:hover {
  color: #f5f0e8;
  text-decoration: none;
}

footer p {
  margin-bottom: 0;
  color: #5a6a7a;
  font-size: 0.78rem;
}

/* ---- Responsive ---- */

@media (max-width: 680px) {
  body {
    font-size: 17px;
  }

  h1 {
    font-size: 1.75rem;
  }

  .site-header-inner {
    flex-wrap: wrap;
    align-items: center;
  }

  .site-title {
    padding: 0.85rem 0;
  }

  .hamburger {
    display: flex;
  }

  /* Nav hidden by default on mobile */
  nav {
    display: none;
    width: 100%;
    border-top: 1px solid rgba(255,255,255,0.08);
  }

  /* Show nav when checkbox is checked */
  #nav-toggle:checked ~ .site-header .site-header-inner nav {
    display: block;
  }

  nav ul {
    flex-direction: column;
    width: 100%;
  }

  nav ul li > a {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
  }

  nav ul ul {
    position: static;
    display: block;
    box-shadow: none;
    background: rgba(0,0,0,0.2);
    border-top: none;
    min-width: auto;
  }

  nav ul ul li > a {
    padding-left: 2rem;
  }

  .tape-nav {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }
}
