/* Contact: the site as a contact sheet. Paper, film, edge print, red grease pencil. */
@font-face {
  font-family: "Inter Tight";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/static/fonts/intertight-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Plex Mono";
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/plexmono-400.woff2") format("woff2");
}
@font-face {
  font-family: "Plex Mono";
  font-weight: 500;
  font-display: swap;
  src: url("/static/fonts/plexmono-500.woff2") format("woff2");
}

:root {
  --paper: #f1eee6;
  --ink: #1a1916;
  --quiet: #5f5b52;
  --rule: #cfcabd;
  --film: #121110;
  --edge: #e9e2cf;
  --pencil: #d2281e;
  --gut: clamp(16px, 4vw, 56px);
  --bar: 4rem;
  --meta: 3.25rem;
  --mono: "Plex Mono", ui-monospace, Menlo, monospace;
  --circle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 70' preserveAspectRatio='none'%3E%3Cpath d='M11 22C15 6 72 1 90 13c12 8 8 44-22 50C40 68 6 62 5 40 4 26 22 12 50 10' fill='none' stroke='%23d2281e' stroke-width='2.2' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--paper); color: var(--ink); }
body {
  font: 400 15px/1.45 "Inter Tight", -apple-system, "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img { display: block; }
.mono, .bar nav, .meta, .edge, .label {
  font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
}

/* Bar */
.bar {
  display: flex; justify-content: space-between; align-items: center;
  height: var(--bar); padding: 0 var(--gut);
}
.bar .name { font-size: 24px; font-weight: 600; letter-spacing: -.03em; }
.bar nav a { margin-left: 2em; color: var(--quiet); padding-bottom: 3px; border-bottom: 2px solid transparent; }
.bar nav a:hover { color: var(--ink); }
.bar nav a[aria-current] { color: var(--ink); border-color: var(--pencil); }

/* Film: a picture printed with its rebate and edge numbers */
.film { background: var(--film); padding: 10px 10px 26px; position: relative; }
.film img { width: 100%; height: auto; }
.edge {
  position: absolute; left: 10px; right: 10px; bottom: 6px;
  display: flex; justify-content: space-between; gap: 1em;
  color: var(--edge); font-size: 10px; letter-spacing: .12em; white-space: nowrap; overflow: hidden;
}
.edge .no { position: relative; padding: 0 2px; }
.edge .no::after {
  content: ""; position: absolute; left: -10px; right: -12px; top: -6px; bottom: -5px;
  background: var(--circle) center / 100% 100% no-repeat;
}
.film .edge { overflow: visible; }

/* Threshold */
.threshold .card {
  min-height: 100svh; padding: 28px var(--gut) 32px;
  display: grid; grid-template-rows: auto 1fr auto; gap: 28px;
}
.threshold .top { display: flex; justify-content: space-between; gap: 1em; color: var(--quiet); }
.threshold .middle { display: flex; align-items: center; gap: clamp(28px, 5vw, 72px); }
.threshold .today { flex: 0 1 auto; width: min(60vw, calc((100svh - 300px) * var(--ar)) + 20px); }
.threshold .words { display: flex; flex-direction: column; gap: 20px; max-width: 380px; }
.threshold h1 {
  margin: 0; font-size: clamp(64px, 8vw, 116px); line-height: .9; font-weight: 600; letter-spacing: -.045em;
}
.threshold .line { margin: 0; font-size: 18px; color: #4a463e; }
.threshold .label { color: var(--quiet); margin: 0; }
.threshold .enter {
  align-self: flex-start; margin-top: 8px; font-family: var(--mono); font-size: 14px;
  letter-spacing: .14em; text-transform: uppercase; border-bottom: 2px solid var(--pencil); padding-bottom: 4px;
}
.threshold .enter:hover { color: var(--pencil); }
.strip { background: var(--film); padding: 8px 10px 4px; display: flex; gap: 8px; overflow: hidden; }
.strip a { flex: 0 0 auto; display: flex; flex-direction: column; gap: 4px; }
.strip img { height: 72px; width: auto; }
.strip span { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; color: var(--edge); }
.strip a:hover img { opacity: .8; }
.strip a.on img { outline: 2px solid var(--pencil); outline-offset: 3px; }
.threshold .foot { padding: 0; }

@media (max-width: 760px) {
  .threshold .middle { flex-direction: column; align-items: stretch; }
  .threshold .today { width: 100%; }
  .threshold .top .date { display: none; }
  .strip img { height: 52px; }
}

/* Work */
.worklist { padding: 4svh var(--gut) 8svh; max-width: 900px; }
.worklist .label { color: var(--quiet); margin: 0 0 18px; }
.worklist ul { list-style: none; margin: 0; padding: 0; }
.worklist li a {
  display: grid; grid-template-columns: 132px 1fr auto; gap: 24px; align-items: center;
  padding: 16px 0; border-top: 1px solid var(--rule);
}
.worklist li:last-child a { border-bottom: 1px solid var(--rule); }
.worklist .film { padding: 5px 5px 7px; justify-self: start; }
.worklist .film img { height: 80px; width: auto; max-width: 122px; object-fit: cover; }
.worklist .t { font-size: clamp(24px, 3.4vw, 40px); letter-spacing: -.02em; line-height: 1; }
.worklist .c { font-family: var(--mono); font-size: 13px; color: var(--quiet); }
.worklist li a:hover .t, .worklist li a:hover .c { color: var(--pencil); }
@media (max-width: 560px) {
  .worklist li a { grid-template-columns: 84px 1fr auto; gap: 14px; }
  .worklist .film img { height: 52px; max-width: 76px; }
}

/* One picture per screen */
.frame { margin: 0 auto 6vh; padding: 0 var(--gut); max-width: 1400px; }
.js .viewer .stage {
  height: calc(100svh - var(--bar) - var(--meta)); padding: 0 var(--gut);
  container-type: size;
}
.js .frame { display: none; height: 100%; margin: 0; padding: 0; max-width: none; }
.js .frame.on { display: flex; align-items: center; justify-content: center; }
.js .frame .film { width: min(100cqw, calc((100cqh - 36px) * var(--ar)) + 20px); }
.js .stage.l { cursor: w-resize; }
.js .stage.r { cursor: e-resize; }
.meta {
  display: flex; justify-content: space-between; align-items: center; gap: 1em;
  height: var(--meta); padding: 0 var(--gut); color: var(--quiet);
}
.meta .title { color: var(--ink); }
.meta .ctl { display: flex; gap: 1.6em; align-items: center; }
.meta .ctl button { text-transform: uppercase; letter-spacing: .08em; }
.meta .ctl button:hover, .meta .grid-toggle[aria-pressed="true"] { color: var(--ink); }
.meta .counter { color: var(--ink); min-width: 5.5em; text-align: right; }
.prev, .next, .grid-toggle { display: none; }
.js .prev, .js .next, .js .grid-toggle { display: inline; }
.viewer.gridded .stage { display: none; }
@media (max-width: 560px) { .js .meta .prev, .js .meta .next { display: none; } }

/* Contact sheet: the Index and the Grid toggle */
.sheet {
  background: var(--film); margin: 0 var(--gut) 5vh; padding: 14px 14px 6px;
  display: grid; gap: 4px 12px; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
}
.sheet[hidden] { display: none; }
.sheet a { display: flex; flex-direction: column; gap: 4px; position: relative; }
.sheet .cell { aspect-ratio: 3 / 2; display: flex; align-items: center; justify-content: center; }
.sheet img { max-width: 100%; max-height: 100%; width: auto; height: auto; }
.sheet .n { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; color: var(--edge); padding-bottom: 6px; }
.sheet a::after {
  content: ""; position: absolute; inset: -10px -12px 4px -12px; pointer-events: none;
  background: var(--circle) center / 100% 100% no-repeat; opacity: 0; transition: opacity .12s;
}
.sheet a:hover::after, .sheet a:focus-visible::after { opacity: 1; }
@media (min-width: 900px) {
  .sheet { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 6px 16px; padding: 18px 18px 8px; }
}
.index section h2 {
  display: flex; align-items: baseline; gap: 14px; margin: 0; padding: 4vh var(--gut) 14px;
  font-size: clamp(22px, 2.6vw, 30px); font-weight: 400; letter-spacing: -.02em;
}
.index section h2 span { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; color: var(--quiet); }
.index section h2 a:hover { color: var(--pencil); }
.index .lede { padding: 2vh var(--gut) 0; color: var(--quiet); margin: 0; }
.viewer .set-grid { margin-top: 8px; }

.foot { padding: 4vh var(--gut); color: var(--quiet); font-family: var(--mono); font-size: 12px; letter-spacing: .06em; }
.foot a { border-bottom: 1px solid var(--rule); }
.lost { padding: 20svh var(--gut); text-align: center; color: var(--quiet); }
.lost a { color: var(--ink); border-bottom: 2px solid var(--pencil); }
