/* Basic reset and theme */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: #0f172a;
  background: #000;
  line-height: 1.6;
  /* center the images in a row */
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap; /* wrap on small screens */
  min-height: 100vh;
  gap: 1rem; /* spacing between images */
  padding: 1rem;
}

/* Make the header span the full width at the top and set text to white */
header {
  flex-basis: 100%; /* occupy the first row in the flex container */
  width: 100%;
  text-align: center;
  padding: 1rem 0;
}

header h1 {
  margin: 0;
  color: #fff;
}

/* Layout */
.site-header {
  max-width: 960px;
  margin: 2rem auto 1rem;
  padding: 0 1rem;
}
.site-header h1 {
  margin: 0 0 .25rem;
  font-size: 2rem;
}
.site-header .tagline { color: #475569; margin: 0; }

main { max-width: 960px; margin: 0 auto; padding: 0 1rem 3rem; }

.gallery { margin-top: 1rem; }

.link-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.link-grid li a {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  text-decoration: none;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: .75rem;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.link-grid li a:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(2,6,23,0.08);
  border-color: #cbd5e1;
}

.thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  background-size: cover;
  background-position: center;
  background-color: #e2e8f0;
}

.label {
  padding: 0 0.75rem 0.75rem;
  color: #0f172a;
  font-weight: 600;
}

.instructions { margin-top: 2rem; }
.instructions h2 { margin: 0 0 .5rem; }
.instructions ol { margin: .25rem 0 0 1.25rem; }
.instructions code {
  background: #e2e8f0;
  padding: .05rem .35rem;
  border-radius: .35rem;
  font-size: .95em;
}

.site-footer {
  max-width: 960px;
  margin: 2rem auto;
  padding: 0 1rem 2rem;
  color: #64748b;
}

body > img {
  /* uniform 900px width (responsive down to viewport), consistent 3:2 frame */
  width: min(900px, 90vw);
  aspect-ratio: 3 / 2;
  object-fit: cover; /* crop to fill the 3:2 frame */
  display: block;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(2,6,23,0.08);
}
