:root {
  --cream: #faf5ee;
  --soft-white: #fdfcfa;
  --warm-pink: #d9b8ad;
  --soft-pink: #eddad1;
  --terracotta: #c27a61;
  --deep-brown: #4d3830;
  --secondary-text: #8c7a6e;
  --warm-gray: #ebe6df;
  --card-shadow: rgba(0, 0, 0, 0.06);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Source Sans 3', -apple-system, sans-serif;
  background: var(--cream);
  color: var(--deep-brown);
  line-height: 1.6;
}

.hero {
  background: linear-gradient(135deg, var(--soft-pink) 0%, var(--warm-pink) 100%);
  padding: 60px 24px 48px;
  text-align: center;
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--deep-brown);
  margin-bottom: 8px;
}

.hero .subtitle {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.1rem;
  color: var(--secondary-text);
}

.hero .divider {
  width: 60px;
  height: 2px;
  background: var(--terracotta);
  margin: 20px auto 0;
  opacity: 0.6;
}

.tabs {
  display: flex;
  justify-content: center;
  gap: 0;
  background: var(--soft-white);
  border-bottom: 1px solid var(--warm-gray);
  position: sticky;
  top: 0;
  z-index: 10;
}

.tab {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--secondary-text);
  background: none;
  border: none;
  padding: 14px 28px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.tab:hover {
  color: var(--terracotta);
}

.tab.active {
  color: var(--terracotta);
  border-bottom-color: var(--terracotta);
}

main {
  max-width: 800px;
  margin: 0 auto;
  padding: 32px 24px;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.biography-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  line-height: 1.9;
  color: var(--deep-brown);
}

.biography-text h2 {
  font-size: 1.5rem;
  margin: 32px 0 16px;
  color: var(--terracotta);
}

.biography-text p {
  margin-bottom: 18px;
}

.timeline {
  position: relative;
  padding-left: 32px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--warm-pink);
  opacity: 0.5;
}

.decade-label {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--deep-brown);
  margin: 28px 0 14px;
  position: relative;
}

.decade-label::before {
  content: '';
  position: absolute;
  left: -28px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--terracotta);
  transform: translateY(-50%);
}

.timeline-card {
  background: var(--soft-white);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: 0 4px 12px var(--card-shadow);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.timeline-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.timeline-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.timeline-card .card-body {
  padding: 16px;
}

.timeline-card .card-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.timeline-card .card-date {
  font-size: 0.85rem;
  color: var(--secondary-text);
}

.timeline-card .card-type {
  display: inline-block;
  font-size: 0.75rem;
  background: var(--soft-pink);
  color: var(--terracotta);
  padding: 2px 10px;
  border-radius: 999px;
  margin-top: 8px;
}

.timeline-card .card-notes {
  font-size: 0.9rem;
  color: var(--secondary-text);
  margin-top: 8px;
  font-style: italic;
}

.collections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.collection-card {
  background: var(--soft-white);
  border-radius: 20px;
  padding: 28px 20px;
  text-align: center;
  box-shadow: 0 4px 12px var(--card-shadow);
  cursor: pointer;
  transition: transform 0.2s;
}

.collection-card:hover {
  transform: translateY(-2px);
}

.collection-card .icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.collection-card .name {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 4px;
}

.collection-card .count {
  font-size: 0.85rem;
  color: var(--secondary-text);
}

.loading {
  text-align: center;
  color: var(--secondary-text);
  font-style: italic;
  padding: 40px 0;
}

footer {
  text-align: center;
  padding: 40px 24px;
  color: var(--secondary-text);
  font-size: 0.85rem;
  font-family: 'Playfair Display', serif;
  font-style: italic;
}

.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 100;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  cursor: pointer;
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: 90%;
  max-height: 80vh;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
}

.lightbox-caption {
  color: white;
  margin-top: 16px;
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  text-align: center;
  max-width: 600px;
}

@media (max-width: 600px) {
  .hero h1 {
    font-size: 1.8rem;
  }
  
  .hero .subtitle {
    font-size: 0.95rem;
  }
  
  .tab {
    padding: 12px 16px;
    font-size: 0.85rem;
  }
  
  .biography-text {
    font-size: 1rem;
  }
  
  .collections-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
