:root {
  --ink: #2b2620;
  --paper: #faf6ef;
  --accent: #a8562f;
  --accent-dark: #7c3f21;
  --line: #e4dccb;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
}

.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
  flex-wrap: wrap;
  gap: 12px;
}

.brand {
  font-size: 1.3rem;
  font-weight: bold;
  color: var(--accent-dark);
  text-decoration: none;
}

.site-header nav a {
  margin-left: 20px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
}

.site-header nav a:hover,
.site-header nav a:focus {
  color: var(--accent);
  text-decoration: underline;
}

.hero {
  background: linear-gradient(180deg, #fff, var(--paper));
  padding: 60px 0;
  text-align: center;
  border-bottom: 1px solid var(--line);
}

.hero h1 {
  font-size: 2.4rem;
  margin: 0 0 12px;
  color: var(--accent-dark);
}

.hero p {
  font-size: 1.1rem;
  color: #55483a;
  max-width: 560px;
  margin: 0 auto;
}

main {
  padding: 48px 24px 64px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 56px;
}

.card {
  display: block;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px;
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card:hover,
.card:focus {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}

.card h2 {
  margin: 0 0 8px;
  color: var(--accent-dark);
  font-size: 1.2rem;
}

.card p {
  margin: 0;
  font-size: 0.95rem;
  color: #5a4d3d;
}

.recent h2 {
  color: var(--accent-dark);
  font-size: 1.3rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.muted {
  color: #8a7d6c;
  font-style: italic;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 24px 0;
  text-align: center;
  color: #8a7d6c;
  font-size: 0.9rem;
}

/* Family tree */
.tree {
  padding: 8px 0 40px;
}

.tree ul {
  list-style: none;
  padding-left: 24px;
  position: relative;
}

.tree > ul {
  padding-left: 0;
}

.tree li {
  position: relative;
  padding: 6px 0 6px 20px;
  border-left: 2px solid var(--line);
  margin-left: 4px;
}

.tree li:last-child {
  border-left: 2px solid transparent;
}

.tree li::before {
  content: "";
  position: absolute;
  left: -2px;
  top: 18px;
  width: 18px;
  height: 2px;
  background: var(--line);
}

.tree .person {
  display: inline-block;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 12px;
}

/* Photo gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
  padding: 8px 0 40px;
}

.gallery .placeholder {
  aspect-ratio: 4 / 3;
  background: #efe6d6;
  border: 1px dashed var(--line);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a2917a;
  font-size: 0.85rem;
  text-align: center;
  padding: 8px;
}
