
:root {
  --bg: #faf8f4;
  --bg-alt: #f2ede4;
  --text: #2b2620;
  --accent: #a4632f;
  --accent-2: #7a4b32;
  --muted: #8a8175;
  --card: #ffffff;
  --border: #e6ded2;
  --shadow: 0 1px 3px rgba(43,38,32,.06), 0 8px 24px rgba(43,38,32,.05);
  --maxw: 780px;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #181512;
    --bg-alt: #211d19;
    --text: #eae3d8;
    --accent: #e0a367;
    --accent-2: #d9a679;
    --muted: #a89e8f;
    --card: #221e1a;
    --border: #38312a;
    --shadow: 0 1px 3px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  background-image: radial-gradient(circle at 15% 0%, var(--bg-alt) 0%, var(--bg) 55%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--serif);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
header.site-header {
  text-align: center;
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--card);
}
header.site-header .wordmark {
  font-size: 1rem;
  font-family: var(--sans);
  letter-spacing: .04em;
  color: var(--text);
  opacity: .8;
}
header.site-header nav {
  margin-top: .35rem;
}
header.site-header nav a {
  color: var(--accent-2);
  text-decoration: none;
  margin: 0 .9rem;
  font-family: var(--sans);
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 600;
  padding-bottom: .2rem;
  border-bottom: 1px solid transparent;
  transition: border-color .15s ease, color .15s ease;
}
header.site-header nav a:hover { border-color: var(--accent); color: var(--accent); }

.hero {
  position: relative;
  min-height: 340px;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center 30%;
  color: #fff;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20,15,10,.15) 0%, rgba(20,15,10,.75) 100%);
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 3rem 1.5rem 2.25rem;
  text-align: center;
  width: 100%;
}
.hero-inner .eyebrow {
  font-family: var(--sans);
  font-size: .78rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  opacity: .85;
  margin: 0 0 .6rem;
}
.hero-inner h1 {
  font-size: clamp(1.9rem, 5vw, 2.75rem);
  margin: 0;
  font-weight: 400;
  line-height: 1.25;
  text-shadow: 0 2px 12px rgba(0,0,0,.35);
}
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
}
article {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: clamp(1.5rem, 4vw, 3rem);
  box-shadow: var(--shadow);
}
h1.title {
  font-size: clamp(1.5rem, 3.2vw, 2rem);
  line-height: 1.35;
  margin: 0 0 1.75rem;
  color: var(--accent-2);
  font-weight: 400;
}
article p {
  margin: 0 0 1.15rem;
  font-size: 1.08rem;
}
article figure {
  margin: 2rem 0;
  text-align: center;
}
article img, .gallery-grid img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  display: block;
  margin: 0 auto;
  box-shadow: var(--shadow);
}
figcaption {
  font-family: var(--sans);
  font-size: .85rem;
  color: var(--muted);
  margin-top: .6rem;
  font-style: italic;
}
.pager {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-family: var(--sans);
  font-size: .9rem;
}
.pager a {
  color: var(--accent-2);
  text-decoration: none;
  max-width: 45%;
  padding: .5rem .9rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  transition: background .15s ease, border-color .15s ease;
}
.pager a:hover { background: var(--bg-alt); border-color: var(--accent); }
.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: .9rem;
  counter-reset: toc;
}
.toc-list li { counter-increment: toc; }
.toc-list a {
  display: flex;
  align-items: baseline;
  gap: .8rem;
  height: 100%;
  padding: 1rem 1.15rem;
  color: var(--text);
  text-decoration: none;
  font-size: 1rem;
  line-height: 1.4;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  transition: color .15s ease, transform .15s ease, border-color .15s ease;
}
.toc-list a::before {
  content: counter(toc);
  flex-shrink: 0;
  font-family: var(--sans);
  font-size: .8rem;
  font-weight: 700;
  color: var(--accent);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 1.7rem;
  height: 1.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.toc-list a:hover {
  color: var(--accent-2);
  border-color: var(--accent);
  transform: translateY(-2px);
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}
.gallery-grid a {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .18s ease;
}
.gallery-grid a:hover { transform: translateY(-3px); }
.gallery-grid img {
  border-radius: 0;
  width: 100%;
  height: 160px;
  object-fit: cover;
  box-shadow: none;
  margin: 0;
}
footer.site-footer {
  text-align: center;
  color: var(--muted);
  font-family: var(--sans);
  font-size: .85rem;
  padding: 2.5rem 1rem 3rem;
  letter-spacing: .02em;
}
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(10,8,6,.92);
  align-items: center;
  justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 88vw;
  max-height: 82vh;
  border-radius: 6px;
  box-shadow: 0 10px 40px rgba(0,0,0,.5);
}
.lightbox-caption {
  position: absolute;
  bottom: 1.5rem;
  left: 0;
  right: 0;
  text-align: center;
  color: #f0ebe2;
  font-family: var(--sans);
  font-size: .9rem;
  padding: 0 2rem;
}
.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  font-size: 2rem;
  line-height: 1;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  opacity: .85;
}
.lightbox-close:hover { opacity: 1; }
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  color: #fff;
  font-size: 1.4rem;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease;
}
.lightbox-nav:hover { background: rgba(255,255,255,.2); }
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }
@media (max-width: 640px) {
  .lightbox-nav { width: 2.25rem; height: 2.25rem; font-size: 1.1rem; }
  .lightbox-prev { left: .4rem; }
  .lightbox-next { right: .4rem; }
}
