/* Jayme Miller — film photography portfolio */

@font-face {
  font-family: "Riccione";
  src: url("/fonts/Riccione-Light.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #000;
  --text: #212121;
  --muted: #bdbdbd;
  /* The header is drawn in white with mix-blend-mode: difference, so it reads
     black over the white page and inverts over photos as they scroll under it.
     #424242 here shows up as the light grey #bdbdbd on white. */
  --header-muted: #424242;
  --header-h: 56px;
  /* 1 layout unit = 1px at 1280px wide, scales down on smaller screens */
  --u: calc(min(100vw, 1280px) / 1280);
}

* { box-sizing: border-box; }

html, body { margin: 0; background: #fff; }

body {
  font-family: "Riccione", Georgia, "Times New Roman", serif;
  color: var(--text);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px 0 27px;
  background: transparent;
  color: #fff;
  mix-blend-mode: difference;
  pointer-events: none;           /* let clicks pass through the empty bar... */
}
.site-header a { pointer-events: auto; }  /* ...but keep the links clickable */
.site-title {
  font-size: 30px;
  letter-spacing: 0.5px;
  color: inherit;
  line-height: 1;
}
.site-header nav { display: flex; }
.site-header nav a {
  font-size: 24px;
  line-height: 1;
  padding: 0 17px;
  color: inherit;
  transition: color .2s;
}
.site-header nav a:last-child { padding-right: 0; }
.site-header nav a:hover,
.site-header nav a[aria-current="page"] { color: var(--header-muted); }

/* Gallery — scattered layout matching the original site */
.gallery {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  height: calc(var(--canvas-h) * var(--u));
}
.gallery figure {
  position: absolute;
  margin: 0;
  left: calc(var(--x) * var(--u));
  top: calc(var(--y) * var(--u));
  width: calc(var(--w) * var(--u));
  aspect-ratio: var(--w) / var(--h);
}
.gallery img,
.info-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Info — photo centred in the window, copyright pinned bottom-left */
.page-info {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
.page-info main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.info { width: 100%; display: flex; justify-content: center; }
.info-card {
  position: relative;
  margin: 0;
  /* as large as fits: up to 460px wide, never taller than the window allows */
  width: min(460px, 100%, calc((100dvh - 160px) * 367 / 553));
  aspect-ratio: 367 / 553;
  container-type: inline-size;
}
.info-card figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 12.7%;
  text-align: center;
  color: #fff;
  font-size: clamp(16px, 6cqw, 26px);
  line-height: 1.5;
}
.info-card p { margin: 0 0 1.5em; }
.info-card p:last-child { margin: 0; }
.info-card a { text-decoration: underline; text-underline-offset: 3px; }

/* Footer */
.site-footer { padding: 24px 27px 18px; font-size: 14px; color: var(--text); }

/* Phones: stack the photos in a single column */
@media (max-width: 767px) {
  :root { --header-h: 52px; }
  .site-header { padding: 0 16px; }
  .site-title { font-size: 22px; letter-spacing: 1px; }
  .site-header nav a { font-size: 17px; padding: 0 0 0 16px; }
  .gallery {
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding: 12px 16px 0;
  }
  .gallery figure { position: static; width: 100%; }
  .site-footer { padding: 32px 16px 18px; }
}
