@font-face {
  font-family: "Jost";
  src: url("fonts/Jost-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DM Mono";
  src: url("fonts/DMMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DM Mono";
  src: url("fonts/DMMono-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --ground: #fafaf7;
  --ground-raised: #ffffff;
  --ground-sunken: #f1f1ec;
  --rule: #e3e3dd;
  --ink: #0a0a0a;
  --ink-2: #3d3d39;
  --ink-3: #6a6a64;
  --font-sans: Jost, "Futura PT", Futura, "Century Gothic", system-ui, sans-serif;
  --font-mono: "DM Mono", ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: light;
}

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

html,
body { height: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 30px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

::selection { background: #e2f3f8; color: var(--ink); }

a { color: inherit; }

img,
video,
iframe { border-radius: 0; }

.top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding: 16px 16px 14px;
  border-bottom: 1px solid var(--rule);
}

.tools {
  display: flex;
  align-items: baseline;
  gap: 20px;
  margin-left: auto;
}

.sort {
  display: flex;
  gap: 16px;
}

.sort button {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 20px;
  cursor: pointer;
}

.sort button[aria-pressed="true"] { color: var(--ink); }

.top h1 {
  margin: 0;
  font-size: 22px;
  line-height: 28px;
  font-weight: 500;
  letter-spacing: 0;
}

.count {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 20px;
  color: var(--ink-3);
}

#app { min-height: calc(100vh - 59px); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  min-height: calc(100vh - 59px);
}

.cell {
  display: block;
  min-height: 280px;
  color: inherit;
  text-decoration: none;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
}

.cell:hover { background: var(--ground-raised); }

.cell:focus-visible,
.back:focus-visible,
.links a:focus-visible,
.sort button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: -2px;
}

.cell figure { margin: 0; }

.still {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 62vh;
  background: var(--ground-sunken);
  overflow: hidden;
}

.still img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cell figcaption { padding: 14px 16px 18px; }

.cell h2 {
  margin: 0;
  font-size: 20px;
  line-height: 28px;
  font-weight: 500;
  letter-spacing: 0;
}

.host,
.mark {
  margin: 4px 0 0;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 20px;
  color: var(--ink-3);
}

.project .mark {
  margin: 0 0 12px;
  color: var(--ink-2);
}

.empty { padding: 72px 16px; max-width: 36rem; }

.empty-title {
  margin: 0;
  font-size: 28px;
  line-height: 36px;
  font-weight: 500;
}

.empty-hint {
  margin: 12px 0 0;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 20px;
  color: var(--ink-2);
}

.project { padding: 28px 28px 96px; }

.back {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 20px;
  text-decoration: none;
}

.back:hover { text-decoration: underline; }

.project h2 {
  margin: 18px 0 8px;
  max-width: 22em;
  font-size: 40px;
  line-height: 48px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.description {
  margin: 0;
  max-width: 40rem;
  font-size: 21px;
  line-height: 34px;
}

.links {
  display: grid;
  gap: 6px;
  margin: 20px 0 28px;
}

.links a {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 20px;
  word-break: break-all;
}

.project iframe {
  display: block;
  width: 100%;
  height: 80vh;
  min-height: 480px;
  margin: 0 0 12px;
  border: 1px solid var(--rule);
  border-radius: 0;
  background: var(--ground-raised);
}

.plate {
  display: block;
  width: 100%;
  height: auto;
  margin: 28px 0 0;
  border-radius: 0;
}

video.plate { background: var(--ink); }

@media (max-width: 640px) {
  .project { padding: 20px 16px 64px; }
  .project h2 { font-size: 32px; line-height: 40px; }
  .project iframe { height: 70vh; min-height: 320px; }
  .grid { grid-template-columns: 1fr; }
}
