/* Look and feel carried over from the 2015 site: Special Elite, a translucent
   cream menu panel over a fullscreen slideshow, and a gradient CV sheet. */

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

/* Dark canvas on html only: a body background would paint over the slideshow */
html { background: #111; }
body {
  margin: 0;
  padding: 25px;
  color: #000;
  font: 14px/1.4 "Special Elite", "Courier New", monospace;
}
body:has(dialog[open]) { overflow: hidden; }
p, h2, h3, ul { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid #000; outline-offset: 2px; }

/* Slideshow */
.slideshow { position: fixed; inset: 0; z-index: -1; margin: 0; padding: 0; list-style: none; }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.5s ease; }
.slide.is-active { opacity: 1; }
.slide img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Menu panel */
.menu {
  /* 25% of the window, never narrower than the original 300px */
  width: min(max(300px, 25vw), 100%);
  max-height: calc(100dvh - 50px - 25px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: rgb(250 250 238 / .5);
  border-radius: 10px;
  padding: 0 5px;
  font-size: 16px;
}
.menu summary { cursor: pointer; list-style: none; font-weight: 700; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary:hover { text-decoration: underline; text-underline-offset: 3px; }
.menu-title { display: flex; align-items: center; gap: .3em; padding: 0 5px; font-size: 20px; }
.menu-title img { width: 40px; height: auto; }
.menu-title:hover { text-decoration: none; }
.menu-body { padding: 1em 0 1.1em; display: grid; gap: 1.1em; }
.menu-section > summary { padding-left: 45px; font-size: 18px; }
.menu-text { padding: 1em 10px 0 50px; font-size: 14px; display: grid; gap: 1em; }
.menu-text a { color: inherit; text-underline-offset: 3px; }
.menu-text a:hover { text-decoration-thickness: 2px; }
.more { text-align: right; }
.more button, .thumbs button { background: none; border: 0; padding: 0; cursor: pointer; }
.more button:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Open/close animation where the browser supports it */
@supports (interpolate-size: allow-keywords) {
  .menu { interpolate-size: allow-keywords; }
  .menu details::details-content {
    block-size: 0;
    overflow: clip;
    transition: block-size .5s ease, content-visibility .5s allow-discrete;
  }
  .menu details[open]::details-content { block-size: auto; }
}

.thumbs { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.thumbs button { display: block; width: 100%; border-radius: 4px; overflow: hidden; opacity: .8; transition: opacity .2s; }
.thumbs button:hover, .thumbs button[aria-current="true"] { opacity: 1; }
.thumbs button[aria-current="true"] { outline: 2px solid #000; outline-offset: 1px; }
.thumbs img { display: block; width: 100%; height: auto; }

.menu-sub { margin: .4em 0 -.4em; font-size: 14px; font-weight: 700; }

/* Artwork viewer: the whole piece, uncropped, over the same dark veil as the CV */
.viewer {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 50px 20px 20px;
  border: 0;
  background: transparent;
  color: #fff;
  font-family: inherit;
}
.viewer[open] { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; animation: fade-in .4s ease-in; }
.viewer::backdrop { background: rgb(0 0 0 / .85); animation: fade-in .4s ease-in; }
.viewer figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; min-height: 0; }
.viewer img { display: block; max-width: 100%; max-height: calc(100dvh - 150px); width: auto; height: auto; object-fit: contain; box-shadow: 0 2px 18px rgb(0 0 0 / .5); transition: opacity .25s; }
.viewer img.is-loading { opacity: 0; }
.viewer figcaption { max-width: 46rem; text-align: center; font-size: 14px; line-height: 1.5; }
.viewer-title { display: block; font-weight: 700; }
.viewer-title:empty { display: none; }
.viewer-nav[hidden] { display: none; }
.viewer-nav { display: flex; align-items: center; gap: 14px; font-size: 14px; }
.viewer-nav button { width: 28px; height: 28px; padding: 0; border: 0; border-radius: 14px; background: #606061; color: #fff; font: 700 14px/28px Arial, sans-serif; cursor: pointer; box-shadow: 1px 1px 3px #000; }
.viewer-nav button:hover { background: #000; }
.viewer :focus-visible { outline-color: #fff; }

/* CV sheet */
.cv {
  width: min(60%, 60rem);
  height: 60%;
  max-width: none;
  max-height: none;
  margin: 10% auto 0;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(#fff, #999);
  color: #000;
  font-family: inherit;
}
.cv[open] { animation: fade-in .4s ease-in; }
.cv::backdrop { background: rgb(0 0 0 / .72); animation: fade-in .4s ease-in; }
.cv-sheet { height: 100%; overflow-y: auto; padding: 5px 20px 13px; }
.cv h2 { margin: .8em 0 .6em; font-size: 1.5em; }
.cv h3 { margin: 1.4em 0 .5em; font-size: 1.17em; scroll-margin-top: 1em; }
.cv p { margin: 0 0 .9em; }
.close {
  position: fixed;
  top: 12px;
  right: 12px;
  width: 24px;
  height: 25px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: #606061;
  color: #fff;
  font: 700 14px/25px Arial, sans-serif;
  cursor: pointer;
  box-shadow: 1px 1px 3px #000;
}
.close:hover { background: #000; }
.close:focus-visible { outline-color: #fff; }

.footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 4px 1em 6px;
  text-align: center;
  font-size: 13px;
  text-shadow: 0 0 6px rgb(255 255 255 / .9);
}

@keyframes fade-in { from { opacity: 0; } }

@media (max-width: 700px) {
  body { padding: 12px; }
  .menu { width: 100%; max-height: calc(100dvh - 24px - 30px); }
  .menu-text { padding-left: 30px; }
  .menu-section > summary { padding-left: 45px; }
  .cv { width: calc(100% - 24px); height: calc(100dvh - 80px); margin-top: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .slide, .menu details::details-content { transition: none; }
  .cv[open], .cv::backdrop, .viewer[open], .viewer::backdrop { animation: none; }
  .viewer img { transition: none; }
}
