#atlas {
  --atlas-paper: #f3f2ef;
  --atlas-quiet: #b5b4af;
  --atlas-pad: clamp(25px, 5.1vw, 104px);
  --atlas-serif: Georgia, 'Times New Roman', serif;
  --atlas-sans: Arial, Helvetica, sans-serif;
  background: #090909;
  color: var(--atlas-paper);
  padding: clamp(38px, 5vw, 76px) max(var(--atlas-pad), 6vw) clamp(44px, 5.5vw, 90px);
  font: 1rem/1.45 var(--atlas-sans);
  -webkit-font-smoothing: antialiased;
}
#atlas *, #atlas *::before, #atlas *::after { box-sizing: border-box; }
#atlas .wall {
  display: grid;
  grid-template-columns: repeat(24, minmax(0, 1fr));
  grid-template-rows: repeat(17, minmax(0, 1fr));
  gap: clamp(6px, .60vw, 10px);
  aspect-ratio: 1.94;
  max-width: 1440px;
  margin-inline: auto;
  isolation: isolate;
}
#atlas .heading { grid-column: 1 / span 9; grid-row: 1 / span 5; align-self: start; padding-block-start: .14em; min-width: 0; }
#atlas h2 { margin: 0; font: 400 clamp(48px, 5.35vw, 88px)/.94 var(--atlas-serif); letter-spacing: -.065em; }
#atlas h2 em { font-weight: 400; }
#atlas .hint { font-size: clamp(.8rem, 1vw, .96rem); color: var(--atlas-quiet); margin: clamp(6px, .75vw, 13px) 0 0; }
#atlas .hint-touch, #atlas [hidden] { display: none !important; }
#atlas .piece {
  position: relative; display: block; min-width: 0; min-height: 0;
  grid-column: var(--col); grid-row: var(--row);
  color: white; background: #272727; text-decoration: none;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
#atlas .piece img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%); filter: grayscale(1) brightness(1.05); transition: filter 320ms ease; }
#atlas .caption {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 1.2rem clamp(5px, .7vw, 12px) .42rem;
  background: linear-gradient(transparent, #000c); color: white; font: 500 clamp(.8rem, 1.18vw, 1.15rem)/1.09 var(--atlas-sans);
  letter-spacing: -.025em; overflow-wrap: break-word; opacity: 0; transition: opacity 210ms; pointer-events: none;
}
#atlas .piece:focus-visible { z-index: 1; outline: 2px solid white; outline-offset: 0; }
#atlas .piece:focus-visible img, #atlas .piece.is-selected img { filter: grayscale(0); }
#atlas .piece:focus-visible .caption, #atlas .piece.is-selected .caption { opacity: 1; }
@media (hover: hover) and (pointer: fine) {
  #atlas .piece:hover img { filter: grayscale(0); }
  #atlas .piece:hover .caption { opacity: 1; }
}
#atlas .selection-bar {
  position: fixed; z-index: 20; left: 0; right: 0; bottom: 0;
  padding: 10px max(16px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  display: grid; grid-template-columns: minmax(0, 1fr) auto 44px; gap: 10px; align-items: center;
  background: #121211; border-top: 1px solid #666; box-shadow: 0 -6px 25px #0006;
}
#atlas .selected-info { min-width: 0; }
#atlas .selected-info small { display: block; color: var(--atlas-quiet); font: 600 .75rem/1.35 var(--atlas-sans); letter-spacing: .13em; text-transform: uppercase; }
#atlas .selected-info strong { display: block; font: 400 clamp(20px, 4.8vw, 32px)/1.15 var(--atlas-serif); }
#atlas .clear, #atlas .open-project { display: grid; place-items: center; min-height: 44px; color: inherit; touch-action: manipulation; }
#atlas .clear { font: 1.6rem var(--atlas-sans); background: transparent; border: 0; padding: 0; }
#atlas .open-project { padding: .45rem .85rem; border: 1px solid #92928e; font-size: .84rem; text-decoration: none; }
@media (hover: none), (pointer: coarse) {
  #atlas .hint-desktop { display: none; }
  #atlas .hint-touch { display: block !important; }
}
@media (max-width: 760px) {
  #atlas { padding: clamp(28px, 6.5vw, 44px) clamp(15px, 4.3vw, 25px) clamp(34px, 8vw, 60px); }
  #atlas .wall { grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: repeat(22, minmax(0, 1fr)); gap: clamp(4px, 1.25vw, 7px); aspect-ratio: .56; }
  #atlas .piece { grid-column: var(--mcol); grid-row: var(--mrow); }
  #atlas .piece img { object-position: var(--mpos); }
  #atlas .heading { grid-column: 1 / span 8; grid-row: 1 / span 3; padding: 0; }
  #atlas h2 { font-size: clamp(40px, 10.9vw, 70px); line-height: .95; }
  #atlas .hint { margin-top: .56rem; font-size: .75rem; }
  #atlas .caption { padding: .8rem 4px 4px; font-size: .77rem; }
}
@media (prefers-reduced-motion: reduce) { #atlas .piece img, #atlas .caption { transition: none; } }
