@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=DM+Sans:wght@400;500;600;700&display=swap");

:root {
  color-scheme: dark;
  --ink: #f0eee8;
  --muted: #8b8b83;
  --line: #393a35;
  --background: #11110f;
  --panel: #191916;
  --accent: #878787;
  font-family: "DM Sans", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  text-shadow: 0.35px 0 currentColor;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--background);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(
      ellipse at 68% 0%,
      rgba(84, 83, 60, 0.12),
      transparent 38rem
    ),
    var(--background);
}

button,
a {
  color: inherit;
}

a {
  text-decoration: none;
}

button {
  font: inherit;
}

.site-shell {
  display: grid;
  grid-template-columns: minmax(190px, 250px) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 82px);
  width: min(1540px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 38px clamp(24px, 5vw, 78px) 28px;
}

.topbar {
  font-family: "DM Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.055em;
}

.topbar-link:hover {
  color: var(--accent);
}

.main-content {
  grid-column: 2;
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 33px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}

.topbar-label {
  margin: 0;
}

.topbar-link {
  color: var(--ink);
  transition: color 180ms ease;
}

.topbar-link span {
  display: inline-block;
  margin-left: 5px;
  color: var(--accent);
}

body.gallery-page .topbar-link span {
  transition: transform 180ms ease;
}

body.gallery-page .topbar-link:hover span,
body.gallery-page .topbar-link:focus-visible span {
  transform: translateX(-3px) rotate(180deg);
}

.view[hidden] {
  display: none;
}

body.archive-page {
  background: #000;
}

body.archive-page .site-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  padding: 0;
}

body.archive-page .topbar {
  display: none;
}

body.archive-page .main-content {
  width: min(264px, calc(100vw - 32px));
}

body.archive-page #archive-view {
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  place-items: center;
}

body.archive-page .archive-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 282px;
  padding: 17px 10px 10px;
  border: 1px solid #747474;
}

body.archive-page .archive-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 16px;
  color: #eee;
}

body.archive-page .archive-brand-mark {
  display: block;
  flex: 0 0 25px;
  width: 25px;
  height: 25px;
}

body.archive-page .archive-brand-copy {
  display: grid;
  gap: 3px;
}

body.archive-page .archive-brand-name,
body.archive-page .archive-brand-subtitle {
  font-family: "Courier New", monospace;
  text-transform: uppercase;
}

body.archive-page .archive-brand-name {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

body.archive-page .archive-brand-subtitle {
  color: #888;
  font-size: 8px;
  letter-spacing: 0.08em;
}

body.archive-page .story-list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

body.archive-page .archive-entry {
  display: block;
  max-width: 100%;
  height: 28px;
  padding: 0;
  white-space: nowrap;
}

body.archive-page .entry-title {
  display: inline-block;
  width: fit-content;
  padding: 0;
  color: #eee;
  font-family: "Courier New", monospace;
  font-size: 14px;
  font-weight: 700;
  line-height: 28px;
  transition:
    color 140ms ease,
    background 140ms ease;
}

body.archive-page .archive-entry:hover .entry-title,
body.archive-page .archive-entry:focus-visible .entry-title {
  color: #000;
  background: #bdbdbd;
}

body.archive-page .archive-entry:focus-visible {
  outline: 1px solid #bdbdbd;
  outline-offset: 2px;
}

body.archive-page .archive-contact {
  position: fixed;
  right: 16px;
  bottom: 14px;
  color: #aaa;
  font-family: "Courier New", monospace;
  font-size: 10px;
  transition: color 160ms ease;
}

body.archive-page .archive-contact:hover,
body.archive-page .archive-contact:focus-visible {
  color: #fff;
  text-decoration: underline;
}

body.archive-page .social-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  align-self: center;
  width: 114px;
  margin-top: auto;
  padding-bottom: 1px;
  color: #666;
}

body.archive-page .social-icon {
  display: inline-flex;
  width: 17px;
  height: 17px;
  transform: translateY(0) scale(1);
  transition: color 160ms ease, filter 160ms ease, transform 160ms ease;
}

body.archive-page .social-icon:hover,
body.archive-page .social-icon:focus-visible {
  color: #eee;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.55));
  transform: translateY(-2px) scale(1.15);
}

body.archive-page .social-icon:focus-visible {
  outline: 1px solid #bdbdbd;
  outline-offset: 3px;
}

body.archive-page .social-icon svg {
  width: 100%;
  height: 100%;
}

body.gallery-page {
  background: #000;
  overflow-x: hidden;
}

body.gallery-page .site-shell {
  display: grid;
  grid-template-columns: 180px 900px;
  gap: 24px;
  width: min(1112px, calc(100vw - 48px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 38px 0 0;
}

body.gallery-page .main-content {
  grid-column: 2;
  width: 900px;
  max-width: 100%;
}

body.gallery-page .topbar {
  min-height: 20px;
  border: 0;
  color: #eee;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
}

body.gallery-page .topbar-link {
  color: #eee;
  text-transform: lowercase;
}

body.gallery-page .topbar-link span {
  color: inherit;
  width: 12px;
  height: 12px;
  background: currentColor;
  clip-path: polygon(
    0 0,
    12.5% 0,
    12.5% 12.5%,
    37.5% 12.5%,
    37.5% 25%,
    62.5% 25%,
    62.5% 37.5%,
    87.5% 37.5%,
    87.5% 62.5%,
    62.5% 62.5%,
    62.5% 75%,
    37.5% 75%,
    37.5% 87.5%,
    12.5% 87.5%,
    12.5% 100%,
    0 100%
  );
}

body.gallery-page .gallery-view {
  padding-top: 7px;
}

body.gallery-page .gallery-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.445fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 12px;
  height: min(81.5vh, 655px);
  min-height: 420px;
  margin: 0 16px 0 9px;
}

body.gallery-page .gallery-layout.is-empty {
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
}

body.gallery-page .gallery-empty {
  grid-column: 1 / -1;
  margin: 0;
  color: #aaa;
  font-family: "Courier New", monospace;
  font-size: 13px;
  text-align: center;
}

body.gallery-page .featured-photo {
  display: grid;
  grid-template-rows: minmax(0, 1fr) 24px;
  min-width: 0;
  min-height: 0;
  background: #000;
}

body.gallery-page .featured-frame {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #090909;
}

body.gallery-page .featured-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  animation: arrive 300ms ease both;
}

