@charset "utf-8";

:root {
  --ink: #333;
  --paper: #fff;
  --highlight: #fff20d;
  --rule: #ddd;
  --sidebar: 125px;
  --photo: 600px;
}

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

body {
  margin: 20px;
  background-color: var(--paper);
  color: var(--ink);
  font: 10px/18px Verdana, Arial, Helvetica, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
  padding: 0.1em;
}

a:hover,
a:focus-visible {
  background-color: var(--highlight);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Layout ------------------------------------------------------------------ */

.site {
  display: flex;
  align-items: flex-start;
  width: calc(var(--sidebar) + var(--photo));
  max-width: 100%;
}

.site-nav {
  flex: 0 0 var(--sidebar);
  width: var(--sidebar);
}

.site-main {
  flex: 0 0 var(--photo);
  width: var(--photo);
  min-height: 700px;
}

.site-title {
  margin: 0 0 18px;
  padding-left: 5px;
}

.page-title {
  margin: 0 0 12px;
  padding-left: 0;
  font-size: 11px;
  line-height: 18px;
  font-weight: bold;
}

.polaroid {
  margin: 0;
}

.picture-nav {
  margin: 0;
  padding-left: 5px;
  list-style: none;
}

.picture-nav [aria-current="page"] {
  font-weight: bold;
}

.comments {
  width: 710px;
  max-width: 100%;
  margin-top: 24px;
}

/* Hamburger --------------------------------------------------------------- */

/* Only offered when the script that drives it has run, and only on narrow
   screens. Without JavaScript the full list simply stays visible. */
.nav-toggle {
  display: none;
}

@media (max-width: 780px) {
  body {
    margin: 15px;
  }

  .site {
    display: block;
    width: auto;
  }

  .site-nav,
  .site-main {
    flex: none;
    width: auto;
  }

  .site-main {
    min-height: 0;
    margin-top: 15px;
  }

  .site-title {
    margin-bottom: 12px;
    font-size: 12px;
  }

  .js .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid var(--rule);
    background: none;
    color: inherit;
    font: inherit;
    line-height: 1;
    cursor: pointer;
  }

  .js .nav-toggle:hover,
  .js .nav-toggle:focus-visible {
    background-color: var(--highlight);
  }

  .nav-toggle-bars,
  .nav-toggle-bars::before,
  .nav-toggle-bars::after {
    display: block;
    width: 14px;
    height: 2px;
    background-color: currentColor;
  }

  .nav-toggle-bars {
    position: relative;
  }

  .nav-toggle-bars::before,
  .nav-toggle-bars::after {
    content: "";
    position: absolute;
    left: 0;
  }

  .nav-toggle-bars::before {
    top: -5px;
  }

  .nav-toggle-bars::after {
    top: 5px;
  }

  /* Open menu: a wrapping grid of links rather than a 33-item column. */
  .picture-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    margin-top: 12px;
    padding-left: 0;
  }

  /* Beats the rule above, which would otherwise outrank the UA [hidden] style.
     Without JavaScript nothing sets [hidden], so the list stays visible. */
  .picture-nav[hidden] {
    display: none;
  }
}

/* Previous / next pager --------------------------------------------------- */

/* Fixed columns rather than space-between, so that on the first and last
   pictures the single remaining arrow keeps its own side. */
.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid var(--rule);
}

/* Padding gives the icon a comfortable tap target; the negative outer margin
   pulls the arrow back level with the edge of the photo. */
.pager a {
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
}

.pager-prev {
  grid-column: 1;
  justify-self: start;
  margin-left: -10px;
}

.pager-next {
  grid-column: 2;
  justify-self: end;
  margin-right: -10px;
}

.pager-arrow {
  flex: none;
  display: block;
}

/* Roomier touch targets on small screens (~44px, per touch guidance). */
@media (max-width: 780px) {
  .pager a {
    padding: 16px 15px;
  }

  .pager-prev {
    margin-left: -15px;
  }

  .pager-next {
    margin-right: -15px;
  }
}
