/* DEPLOY_MARKER: 2026-02-02-tiles-fix */

/* =========================
   Base / Reset
   ========================= */

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden; /* hard stop for sideways scrolling */
}

body {
  font-family: sans-serif;
  line-height: 1.5;
  color: #333;
}

/* =========================
   Layout
   ========================= */

main {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 12px; /* keeps content off the screen edge */
}

/* =========================
   Site Navigation
   ========================= */

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid #ddd;
  margin-bottom: 16px;
}

.site-nav a {
  font-family: inherit;
  font-size: inherit;
  font-weight: 500;
  text-decoration: none;
  color: #333;
  white-space: nowrap;
}

.site-nav a:hover {
  text-decoration: underline;
}

.site-nav a.active {
  font-weight: 700;
  text-decoration: underline;
}

/* =========================
   Headings
   ========================= */

h1 {
  margin: 0 0 0.75rem 0;
}

h2 {
  margin: 0;
}

/* =========================
   Photos Jump Menu (top of photos.html)
   - Matches main nav font/feel (links)
   ========================= */

.jump-menu {
  margin: 0.25rem 0 1rem 0;
}

.jump-menu a {
  font-family: inherit;
  font-size: inherit;
  font-weight: 500;
  color: #333;
  text-decoration: underline;
  margin-right: 12px;
  white-space: nowrap;
}

.jump-menu a:hover {
  text-decoration: underline;
}

/* When clicking a jump link, keep section heading visible
   (adjust if your header height changes) */
.photo-section {
  scroll-margin-top: 80px;
}

/* =========================
   Photo Sections (categories/folders)
   ========================= */

.photo-section {
  margin: 24px 0;
  padding-top: 16px;
  border-top: 1px solid #ddd;
}

.photo-meta {
  margin: 4px 0 12px 0;
  font-size: 0.95rem;
  opacity: 0.8;
}

/* =========================
   Photo Grid (tiled + responsive)
   - No sideways scroll
   ========================= */

.photo-grid {
  display: grid;
  gap: 12px;

  /* tiled layout that adapts to screen width */
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

/* Tile wrapper becomes positioning context for overlay */
.photo-tile {
  position: relative;
  display: block;
  width: 100%;
}

/* Images always fit their tile */
.photo-grid img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

/* =========================
   Date Overlay
   ========================= */

.photo-date {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 2px 6px;
  font-size: 0.85rem;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  pointer-events: none; /* clicks go through to the image link */
}

/* =========================
   General link behavior
   ========================= */

/* Let links inherit text color by default (site style choice) */
a {
  color: inherit;
}
