:root {
  --background: #b5b5b3;
  --surface: #f8f7f3;
  --text: #242424;
  --muted: #777775;
  --accent: #b56f54;
  --accent-dark: #8f503b;
  --detail: #d7d7d2;
  --border: #d8d7d2;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  padding: 34px 0;
  background: var(--background);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  text-align: center;
}

h1,
h2,
p {
  margin-top: 0;
}

.page-header {
  width: min(92%, 1030px);
  margin: 0 auto;
  padding: 20px 42px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  text-align: left;
}

.page-header h1 {
  margin: 0;
  font-size: 15px;
  font-weight: normal;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.button,
.back-link {
  display: inline-block;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.button {
  padding: 13px 20px;
  border: 1px solid var(--text);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.button:hover,
.button:focus-visible {
  background: var(--text);
  color: var(--surface);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: min(92%, 1030px);
  margin: 0 auto;
  padding: 46px 42px 0;
  background: var(--surface);
}

.gallery img {
  display: block;
  width: 100%;
  height: 240px;
  border: 0;
  border-radius: 0;
  object-fit: cover;
  filter: saturate(0.82);
  transition: filter 220ms ease, opacity 220ms ease;
}

.gallery img:hover {
  filter: saturate(1);
  opacity: 0.9;
}

.year {
  width: min(92%, 1030px);
  margin: 0 auto;
  padding: 28px 42px 12px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.16em;
}

body > main {
  width: min(92%, 1030px);
  margin: 0 auto;
  padding-bottom: 42px;
  background: var(--surface);
}

body > main > .button:last-child {
  margin-bottom: 0;
}

.index-page,
.profile-page {
  padding-bottom: 48px;
}

.index-header {
  width: min(92%, 1030px);
  margin: 0 auto;
  padding: 20px 42px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  color: var(--text);
  text-align: left;
}

.index-header h1 {
  margin: 0;
  font-size: 15px;
  font-weight: normal;
  letter-spacing: 0.12em;
}

.index-list {
  display: grid;
  gap: 0;
  width: min(92%, 1030px);
  margin: 0 auto;
  padding: 46px 42px 34px;
  background: var(--surface);
  list-style: none;
  font-family: Georgia, serif;
  font-size: 21px;
  line-height: 1.25;
}

.index-list a {
  color: var(--text);
  text-decoration: none;
  transition: color 160ms ease;
}

.index-list li {
  padding: 17px 0;
  border-bottom: 1px solid var(--border);
}

.index-list a:hover,
.back-link:hover {
  color: var(--accent-dark);
}

.back-link {
  display: inline-block;
  font-size: 13px;
  font-weight: bold;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-content {
  width: min(92%, 1030px);
  min-height: 680px;
  padding: 56px 42px 48px;
  background: var(--surface);
  margin: 0 auto;
}

.profile-content h1 {
  margin: 0 0 42px;
  font-size: 26px;
  font-weight: normal;
  font-family: Georgia, serif;
}

.profile-image {
  display: block;
  width: min(100%, 300px);
  height: 300px;
  margin: 0 auto;
  border: 1px solid var(--text);
  background: var(--detail);
  object-fit: cover;
}

.profile-info {
  margin: 42px 0 12px;
  color: var(--muted);
  font-family: Georgia, serif;
  font-size: 21px;
}

.profile-number {
  margin-bottom: 30px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.08em;
}

@media (max-width: 700px) {
  .gallery {
    grid-template-columns: 1fr;
    width: min(86%, 420px);
    padding: 28px 20px 0;
  }

  .gallery img {
    height: 210px;
  }

  .page-header,
  .index-header {
    padding: 18px 22px;
  }

  .year {
    padding: 24px 20px 10px;
  }

  body > main,
  .index-list,
  .profile-content {
    width: 92%;
  }

  .profile-content {
    padding: 40px 22px 36px;
  }

  .index-list {
    font-size: 19px;
  }

  .profile-content h1 {
    font-size: 22px;
  }
}
