* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  background: #202020;
  color: #e8e8e8;
  font-family: Georgia, "Times New Roman", serif;
}

body {
  min-height: 100vh;
}

a {
  color: #f0f0f0;
  text-decoration: none;
}

a:hover {
  color: #ffffff;
}

.layout {
  display: grid;
  grid-template-columns: 315px minmax(0, 1fr);
  min-height: 100vh;
  gap: 3px;
  padding: 12px;
}

.sidebar {
  background: #3d3d3d;
  border: 1px solid #174b63;
  padding: 14px 14px 20px;
  position: sticky;
  top: 12px;
  height: calc(100vh - 24px);
  overflow-y: auto;
}

.brand {
  font-size: 26px;
  margin-bottom: 26px;
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar nav > a,
.year-link {
  display: block;
  font-size: 21px;
  line-height: 1.15;
  padding: 3px 8px;
  border: 1px solid transparent;
}

.sidebar nav > a:hover,
.year-link:hover,
.year-link.active {
  background: #4a4a4a;
  border-color: #888;
}

.menu-title {
  font-size: 21px;
  margin: 0 0 3px 8px;
}

.menu-divider {
  height: 1px;
  background: #656565;
  margin: 10px 0;
}

.content {
  background: #202020;
  border: 1px solid #174b63;
  min-width: 0;
  padding: 16px;
}

.content-header {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin: 0 0 16px 4px;
}

.content-header h1 {
  margin: 0;
  font-size: 29px;
  font-weight: normal;
}

.page-info {
  color: #a7a7a7;
  font-size: 16px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}

.card {
  background: #2a2a2a;
  border: 1px solid #174b63;
  overflow: hidden;
}

.card-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

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

.card .meta {
  padding: 8px 10px 10px;
}

.card .title {
  font-size: 18px;
}

.card .sub {
  margin-top: 3px;
  color: #9c9c9c;
  font-size: 14px;
}

.empty {
  color: #999;
  font-size: 18px;
  padding: 30px 10px;
}

.media-box {
  padding: 10px;
}

.media-box video,
.media-box audio {
  display: block;
  width: 100%;
}

.lightbox {
  width: min(95vw, 1400px);
  height: min(92vh, 1000px);
  padding: 0;
  border: 1px solid #555;
  background: rgba(20, 20, 20, 0.98);
  color: white;
}

.lightbox::backdrop {
  background: rgba(0, 0, 0, 0.82);
}

.lightbox-body {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 46px 70px 35px;
}

.lightbox img {
  max-width: 100%;
  max-height: calc(100% - 35px);
  object-fit: contain;
}

.caption {
  margin-top: 10px;
  color: #c0c0c0;
  text-align: center;
}

.close,
.nav {
  position: absolute;
  z-index: 3;
  border: 0;
  background: transparent;
  color: white;
  cursor: pointer;
}

.close {
  top: 4px;
  right: 12px;
  font-size: 38px;
}

.nav {
  top: 50%;
  transform: translateY(-50%);
  font-size: 58px;
  width: 54px;
}

.prev {
  left: 6px;
}

.next {
  right: 6px;
}

@media (max-width: 760px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lightbox-body {
    padding: 46px 40px 35px;
  }
}

@media (max-width: 480px) {
  .gallery {
    grid-template-columns: 1fr;
  }
}