body.gallery-page .photo-scrubber {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 30px;
}

body.gallery-page .photo-dashes {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 100%;
  min-width: 0;
  height: 30px;
  overflow: hidden;
  cursor: ew-resize;
  touch-action: pan-y;
  user-select: none;
  outline: none;
}

body.gallery-page .photo-dash {
  display: grid;
  flex: 1 1 0;
  min-width: 0;
  max-width: 12px;
  height: 24px;
  place-items: center;
  pointer-events: none;
}

body.gallery-page .photo-dash::before {
  width: 100%;
  max-width: 14px;
  height: 3px;
  background: rgba(255, 255, 255, 0.38);
  content: "";
}

body.gallery-page .photo-dash[aria-current="true"]::before {
  background: #fff;
}

body.gallery-page .thumbnail-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 110px;
  gap: 4px;
  align-content: start;
  min-width: 0;
  padding: 0 4px 4px 0;
  overflow-y: auto;
  scrollbar-color: #777 #191916;
  scrollbar-width: thin;
}

body.gallery-page .thumbnail-panel::-webkit-scrollbar,
body.gallery-page .story-more-menu::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

body.gallery-page .thumbnail-panel::-webkit-scrollbar-track,
body.gallery-page .story-more-menu::-webkit-scrollbar-track {
  background: #191916;
}

body.gallery-page .thumbnail-panel::-webkit-scrollbar-thumb,
body.gallery-page .story-more-menu::-webkit-scrollbar-thumb {
  border: 2px solid #191916;
  border-radius: 8px;
  background: #777;
}

body.gallery-page .thumbnail {
  position: relative;
  padding: 0;
  border: 1px solid transparent;
  background: #111;
  cursor: pointer;
  overflow: hidden;
}

body.gallery-page .thumbnail img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #090909;
}

body.gallery-page .thumbnail[aria-current="true"] {
  border-color: #eee;
}

body.gallery-page .story-navigation {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
  min-width: 0;
  padding: 19px 0 12px;
}

@media (min-width: 1153px) {
  body.gallery-page .story-navigation {
    width: calc(100% + 212px);
    margin-left: -204px;
  }
}

body.gallery-page .story-nav-current,
body.gallery-page .story-more summary {
  color: #eee;
  font-family: "Courier New", monospace;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
}

body.gallery-page .story-nav-current {
  max-width: calc(100% - 88px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.gallery-page .story-more {
  position: static;
}

body.gallery-page .story-more summary {
  color: #aaa;
  cursor: pointer;
  list-style: none;
}

body.gallery-page .story-more summary::-webkit-details-marker {
  display: none;
}

body.gallery-page .story-more summary:hover,
body.gallery-page .story-more summary:focus-visible,
body.gallery-page .story-more[open] summary {
  color: #fff;
}

body.gallery-page .story-more-menu {
  position: absolute;
  z-index: 5;
  bottom: calc(100% + 8px);
  left: 50%;
  display: grid;
  gap: 8px;
  min-width: max-content;
  max-width: min(320px, calc(100vw - 32px));
  max-height: min(45vh, 280px);
  padding: 12px 14px;
  overflow: auto;
  border: 1px solid #444;
  background: #111;
  box-shadow: 0 8px 24px #000b;
  transform: translateX(-50%);
}

body.gallery-page .story-nav-link {
  font-family: "Courier New", monospace;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

body.gallery-page .story-nav-link:hover,
body.gallery-page .story-nav-link:focus-visible {
  color: var(--accent);
}

@media (max-width: 1152px) {
  body.gallery-page .site-shell {
    display: block;
    width: calc(100vw - 32px);
    padding-top: 24px;
  }

  body.gallery-page .main-content {
    width: 100%;
  }

  body.gallery-page .gallery-layout {
    margin: 0;
  }
}

@keyframes arrive {
  from {
    opacity: 0.55;
  }
  to {
    opacity: 1;
  }
}

@media (max-width: 800px) {
  .site-shell {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 20px 22px 24px;
  }

  .main-content {
    grid-column: 1;
  }

  body.gallery-page .site-shell {
    display: block;
    width: calc(100vw - 32px);
    padding-top: 24px;
  }

  body.gallery-page .main-content {
    width: 100%;
  }

  body.gallery-page .gallery-layout {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    height: min(68vh, 620px);
    min-height: 340px;
    margin: 0;
  }
}

@media (max-width: 560px) {
  .site-shell {
    padding: 16px 16px 20px;
  }

  .topbar {
    min-height: 40px;
    font-size: 9px;
  }

  body.gallery-page .topbar {
    font-size: 11px;
  }

  body.gallery-page .gallery-view {
    padding-top: 8px;
  }

  body.gallery-page .gallery-layout {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(300px, 58vh) 112px;
    gap: 8px;
    height: auto;
    min-height: 0;
  }

  body.gallery-page .thumbnail-panel {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 88px;
    grid-auto-rows: 120px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 0 4px;
    scrollbar-color: #777 #191916;
    scrollbar-width: thin;
  }

  body.gallery-page .gallery-layout.is-empty {
    grid-template-rows: minmax(300px, 58vh);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
