/* Recreated from the Blot "Portfolio" template used on varhola.net. */

html {
  font-family: Geist, 'Hiragino Sans', 'Yu Gothic', 'Noto Sans CJK JP', 'Noto Sans Arabic', 'Geeza Pro', system-ui, sans-serif;
  font-size: 20px;
  line-height: 1.4;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
body {
  font-variant-ligatures: common-ligatures;
  font-feature-settings: "liga";
  background: #fff;
  color: #000;
  word-wrap: break-word;
  margin: 0 auto;
  max-width: 100%;
}

/* ---------- Sidebar ---------- */
.navigation-container { position: fixed; top: 0; width: 220px; height: 100vh; padding: 1.5rem; }
body.position-left { padding-left: calc(1.5rem + 220px); }
body.position-left .navigation-container { left: 0; }
.navigation { flex-grow: 1; height: 100vh; display: flex; flex-direction: column; }
.navigation a.index-link { font-weight: 600; flex-shrink: 0; flex-grow: 0; }
.navigation > * { flex-shrink: 0; }
.navigation .shrink { flex-shrink: 1; margin: 1.5rem 0; overflow: auto; scrollbar-width: none; }
.navigation .shrink::-webkit-scrollbar { display: none; }
.navigation a {
  display: block;
  text-indent: calc(1.5 * -.5rem);
  padding-left: calc(1.5 * .5rem);
  color: inherit;
  text-decoration: none;
  transition: color .1s;
}
.navigation a.light, .navigation a:focus, .navigation a:hover { color: rgba(0, 0, 0, .5); }
.navigation a.active { color: inherit; font-weight: 500; }

input[name=toggle] { display: none; }
label[for=toggle] {
  line-height: .333;
  cursor: pointer;
  display: block;
  float: right;
  -webkit-touch-callout: none;
  user-select: none;
}
@media screen and (min-width: 800px) { label[for=toggle] { display: none; } }

/* ---------- Mobile ---------- */
@media screen and (max-width: 800px) {
  .navigation { max-width: 100%; flex-grow: 1; }
  body { padding-top: 4rem; }
  body.position-left { padding-left: 0; }
  .navigation-container { width: 100%; height: auto; display: flex; box-sizing: border-box; z-index: 3; background: #fff; }
  .navigation { height: 2rem; }
  input[name=toggle]:checked + .navigation { min-height: 100vh; }
  input[name=toggle] + .navigation > :not(.index-link) { display: none; }
  input[name=toggle]:checked + .navigation > :not(.index-link) { display: block; }
  .entry .nav:first-child { order: 1; }
  .entry .nav:last-child { order: 2; }
  .entry .nav { flex-basis: 50%; }
  .nav > a { display: none; }
  .nav > * { padding: .5rem !important; }
  .nav:first-child { align-items: flex-start; }
  .nav:last-child { align-items: flex-end; }
  .entry { flex-wrap: wrap; }
  .entry .contents { order: 3; }
}

/* ---------- Pagination ---------- */
.pagination { padding: 1.5rem; display: flex; flex-wrap: wrap; }
@media screen and (max-width: 800px) { .pagination { padding: 1.3rem 1.35rem; } }
.pagination .spacer { border-right: 1px solid rgba(0, 0, 0, .1); height: 22px; margin-left: 1.3em; margin-right: 1.3em; }
.nav a, .pagination a { opacity: .15; }
.nav a[href], .pagination a[href] { opacity: 1; }
.navigation a.light:hover, .pagination a[href]:hover { opacity: .85; }
.pagination a { text-decoration: none; color: inherit; }
.pagination > * { margin: .65em 0; }
.pagination a + a { margin-left: 1.3em; margin-right: 2.6rem; }
.icon-holder {
  border: 1px solid;
  display: inline-block;
  border-radius: 100%;
  width: 1.25em;
  line-height: 1.25;
  height: 1.25em;
  text-align: center;
  position: relative;
  top: 0;
}
.icon-holder.margin-right { margin-right: .5rem; }
.icon-holder.margin-left { margin-left: .5rem; }

/* ---------- Photo grid (justified rows) ---------- */
.pre-loaded { visibility: hidden; opacity: 0; will-change: opacity; transition: opacity .3s, visibility .3s; }
.loaded { visibility: visible; opacity: 1; transition: opacity .3s, visibility .3s; }
.posts { display: flex; flex-wrap: wrap; padding: calc(1.5rem * 2 / 3); }
/* Keeps a short last row at its natural size instead of stretching it to full width. */
.posts::after { content: ""; flex-grow: 1000000; }
.post { margin: calc(1.5rem * 1 / 3); position: relative; text-decoration: none; color: inherit; }
.post.photo { cursor: zoom-in; }
.post:hover { opacity: .93; }
.post:active { opacity: .87; }
.post i { display: block; }
.post img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; vertical-align: bottom; }

/* ---------- Single photo / page ---------- */
.entry { display: flex; position: relative; z-index: 2; background-color: #fff; }
.entry .contents { padding: 1.5rem; flex-grow: 1; margin: 0; min-height: 100vh; box-sizing: border-box; }
.entry .caption { display: block; margin: 1em 0; }
.entry p { margin: 1.3em 0; }
.entry a { color: inherit; }
.entry h1 { font-size: 2em; margin: 0 0 1.5rem; }
@media screen and (max-width: 800px) { .entry { padding: 0; } }
.entry img { max-width: 100%; max-height: calc(100vh - 4rem); height: auto; width: auto; }
.entry .contents > img { margin: 0 auto; display: block; }
.entry .contents .caption { text-align: center; margin: .65em 0; }
.nav { display: flex; flex-shrink: 0; flex-direction: column; align-items: center; justify-content: space-between; }
.nav svg { width: calc(20px * 2.5); height: calc(20px * 2.5); stroke: #000; stroke-width: calc(20px * .14); stroke-linecap: square; }
@media screen and (max-width: 800px) { .nav:last-of-type > a:first-of-type { visibility: hidden; } }
.align-left .nav:first-child > a:first-child { visibility: hidden; }
.nav > * { display: block; padding: 1.5rem; }
.nav a { text-decoration: none; }
.nav a[href]:hover { opacity: .85; }
.nav a[href]:focus { opacity: .6; }

/* ---------- Tag pages & archives ---------- */
.entries h1 { padding: 0 1.5rem; margin: calc(1.5 * .6667rem) 0 0 0; font-size: 2em; }
.archives { display: flex; flex-wrap: wrap; padding: 0 0 1.5rem; }
.archives a {
  padding: 1.3rem;
  width: 220px;
  font-size: .8rem;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: inherit;
  text-align: center;
  text-decoration: none;
}
.archives a .thumbnail { width: 80px; height: 80px; display: flex; align-items: center; justify-content: center; margin-bottom: .4rem; }
.archives a .title { display: block; max-height: calc(1 * 1.4em); overflow: hidden; }
.archives a span.date { display: block; opacity: .5; }
.archives a:hover { opacity: .8; }
.archives a:active { opacity: .7; }
.archives a img { max-width: 100%; max-height: 100%; width: auto; height: auto; }
.archives h2 { width: 100%; font-size: 1em; font-weight: 500; padding: 1.5rem 1.5rem 0; margin: 0; }

/* ---------- Photo details under a photo ---------- */
.entry .contents .caption.exif { display: flex; flex-direction: column; align-items: center; gap: .3em; margin: .9em 0; }
.caption.exif time { font-weight: 500; letter-spacing: .01em; }
.caption.exif .specs { display: flex; flex-wrap: wrap; justify-content: center; row-gap: .2em; font-size: .85em; color: rgba(0, 0, 0, .5); font-variant-numeric: tabular-nums; }
.caption.exif .specs > span, .caption.exif .settings > span { white-space: nowrap; }
.caption.exif .specs > span + span::before, .caption.exif .settings > span + span::before { content: "\00b7"; margin: 0 .6em; color: rgba(0, 0, 0, .25); }
.caption.exif .camera { color: rgba(0, 0, 0, .75); }
@media screen and (max-width: 800px) {
  .caption.exif .specs { flex-direction: column; align-items: center; }
  .caption.exif .specs > span + span::before { content: none; }
}
