/* CSS reset based on https://andy-bell.co.uk/a-modern-css-reset/ */
/* Box sizing rules */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Remove default margin */
body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

/* Remove list styles on ul, ol elements with a list role, which suggests default
 * styling will be removed */
ul[role='list'],
ol[role='list'] {
  list-style: none;
}

/* Set core root defaults */
html:focus-within {
  scroll-behavior: smooth;
}

/* Set core body defaults */
body {
  min-height: 100vh;
  line-height: 1.5;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
  text-decoration-skip-ink: auto;
}

/* Make images easier to work with */
img,
picture {
  max-width: 100%;
  display: block;
}

/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
  font: inherit;
}

/* Remove all animations, transitions and smooth scroll for people that prefer
 * not to see them */
@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ------------------------------------------------------------ */
/* General */
/* ------------------------------------------------------------ */

body {
  font-family: sans-serif;
  background-color: #beefff;
  color: #000;
}

::selection {
  background-color: #fdf229;
}

* {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: #000;
  text-decoration: underline;
  text-decoration-color: rgb(0 0 0 / 50%);
  border-radius: 2px;
  transition: outline-width .1s, background-color .1s, outline-color .1s;
  outline: solid 0px rgb(255 255 255 / 0%);
}

a:hover {
  background-color: rgb(255 255 255 / 50%);
  outline: solid 4px rgb(255 255 255 / 50%);
}

h1 {
  margin-top: 1em;
  text-wrap: balance;
}

a.tag {
  font-size: 10px;
  border: solid 1px rgb(0 0 0 / 50%);
  border-radius: 10px;
  padding-left: 5px;
  padding-right: 5px;
  padding-top: 2px;
  padding-bottom: 2px;
  text-decoration: none;
  color: rgb(0 0 0 / 75%);
}

hr {
  border: solid 1px rgb(0 0 0 / 25%);
}

#content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-bottom: 10vh;
}

#content > p,
#content > h1,
#content > h2,
#content > h3,
#content > pre,
#content > ol,
#content > ul,
#content > iframe {
  width: 96vw;
  max-width: 640px;
}

time {
  border-radius: 10px;
  padding-left: 6px;
  padding-right: 6px;
  padding-top: 4px;
  padding-bottom: 4px;
  background-color: rgb(0 0 0 / 15%);
}

ul {
  list-style-type: square;
}

#content img {
  object-fit: contain;
  max-width: 66vw;
  max-height: 66vh;
}

@media only screen and (max-device-width: 600px) {
  #content img {
    max-width: 96vw;
  }
}

/* ------------------------------------------------------------ */
/* Nav bar */
/* ------------------------------------------------------------ */

#nav a {
  border-radius: 10px;
  display: inline-block;
  margin-top: 12px;
  margin-left: 12px;
  padding-left: 12px;
  padding-right: 12px;
  padding-top: 2px;
  padding-bottom: 2px;
  text-decoration: none;
  background-color: rgb(255 255 255 / 50%);
}

#uv {
  border: none;
  background-color: #fff !important;
  color: black !important;
  font-weight: bold;
}

/* ------------------------------------------------------------ */
/* Entry list */
/* ------------------------------------------------------------ */

#page-list {
  max-width: 80vw !important;
  display: grid;
  grid-template-columns: repeat(auto-fill, 320px);
  grid-gap: 16px;
  row-gap: 48px;
  justify-content: center;
  align-items: center;
  padding-left: 0px;
}

#page-list li {
  width: 320px;
  height: 240px;
  margin: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}

#page-list img {
  border-radius: 5px;
  outline: solid 1px rgb(255 255 255 / 50%);
  transition: outline-width .1s;
}

#page-list img:hover {
  border-radius: 5px;
  outline: solid 5px rgb(255 255 255 / 50%);
}

.page-list-item-title {
  margin-top: 4px;
  white-space: nowrap;
}

#page-list .page-list-item-cover {
  width: 320px;
  height: 240px;
  border-radius: 5px;
  background: rgb(0 0 0 / 25%);
}

/* ------------------------------------------------------------ */
/* Single entry */
/* ------------------------------------------------------------ */

ul#gallery {
  max-width: 96vw;
  list-style-type: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, 320px);
  grid-gap: 16px;
  justify-content: center;
  padding-left: 0px;
}

#gallery a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 320px;
  min-height: 240px;
}

#gallery a:hover {
  outline: none;
  background: none;
}

#gallery img {
  border-radius: 5px;
  outline: solid 1px rgb(255 255 255 / 50%);
  transition: outline-width .1s;
}

#gallery img:hover {
  border-radius: 5px;
  outline: solid 5px rgb(255 255 255 / 50%);
}

ul.metadata {
  list-style-type: none;
  margin: 0px;
  padding: 0px;
}

ul.metadata li {
  display: inline-block;
  white-space: nowrap;
  padding-bottom: 8px;
}

span.metakey {
  display: inline;
  border-radius: 10px 0px 0px 10px;
  padding-left: 6px;
  padding-right: 6px;
  padding-top: 4px;
  padding-bottom: 4px;
  text-decoration: none;
  border-right: none;
  background-color: rgb(0 0 0 / 15%);
}

span.metavalue {
  display: inline;
  border: solid 1px rgb(0 0 0 / 15%);
  border-radius: 0px 10px 10px 0px;
  border-left: none;
  padding-left: 6px;
  padding-right: 6px;
  padding-top: 3px;
  padding-bottom: 3px;
  text-decoration: none;
  color: rgb(0 0 0 / 75%);
}
