*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: #fff;
  color: #666;
  font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
/* Read by screen readers and search engines, not shown */
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Sidebar: fixed on the left, like the original */
.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 300px;
  padding: 25px 25px 40px;
  overflow-y: auto;
  z-index: 6;
}
.logo {
  display: inline-block;
  font-family: "EB Garamond", Garamond, Georgia, serif;
  font-weight: 400; font-size: 30px; line-height: 1;
  color: #000;
}
.menu { list-style: none; margin: 32px 0 0; padding: 0; }
.menu > li > a {
  display: block;
  color: #000;
  font-size: 13px; font-weight: 500;
  line-height: 22px;
  text-transform: uppercase;
}
.menu > li > a:hover { color: #b8860b; }
.menu .small { margin-top: 26px; }
.menu .small + .small { margin-top: 2px; }
.menu .small > a { font-size: 10px; line-height: 16px; color: #000; }
.menu .social { margin-top: 14px; }
.menu .social > a { display: inline-block; color: #000; line-height: 0; vertical-align: middle; }
.menu .social > a + a { margin-left: 12px; }
.menu .social > a:hover { color: #b8860b; }
.about a { color: #000; border-bottom: 1px solid #000; }
.about a:hover { color: #b8860b; border-color: #b8860b; }

.menu-toggle, .menu-button { display: none; }

/* Photos: columns on the right */
main { margin-left: 325px; padding: 50px 60px 80px 0; }
.gallery { display: flex; flex-direction: column; gap: 10px; }
/* Grid like the original: a new column for every ~500px of width, each photo at its own shape, placed in the shortest column */
.gallery.masonry { display: grid; grid-auto-rows: 1px; gap: 0 10px; align-items: start; }
figure { margin: 0; }
[data-gallery] figure { cursor: pointer; }
picture, img { display: block; width: 100%; height: auto; }
img { background: #f5f5f5; }
/* Discourage saving photos: no drag-to-desktop, no long-press save menu on phones */
[data-gallery] img, .viewer img { -webkit-user-drag: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }

/* Photo viewer: one photo at a time, click left for previous, right for next */
.viewer {
  display: none;
  position: fixed; top: 0; right: 0; bottom: 0; left: 325px;
  padding: 50px 60px 50px 0;
  background: #fff;
  z-index: 5;
  align-items: center; justify-content: center;
}
body.viewing { overflow: hidden; }
body.viewing .viewer { display: flex; }
.viewer img {
  width: auto; height: auto;
  max-width: 100%; max-height: 100%;
  object-fit: contain;
  background: none;
}
/* Same as the original: left 40% goes back, right 40% goes forward, middle 20% returns to the grid */
.viewer-zone { position: absolute; top: 0; bottom: 0; }
.viewer-zone.prev { left: 0; width: 40%; cursor: w-resize; }
.viewer-zone.grid { left: 40%; width: 20%; cursor: n-resize; }
.viewer-zone.next { right: 0; width: 40%; cursor: e-resize; }
.viewer img + img { display: none; }
/* Diptych: the pair side by side */
.viewer.pair { gap: 10px; }
.viewer.pair img { max-width: calc(50% - 5px); }
.viewer.pair img + img { display: block; }
.viewer-close { display: none; }

/* In the sidebar while a photo is open, like the original */
.viewer-nav {
  display: none;
  position: absolute; left: 25px; bottom: 40px;
  font-size: 11px; font-weight: 500; letter-spacing: 0.04em; line-height: 2.4;
  text-transform: uppercase; color: #222;
}
body.viewing .viewer-nav { display: block; }
.viewer-nav button {
  font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit;
  background: none; border: 0; padding: 0; cursor: pointer;
}
.viewer-nav button:hover { color: #b8860b; }
.viewer-nav .thumbs { display: block; color: #666; }

/* About page */
.about {
  max-width: 560px;
  font-size: 14px; line-height: 1.8; color: #333;
}
.about h1 { font-size: 13px; font-weight: 500; text-transform: uppercase; color: #000; margin: 0 0 20px; }
.about p { margin: 0 0 14px; }

/* Films page: recent Letterboxd diary, posters in a grid */
.films { max-width: 1100px; }
.films h1 { font-size: 13px; font-weight: 500; text-transform: uppercase; color: #000; margin: 0 0 24px; }
/* 12 films: 4 across on a laptop, 6 on a big screen, 2 on a phone, so rows always come out even */
.film-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px 18px; }
@media (min-width: 1700px) { .film-grid { grid-template-columns: repeat(6, 1fr); } }
.film a { display: block; color: #000; }
.film img { display: block; width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; background: #f2f2f2; }
.film a:hover img { opacity: .85; }
.film-title { margin-top: 10px; font-size: 12px; font-weight: 500; line-height: 1.4; color: #000; }
.film-title span { color: #888; font-weight: 400; }
.film-meta { font-size: 12px; color: #666; letter-spacing: .06em; margin-top: 2px; }
.films-more { margin-top: 36px; font-size: 12px; }
.films-more a { color: #000; border-bottom: 1px solid #000; }
.films-more a:hover { color: #b8860b; border-color: #b8860b; }

/* Phones: logo and Menu across the top, black menu overlay */
@media (max-width: 800px) {
  .sidebar {
    position: static; width: auto; height: auto;
    padding: 20px; overflow: visible;
    display: flex; justify-content: space-between; align-items: flex-start;
  }
  .logo { font-size: 22px; }
  .menu-button {
    display: block;
    cursor: pointer;
    color: #000; font-size: 15px; font-weight: 500;
    padding-top: 8px;
  }
  .menu {
    display: none;
    position: fixed; inset: 0;
    margin: 0; padding: 70px 24px 40px;
    background: #000;
    overflow-y: auto;
    z-index: 10;
  }
  .menu > li > a, .menu .small > a {
    color: rgba(255,255,255,.75);
    font-size: 18px; line-height: 52px;
    text-align: center;
  }
  .menu > li.active > a { color: #fff; }
  .menu .small { margin-top: 0; }
  .menu .social { margin-top: 16px; text-align: center; }
  .menu .social > a { color: rgba(255,255,255,.75); }
  .menu .social svg { width: 22px; height: 22px; }
  .menu .social > a + a svg { width: 40px; }
  .menu .social > a + a { margin-left: 22px; }
  .film-grid { grid-template-columns: repeat(2, 1fr); gap: 24px 14px; }
  .menu-toggle:checked ~ .menu { display: block; }
  .menu-toggle:checked ~ .menu-button { position: fixed; top: 20px; right: 20px; z-index: 11; color: #fff; }
  .menu-toggle:checked ~ .menu-button .open, .menu-button .close { display: none; }
  .menu-toggle:checked ~ .menu-button .close { display: inline; }

  main { margin: 0; padding: 40px 20px 60px; }
  .gallery { gap: 20px; }

  .viewer { left: 0; padding: 60px 0; z-index: 20; }
  .viewer.pair { flex-direction: column; }
  .viewer.pair img { max-width: 100%; max-height: calc(50% - 5px); }
  body.viewing .viewer-nav { display: none; }
  .viewer-close {
    display: block;
    position: absolute; top: 20px; right: 20px; z-index: 1;
    font: 500 15px "Montserrat", sans-serif; color: #000;
    background: none; border: 0; padding: 8px 0 0; cursor: pointer;
  }
}
