/*
 * kormelitz.com: layout adapted from Illustfolio 4
 * (c) 2016 Showkaku Sano, MIT License, https://github.com/sanographix/illustfolio4
 * Settings reproduced from the Tumblr blog: XL thumbnails, narrow margins, cropped.
 */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "Josefin Sans", Futura, "Century Gothic", "Avenir Next", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 300;
  font-size: .95rem;
  line-height: 1.4;
  color: #36393d;
  background: #fff;
  -webkit-font-smoothing: antialiased;
}
img { border: 0; display: block; }
a { color: #36393d; text-decoration: none; }
a:hover { color: #529ecc; }
h1 { font-weight: normal; }

/* containers */
.l-container, .l-container-mini { margin: 0 10px; }
@media (min-width: 768px) { .l-container, .l-container-mini { width: 720px; margin: 0 auto; } }
@media (min-width: 992px) { .l-container, .l-container-mini { width: 940px; } }
@media (min-width: 1200px) { .l-container, .l-container-mini { width: 1140px; } }
.l-container-mini { max-width: 700px; }

/* header: logo left, welcome text + links right */
.header { margin: 2em 0; }
@media (min-width: 768px) { .header { margin: 4em 0; } }
@media (min-width: 1200px) { .header { margin: 5em 0; } }
.header-wrapper { display: flex; flex-direction: column; align-items: center; gap: 1.5em; }
@media (min-width: 768px) { .header-wrapper { flex-direction: row; justify-content: space-between; } }
.header-logo img { max-width: 100%; height: auto; width: 320px; }
.nav { text-align: center; }
@media (min-width: 768px) { .nav { width: 50%; text-align: right; } }
.nav p { margin: 0 0 1.4em; }
.nav p:last-child { margin: 0; }

/* thumbnail grid: 1 uncropped column on mobile, 3 at 4:3 above 768px, 2px gaps */
.site-content { flex: 1 0 auto; }
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  margin-bottom: 4em;
}
@media (min-width: 768px) { .grid { grid-template-columns: repeat(3, 1fr); max-width: 1800px; margin: 0 auto 4em; } }
.cell { display: block; overflow: hidden; background: rgba(0, 0, 10, .07); }
.cell img {
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: center 25%;
  transition: opacity .2s;
}
@media (min-width: 768px) { .cell img { aspect-ratio: 4 / 3; } }  /* cropped only in the grid */
.cell:hover img { opacity: .85; }

.section-title { text-align: center; margin-bottom: 2em; }
.section-title h1 { font-size: 1.4rem; margin: 0 0 .4em; }
.credits { color: #878ea0; }

/* single image page */
.full-image { margin: 0 0 2em; text-align: center; }
.full-image img { max-width: 100%; height: auto; max-height: 1000px; width: auto; margin: 0 auto; }
.entry { line-height: 1.6; }
@media (min-width: 768px) { .entry { font-size: 1rem; } }
.entry h1 { font-size: 1.5rem; margin: 0 0 .5em; }
.entry a { text-decoration: underline; text-underline-offset: 2px; }

/* newer / older, with the theme's chevrons */
.pagenation { margin: 3em 0; text-align: center; text-transform: uppercase; font-size: .7rem; letter-spacing: .1em; }
@media (min-width: 768px) { .pagenation { font-size: .85rem; } }
.pagenation a { display: inline-block; margin: 0 1em; }
.pager-prev::before, .pager-next::after {
  content: ""; display: inline-block; width: 1.2em; height: 1.2em; vertical-align: middle;
  border-top: 1px solid currentColor; position: relative; bottom: .05em;
}
.pager-prev::before { transform: rotate(-45deg); border-left: 1px solid currentColor; }
.pager-next::after { transform: rotate(45deg); border-right: 1px solid currentColor; }

/* footer */
.section-footer { margin: 0 0 1em; }
@media (min-width: 768px) { .section-footer { margin-bottom: 2em; } }
.footer-content { font-size: .75rem; color: #878ea0; text-align: center; display: flex; flex-direction: column; gap: .5em; }
@media (min-width: 768px) { .footer-content { flex-direction: row; justify-content: space-between; } }
.footer-content a { color: #878ea0; font-weight: bold; }
