:root {
  --navy:    #1c2b4a;
  --navy-dk: #141f36;
  --gold:    #9d7c2e;
  --gold-lt: #c4a44e;
  --cream:   #f7f4f0;
  --white:   #ffffff;
  --text:    #1e1e1e;
  --muted:   #5c5c5c;
  --border:  #d9d0c4;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.0625rem;
  line-height: 1.78;
  color: var(--text);
  background: var(--cream);
}

a { color: var(--navy); }
a:hover { color: var(--gold); }

/* ── Site header ─────────────────────────────────────────────────── */
.site-header {
  background: var(--navy);
  padding: 1.75rem 1.5rem;
}
.site-header .inner { max-width: 1100px; margin: 0 auto; }
.site-header a { text-decoration: none; }
.site-title {
  font-size: 1.25rem;
  font-weight: normal;
  color: var(--gold-lt);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 0.25rem;
  display: block;
}
.site-subtitle {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.5);
  margin: 0;
}

/* ── Top nav bar ─────────────────────────────────────────────────── */
.top-nav {
  background: var(--navy-dk);
  border-bottom: 2px solid var(--gold);
  padding: 0.625rem 1.5rem;
}
.top-nav .inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.35);
}
.top-nav a {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  padding: 0.125rem 0.5rem;
  border-radius: 2px;
}
.top-nav a:hover { color: var(--gold-lt); background: rgba(255,255,255,0.06); }

/* ── Page wrapper ────────────────────────────────────────────────── */
.page-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 5rem;
}

/* ── Site footer ─────────────────────────────────────────────────── */
.site-footer {
  background: var(--navy-dk);
  color: rgba(255,255,255,0.4);
  font-family: system-ui, sans-serif;
  font-size: 0.8125rem;
  text-align: center;
  padding: 2rem 1.5rem;
  line-height: 1.8;
}
.site-footer a { color: rgba(255,255,255,0.6); }

/* ═══════════════════════════════════════════════════════════════════
   INDEX PAGE
   ═══════════════════════════════════════════════════════════════════ */

.index-intro { max-width: 700px; margin-bottom: 3rem; }
.index-intro h1 {
  font-size: 2.125rem;
  font-weight: normal;
  color: var(--navy);
  margin: 0 0 1.25rem;
  line-height: 1.25;
}
.index-intro p { color: var(--muted); margin-bottom: 0.875rem; }

/* Moses feature */
.moses-feature {
  display: grid;
  grid-template-columns: 260px 1fr;
  background: var(--navy);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 3.5rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.18);
  text-decoration: none;
  transition: box-shadow 0.2s;
}
.moses-feature:hover { box-shadow: 0 8px 32px rgba(0,0,0,0.28); }
.moses-feature img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  display: block;
}
.moses-body {
  padding: 2.25rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.75rem;
}
.moses-label {
  font-family: system-ui, sans-serif;
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-lt);
}
.moses-feature h2 {
  font-size: 2rem;
  font-weight: normal;
  color: #fff;
  margin: 0;
  line-height: 1.2;
}
.moses-feature .f-dates { font-size: 0.9375rem; color: rgba(255,255,255,0.5); }
.moses-feature .f-role  { font-size: 0.9375rem; color: rgba(255,255,255,0.8); }
.moses-feature .f-note {
  font-size: 0.875rem;
  color: var(--gold-lt);
  font-style: italic;
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 0.875rem;
  margin-top: 0.25rem;
}

/* Gallery grid */
.gallery-label {
  font-family: system-ui, sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}
.lawgiver-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 1.25rem;
}
.lawgiver-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 3px;
  overflow: hidden;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.15s, transform 0.15s;
}
.lawgiver-card:hover { box-shadow: 0 4px 18px rgba(0,0,0,0.12); transform: translateY(-2px); }
.lawgiver-card img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  display: block;
  background: #e5e0d8;
}
.card-info {
  padding: 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
}
.card-name { font-size: 0.9375rem; color: var(--navy); font-weight: bold; line-height: 1.3; }
.card-dates { font-family: system-ui, sans-serif; font-size: 0.75rem; color: var(--muted); }
.card-tradition {
  margin-top: auto;
  padding-top: 0.5rem;
  font-family: system-ui, sans-serif;
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ═══════════════════════════════════════════════════════════════════
   INDIVIDUAL LAWGIVER PAGE
   ═══════════════════════════════════════════════════════════════════ */

.page-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: system-ui, sans-serif;
  font-size: 0.8125rem;
  margin-bottom: 2.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}
