/* Recreation of the Cargo "Escher / counterform" layout */
:root {
  --text: #444;
  --muted: #999;
  --light: #ccc;
  --faint: #d1d1d1;
  --bg: #fff;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 12px/18px Arial, Helvetica, sans-serif;
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

.site-header { text-align: center; }
.site-header img { margin: 0 auto; }

#content { max-width: 974px; margin: 0 auto; padding: 20px 16px 0; }

/* ---- index grid ---- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 200px));
  gap: 22px 35px;
  justify-content: center;
}
.thumb { display: block; color: var(--light); font-size: 10px; line-height: 15px; }
.thumb img { width: 100%; aspect-ratio: 200 / 134; object-fit: cover; transition: opacity .15s; }
.thumb:hover { text-decoration: none; color: var(--text); }
.thumb:hover img { opacity: .8; }
.thumb span { display: block; margin-top: 2px; }

/* ---- project detail ---- */
.project { margin-bottom: 50px; }
.project-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-bottom: 15px; }
.project-head h1 { margin: 0; font-weight: normal; font-size: 18px; line-height: 27px; color: var(--faint); }
.index-link { color: var(--faint); padding: 2px 6px; }
.project-body { margin-left: 10px; }
.description { margin-top: 18px; max-width: 560px; }
.description a { text-decoration: underline; }
.project-meta { margin: 30px 0 0 10px; font-size: 11px; color: var(--muted); }

.slides { position: relative; aspect-ratio: 950 / 390; cursor: pointer; }
.slides img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .6s ease; }
.slides img.active { opacity: 1; z-index: 1; }

.slide-thumbs { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.slide-thumbs button { border: 0; padding: 0; background: none; cursor: pointer; opacity: .5; transition: opacity .15s; }
.slide-thumbs button.active, .slide-thumbs button:hover { opacity: 1; }
.slide-thumbs img { width: 219px; max-width: 22vw; aspect-ratio: 950 / 390; object-fit: cover; }

.slide-nav { margin-top: 6px; font-size: 11px; line-height: 16.5px; color: var(--muted); }
.slide-nav a { color: var(--text); }

.notfound { text-align: center; margin: 0 0 30px; }

/* ---- footer ---- */
.site-footer {
  max-width: 951px;
  margin: 60px auto 0;
  padding: 14px 16px 0;
  border-top: 1px solid var(--light);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 40px;
  color: var(--faint);
}
.footer-col p { margin: 6px 0 0; }
.footer-col .icons { display: flex; gap: 4px; margin-top: 6px; }
.copyright { text-align: right; font-size: 8px; color: var(--faint); padding: 30px 16px 16px; }

@media (max-width: 520px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .project-body, .project-meta { margin-left: 0; }
  .site-footer { justify-content: flex-start; }
}
