* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Georgia, 'Times New Roman', serif;
  background: #f7f3ed;
  color: #222;
}

header {
  max-width: 900px;
  margin: 0 auto;
  padding: 64px 24px 32px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  color: #666;
}

h1 {
  font-size: clamp(2.2rem, 6vw, 4.8rem);
  line-height: 0.95;
  margin: 0 0 24px;
}

.intro {
  max-width: 680px;
  font-size: 1.1rem;
  line-height: 1.6;
}

.intro a,
.intro a:visited {
  color: #4E95D9;
}

.intro a:hover,
.intro a:active {
  color: #4E95D9;
}

.intro a:active {
  color: #4E95D9;
  text-decoration: none;
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 48px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 32px;
}

.filter-button {
  border: 1px solid #222;
  background: transparent;
  padding: 9px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
}

.filter-button.active,
.filter-button:hover {
  background: #222;
  color: #f7f3ed;
}

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

.card {
  border: 1px solid #ddd0bf;
  background: #fffaf3;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.08);
}

.card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  background: #ddd0bf;
}

.card-content { padding: 16px; }

.card h2 {
  margin: 0 0 6px;
  font-size: 1.25rem;
}

.card p {
  margin: 0;
  color: #555;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tag {
  font-size: 0.78rem;
  border: 1px solid #ddd0bf;
  border-radius: 999px;
  padding: 4px 8px;
}

dialog {
  width: min(920px, 92vw);
  border: none;
  padding: 0;
  background: #fffaf3;
  box-shadow: 0 20px 70px rgba(0,0,0,0.25);
}

dialog::backdrop { background: rgba(0,0,0,0.45); }

.close-button {
  position: absolute;
  top: 10px;
  right: 14px;
  border: none;
  background: transparent;
  font-size: 2rem;
  cursor: pointer;
  z-index: 2;
}

.modal-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.modal-content img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #ddd0bf;
}

.modal-text { padding: 42px 32px; }

.participant {
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
}

blockquote {
  margin: 24px 0;
  font-size: 1.25rem;
  line-height: 1.45;
  border-left: 3px solid #222;
  padding-left: 16px;
}

footer {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
  color: #666;
  font-size: 0.9rem;
}

@media (max-width: 720px) {
  .modal-content { grid-template-columns: 1fr; }
  .modal-content img { max-height: 360px; }
}

.diary-quote-button {
  margin-top: 22px;
  border: 1px solid #222;
  background: #222;
  color: #f7f3ed;
  padding: 11px 16px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.95rem;
  cursor: pointer;
}

.diary-quote-button:hover {
  background: transparent;
  color: #222;
}

.diary-quote-button[hidden] {
  display: none;
}

.diary-quote-modal {
  width: min(500px, 80vw);
  max-height: 80vh;
  border: none;
  padding: 0;
  background: #fffaf3;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.25);
}

.diary-quote-modal::backdrop {
  background: rgba(0, 0, 0, 0.6);
}

.diary-quote-content {
  padding: 38px;
}

.diary-quote-content h2 {
  margin-top: 6px;
  margin-bottom: 24px;
}

.diary-quote-content img {
  display: block;
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
  background: #eee5d8;
}

.section-heading {
  margin-bottom: 24px;
}

.section-heading h2 {
  margin: 6px 0 12px;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}

.section-intro {
  max-width: 680px;
  color: #555;
  line-height: 1.6;
}

.additional-section {
  margin-top: 80px;
  padding-top: 48px;
  border-top: 1px solid #cfc2b2;
}

.additional-section[hidden] {
  display: none;
}
