/* peace_without_love: one stylesheet for every page */

:root {
  --bg: #fff;
  --fg: #111;
  --mute: #777;
  --gutter: 25px;
  --font: "Times New Roman", Times, serif;
  --size: 12px;
  --leading: 1.25;
}

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

html { background: var(--bg); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100svh;
  background: var(--bg);
  color: var(--fg);
  font: var(--size) / var(--leading) var(--font);
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible { outline: 1px solid var(--fg); outline-offset: 3px; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-align: left;
}
button:hover { text-decoration: underline; }

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--bg);
  padding: 6px 10px;
  z-index: 100;
}
.skip:focus { left: var(--gutter); top: 10px; }

/* ---- site mark (top centre) ---- */
.site-mark {
  position: fixed;
  top: var(--gutter);
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  white-space: nowrap;
  line-height: var(--leading);
}

/* ---- menu (left, plain text) ---- */
.menu {
  position: fixed;
  top: var(--gutter);
  left: var(--gutter);
  z-index: 19;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}
.menu .note { display: block; margin-top: var(--leading-em, 1.25em); }

/* ---- page frame ---- */
main { display: block; }

.empty { color: var(--mute); }

/* ---- home: one random image ---- */
.home-stage {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 70px 18px var(--gutter);
}
.home-image {
  display: block;
  width: min(62vw, 782px);
  max-width: 100%;
  max-height: 72svh;
  object-fit: contain;
  cursor: pointer;
}

/* ---- images: single column feed ---- */
.image-feed {
  --col: clamp(260px, 24vw, 520px);   /* one column width; tall images are capped below */
  width: var(--col);
  margin: 52px auto 40px;
  display: flex;
  flex-direction: column;
  gap: 25px;
}
.image-feed button { display: block; width: 100%; }
.image-feed img {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(var(--col) * 1.19);
  object-fit: contain;
}

/* ---- videos ---- */
.video-list {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 70px 18px;
}
.video-list ul { list-style: none; margin: 0; padding: 0; white-space: nowrap; font-size: 1.3em; text-align: center; }

.video-player {
  width: min(70vw, 800px);
  margin: 0 auto;
  padding: 20vh 0 40px;
}
.video-player video { display: block; width: 100%; height: auto; background: #000; }
.video-title { margin-bottom: 8px; }
.video-back { margin-top: 12px; display: inline-block; }

/* ---- writing ---- */
.writing {
  width: min(560px, calc(100vw - 36px));
  margin: 90px auto 60px;
}
.writing article + article { margin-top: 48px; }
.writing h2 { font: inherit; margin: 0 0 2px; }
.writing time { display: block; color: var(--mute); margin-bottom: 12px; }
.writing p { margin: 0 0 1em; }

/* ---- full screen viewer ---- */
.viewer {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--bg);
  display: grid;
  place-items: center;
  padding: 50px 18px;
}
.viewer[hidden] { display: none; }
.viewer img { max-width: 100%; max-height: calc(100svh - 100px); object-fit: contain; }
.viewer .close { position: absolute; top: 20px; right: var(--gutter); }
.viewer .count { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); color: var(--mute); }

/* ---- small screens: menu becomes a row under the mark ---- */
@media (max-width: 700px) {
  .menu {
    top: 50px;
    left: 0;
    right: 0;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0 18px;
    padding: 0 18px;
  }
  .menu .note { flex-basis: 100%; text-align: center; margin-top: 4px; }
  .home-stage { padding-top: 100px; }
  .home-image { width: min(82vw, 782px); max-height: 65svh; }
  .image-feed { --col: min(76vw, 306px); margin-top: 100px; gap: 20px; }
  .video-list { padding-top: 100px; }
  .video-player { width: calc(100vw - 36px); padding-top: 120px; }
  .writing { margin-top: 120px; }
}
