:root {
  --bg: #ffffff;
  --ink: #1c1b18;
  --muted: #9a9890;
  --rule: rgba(28, 27, 24, 0.1);
}

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Jost', sans-serif;
  font-weight: 300;
  height: 100vh;
  overflow: hidden;
  padding: 0.75rem 2rem 2rem;
}

.container {
  max-width: 1100px;
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Top bar */

.top-bar {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.site-name {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.015em;
}

/* Navigation */

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.nav__btn {
  background: none;
  border: none;
  color: var(--ink);
  font-family: 'Jost', sans-serif;
  font-weight: 300;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  cursor: pointer;
  padding: 0;
  transition: opacity 0.15s;
}

.nav__btn:hover {
  opacity: 0.4;
}

.nav__counter {
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--muted);
}

/* Gallery */

.gallery {
  display: flex;
  gap: 2rem;
  flex: 1;
  min-height: 0;
}

.gallery__image {
  flex: 0 0 auto;
  max-width: 72%;
  height: 100%;
  display: flex;
  align-items: flex-start;
}

.gallery__image img {
  display: block;
  max-height: 100%;
  max-width: 100%;
  width: auto;
  height: auto;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.gallery__image img.loaded {
  opacity: 1;
}

.gallery__card {
  flex: 1;
  min-width: 0;
  padding-top: 0.2rem;
}

/* Card */

.card__title {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.015em;
  margin-bottom: 1.25rem;
}

.card__year {
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Mobile */

@media (max-width: 680px) {
  body {
    height: auto;
    overflow: auto;
    padding: 1.5rem;
  }

  .container {
    height: auto;
  }

  .gallery {
    flex-direction: column;
    flex: none;
    gap: 0;
  }

  .gallery__image {
    max-width: 100%;
    height: auto;
  }

  .gallery__image img {
    width: 100%;
    max-height: none;
    height: auto;
  }

  .gallery__card {
    width: 100%;
    padding-top: 1.75rem;
  }
}