.page-nav a {
  color: var(--navy);
  text-decoration: none;
  padding: 0.375rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: 2px;
  transition: background 0.15s, color 0.15s;
}
.page-nav a:hover { background: var(--navy); color: #fff; border-color: var(--navy); }
.page-nav .home-btn { color: var(--muted); border-color: transparent; font-size: 0.75rem; letter-spacing: 0.04em; }
.page-nav .home-btn:hover { background: rgba(28,43,74,0.07); color: var(--navy); border-color: transparent; }

/* Hero */
.lawgiver-hero {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 3.5rem;
  margin-bottom: 4rem;
  align-items: start;
}
.hero-img-col { position: sticky; top: 1.5rem; }
.hero-img-col img {
  width: 100%;
  display: block;
  border-radius: 3px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.14);
  background: #e5e0d8;
}
.portrait-credit {
  font-family: system-ui, sans-serif;
  font-size: 0.6875rem;
  color: var(--muted);
  text-align: center;
  margin-top: 0.5rem;
  font-style: italic;
}
.hero-meta { padding-top: 0.25rem; }
.tradition-tag {
  display: inline-block;
  font-family: system-ui, sans-serif;
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.875rem;
}
.hero-meta h1 {
  font-size: 2.5rem;
  font-weight: normal;
  color: var(--navy);
  line-height: 1.15;
  margin: 0 0 0.625rem;
}
.hero-dates { font-size: 1rem; color: var(--muted); margin-bottom: 0.375rem; font-family: system-ui, sans-serif; }
.hero-role {
  font-size: 1.0625rem;
  color: var(--text);
  line-height: 1.55;
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.hero-callout {
  background: rgba(28,43,74,0.05);
  border-left: 3px solid var(--gold);
  padding: 0.875rem 1.125rem;
  font-size: 0.9375rem;
  color: var(--navy);
  line-height: 1.65;
  border-radius: 0 3px 3px 0;
}

/* Content sections */
.content-col { max-width: 720px; }
.content-section { margin-bottom: 2.75rem; }
.section-label {
  font-family: system-ui, sans-serif;
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
  margin-bottom: 1.25rem;
}
.content-section h3 { font-size: 1.0625rem; color: var(--navy); margin: 1.5rem 0 0.625rem; }
.content-section p { margin: 0 0 1rem; }
.content-section ul {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 1.25rem;
}
.content-section li {
  padding: 0.625rem 0 0.625rem 1.25rem;
  border-bottom: 1px solid var(--border);
  line-height: 1.65;
  position: relative;
}
.content-section li:first-child { border-top: 1px solid var(--border); }
.content-section li::before {
  content: '';
  width: 5px; height: 5px;
  background: var(--gold);
  border-radius: 50%;
  position: absolute;
  left: 0; top: 1.05rem;
}

/* Sources */
.sources-section {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.sources-section .section-label { margin-bottom: 0.75rem; }
.sources-section ul { list-style: none; padding: 0; margin: 0; }
.sources-section li {
  font-family: system-ui, sans-serif;
  font-size: 0.875rem;
  color: var(--muted);
  padding: 0.25rem 0;
  border: none;
}
.sources-section li::before { display: none; }
.sources-section a { color: var(--navy); }
.sources-section a:hover { color: var(--gold); }

/* Bottom nav */
.bottom-nav {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--navy);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: system-ui, sans-serif;
  font-size: 0.875rem;
}
.bottom-nav a {
  text-decoration: none;
  padding: 0.5rem 1.125rem;
  color: var(--navy);
  border: 1px solid var(--border);
  border-radius: 2px;
  transition: all 0.15s;
}
.bottom-nav a:hover { background: var(--navy); color: #fff; border-color: var(--navy); }
.bottom-nav .spacer { min-width: 7rem; }

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 800px) {
  .moses-feature { grid-template-columns: 1fr; }
  .moses-feature img { min-height: 200px; max-height: 280px; }
  .lawgiver-hero { grid-template-columns: 1fr; gap: 2rem; }
  .hero-img-col { position: static; max-width: 260px; margin: 0 auto; }
  .hero-meta h1 { font-size: 2rem; }
  .lawgiver-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
@media (max-width: 480px) {
  .page-nav { flex-wrap: wrap; gap: 0.5rem; }
  .bottom-nav { flex-direction: column; gap: 0.75rem; }
  .bottom-nav .spacer { display: none; }
}
