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

:root {
  --bg: #fffff7;
  --ink: #101010;
  --ink-muted: rgba(16, 16, 16, 0.4);
  --gap: 20px;
  --pad: 20px;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Satoshi', system-ui, sans-serif;
  font-weight: 900;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── HEADER ── */
header {
  position: relative;
  padding: 40px var(--pad) 0;
  flex-shrink: 0;
}

.years {
  display: flex;
  gap: 24px;
  font-size: 20px;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 16px;
}

.muted {
  color: var(--ink-muted);
}

.months {
  display: flex;
  gap: 24px;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
  cursor: grab;
}

.months.dragging {
  cursor: grabbing;
}

.months::-webkit-scrollbar {
  display: none;
}

.months li {
  font-size: 40px;
  letter-spacing: -0.03em;
  line-height: 48px;
  text-transform: uppercase;
  color: var(--ink-muted);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

.months li.active {
  color: var(--ink);
}

.logo {
  position: absolute;
  top: 40px;
  right: var(--pad);
  width: 70px;
  height: 66px;
}

.logo svg {
  width: 100%;
  height: 100%;
}

/* ── GALLERY ── */
.gallery {
  flex: 1;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  min-height: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10vw;
  /* matches Matija's site — 200px on 1920 */
  padding: 10px var(--pad);
  cursor: grab;
}

.gallery.dragging {
  cursor: grabbing;
}

.gallery::-webkit-scrollbar {
  display: none;
}


/* equal width per photo; height follows its natural aspect ratio so
   nothing gets cropped. --photo-scale / --custom-width let a single
   photo (or pair) override the default width from the admin. */
.gallery-item {
  width: var(--custom-width, calc(min(28vw, 50vh) * var(--photo-scale, 1)));
  flex-shrink: 0;
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  -webkit-user-drag: none;
  user-select: none;
}

/* Two images stacked vertically, sharing the same width as a single item */
.gallery-pair {
  width: var(--custom-width, calc(min(28vw, 50vh) * var(--photo-scale, 1)));
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

.gallery-pair .gallery-item {
  width: 100%;
}

/* ── FOOTER ── */
footer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 9px var(--pad);
  font-size: 14px;
  letter-spacing: -0.03em;
  line-height: 14px;
}

.meta {
  display: flex;
  gap: 6px;
}

footer .instagram {
  margin-left: auto;
}

footer a {
  color: var(--ink);
  text-decoration: none;
}

footer a:hover {
  opacity: 0.6;
}

/* ── MOBILE ── */
@media (max-width: 768px) {
  body {
    height: auto;
    overflow-x: hidden;
    overflow-y: auto;
  }

  header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--bg);
    padding: 24px 0 18px;
  }

  .years {
    font-size: 20px;
    margin-top: 8px;
    margin-bottom: 12px;
    padding: 0 var(--pad);
  }

  .months {
    gap: 16px;
    padding: 0 var(--pad);
    cursor: auto;
  }

  .months li {
    font-size: 24px;
    line-height: 30px;
  }

  .logo {
    top: 24px;
    width: 43px;
    height: 40px;
  }

  .gallery {
    overflow: visible;
    height: auto;
    flex-direction: column;
    padding: 0 var(--pad);
    gap: 24px;
    cursor: auto;
  }

  .gallery-item {
    width: 100%;
  }

  .gallery-pair {
    width: 100%;
    flex-direction: column;
    gap: 24px;
  }

  .gallery-pair .gallery-item {
    width: 100%;
  }

  footer {
    position: static;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: nowrap;
    gap: 0;
    font-size: 12px;
    letter-spacing: -0.03em;
    line-height: 12px;
    padding: 24px var(--pad) 26px;
  }

  footer .meta {
    flex-direction: column;
    gap: 4px;
  }

  footer .instagram {
    margin-left: 0;
    align-self: flex-end;
  }
}
