* { box-sizing: border-box; }

body {
  font-family: Georgia, 'Times New Roman', serif;
  margin: 0;
  color: #2b2b2b;
  background: #faf8f4;
  line-height: 1.5;
}

header {
  padding: 2.5rem 1.5rem 1.5rem;
  text-align: center;
}

header h1 {
  margin: 0;
  font-size: 2.2rem;
  letter-spacing: 0.02em;
}

.tagline {
  color: #777;
  margin-top: 0.3rem;
  font-style: italic;
}

.back-link {
  color: #555;
  text-decoration: none;
  font-size: 0.95rem;
}

.back-link:hover { text-decoration: underline; }

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 1.5rem 4rem;
}

/* Gallery grid on index */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.project-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.project-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

.project-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.card-caption {
  padding: 1rem 1.2rem 1.3rem;
}

.card-caption h2 {
  margin: 0 0 0.4rem;
  font-size: 1.2rem;
}

.card-caption p {
  margin: 0;
  font-size: 0.92rem;
  color: #666;
}

/* Project detail page */
#project-detail h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.project-description {
  color: #555;
  max-width: 700px;
  margin-bottom: 2rem;
}

.project-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
}

.project-gallery img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  display: block;
}

footer {
  text-align: center;
  padding: 2rem;
  color: #999;
  font-size: 0.85rem;
}