:root {
  --bg: #252525;
  --bg-tint: #1f1c1c;
  --fg: #e8e8e8;
  --muted: #bbb;
  --serif: Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
}

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

/* Header: site title on its own line, nav below it */
.site-header {
  flex: 0 0 auto;
  padding: 0.9rem 1.5rem 0.8rem;
  border-bottom: 1px solid #333;
}

.site-title {
  display: block;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  margin-bottom: 0.55rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 1.1rem;
  row-gap: 0.4rem;
  /* Shrinks with the viewport so the nav overflows as late as possible,
     then wraps instead of scrolling. */
  font-size: clamp(0.58rem, 0.45rem + 0.5vw, 0.72rem);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.site-nav a {
  color: var(--muted);
  white-space: nowrap;
  transition: color 0.15s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: #fff;
}

/* Gallery: horizontal strip */
main {
  flex: 1 1 auto;
  min-height: 0;
}

.photos {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  overflow-x: auto;
  height: 100%;
  padding: 0 2rem;
  scrollbar-width: thin;
}

.photos:focus { outline: none; }

.photo {
  flex: 0 0 auto;
  margin: 0;
  /* Relative to the photo strip, so a taller (wrapped) header never
     pushes images past the bottom of the viewport. */
  height: 84%;
  max-height: 900px;
}

.photo img {
  display: block;
  height: 100%;
  width: auto;
  max-width: none;
}

.photo img.lazy {
  background: var(--bg-tint);
}

/* No-JS fallback mirrors the JS layout */
.photos-noscript {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  overflow-x: auto;
  height: 100%;
  padding: 0 2rem;
}

/* 404 */
.notfound {
  padding: 3rem 2rem;
}
.notfound h1 {
  font-family: var(--serif);
  font-weight: 400;
}
.notfound a { color: var(--muted); }
.notfound a:hover { color: #fff; }

