:root {
  --bg: #ececea;
  --ink: #141414;
  --line: #141414;
  --padding: 32px;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: "DM Mono", monospace; }
a { color: inherit; text-decoration: none; }

.site-header {
  position: relative;
  height: 30px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  border-bottom: 2px solid var(--line);
  background-image: repeating-linear-gradient(to bottom, var(--ink) 0, var(--ink) 1px, var(--bg) 1px, var(--bg) 3px);
}

.titlebar-label {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  background: var(--bg);
  padding: 2px 14px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .03em;
  white-space: nowrap;
}

.header-back {
  margin-left: auto;
  z-index: 2;
  background: var(--bg);
  border: 1px solid var(--ink);
  box-shadow: 1px 1px 0 var(--ink);
  padding: 3px 12px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.header-back:hover { background: var(--ink); color: var(--bg); }
.header-back[hidden] { display: none; }

.menu-toggle {
  appearance: none;
  -webkit-appearance: none;
  z-index: 2;
  background: var(--bg);
  border: 1px solid var(--ink);
  box-shadow: 1px 1px 0 var(--ink);
  margin: 0;
  padding: 3px 12px;
  font: inherit;
  font-family: "DM Mono", monospace;
  font-size: 11px;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
  cursor: pointer;
}
.menu-toggle:hover { background: var(--ink); color: var(--bg); }

.site-menu { display: flex; flex-direction: column; padding: 16px var(--padding); border-bottom: 2px solid var(--line); font-size: 13px; }
.site-menu[hidden] { display: none; }
.site-menu a { padding: 10px 0; text-transform: uppercase; letter-spacing: .04em; }
.site-menu a:not(:last-child) { border-bottom: 1px solid rgba(20,20,20,.15); }

main { padding: var(--padding); }
h1 { font-family: "Press Start 2P", monospace; font-size: clamp(20px, 4vw, 34px); text-align: center; line-height: 1.4; margin: 20px 0 40px; }
h1:has(+ .intro) { margin-bottom: 20px; }
.intro { max-width: 620px; margin: 0 auto 40px; font-size: 14px; line-height: 1.6; text-align: center; }

.directory__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 32px; max-width: 1100px; margin: 0 auto; }

.entry { display: block; }
.entry__thumb { border: 2px solid var(--line); box-shadow: 6px 6px 0 var(--line); background: #000; aspect-ratio: 4 / 3; overflow: hidden; }
.entry__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.entry p { margin: 16px 0 0; font-size: 14px; line-height: 1.5; text-align: center; }
.entry:hover .entry__thumb { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--line); }
.entry__thumb { transition: transform .1s ease, box-shadow .1s ease; }

.extra { display: block; text-align: center; margin-top: 40px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid currentColor; padding-bottom: 3px; width: fit-content; margin-left: auto; margin-right: auto; }

@media (max-width: 640px) {
  :root { --padding: 20px; }
  .directory__grid { grid-template-columns: 1fr; max-width: 420px; }
}

.modal { position: fixed; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.7); }

.modal__window { position: relative; width: 100%; max-width: 860px; background: var(--bg); border: 2px solid var(--line); box-shadow: 8px 8px 0 var(--line); }
.modal__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 26px;
  padding: 0 8px;
  border-bottom: 2px solid var(--line);
  background-image: repeating-linear-gradient(to bottom, var(--ink) 0, var(--ink) 1px, var(--bg) 1px, var(--bg) 3px);
}
.modal__title {
  background: var(--bg);
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.modal__close {
  appearance: none;
  -webkit-appearance: none;
  z-index: 1;
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  background: var(--bg);
  border: 1px solid var(--ink);
  box-shadow: 1px 1px 0 var(--ink);
  font: inherit;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}
.modal__close:hover { background: var(--ink); color: var(--bg); }

.modal__frame { position: relative; aspect-ratio: 16 / 9; background: #000; }
.modal__frame iframe, .modal__frame video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.modal__frame video { object-fit: contain; background: #000; }
.modal__frame [hidden] { display: none; }
