/* Self-hosted font (SIL OFL) — no third-party requests. See fonts/NOTICE.txt */
@font-face { font-family:"Courier Prime"; src:url("/fonts/courier-prime.woff2") format("woff2");      font-weight:400; font-style:normal; font-display:swap; }
@font-face { font-family:"Courier Prime"; src:url("/fonts/courier-prime-bold.woff2") format("woff2"); font-weight:700; font-style:normal; font-display:swap; }

:root {
  --maxw: 1120px;

  /* Slate palette (soft dark gray) */
  --bg:#1f2125; --fg:#e7e7e9; --muted:#9fa0a6; --line:#34363b;
  --accent:#e7e7e9; --chip:#2a2c31;

  /* Courier Prime (typewriter) */
  --font: "Courier Prime", "Courier New", ui-monospace, monospace;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--font);
  line-height: 1.55; font-size: 17px;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 2px; }
button { font: inherit; cursor: pointer; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { padding-top: 36px; padding-bottom: 24px; }
.site-title { font-family: var(--font); font-size: 1.6rem; font-weight: 600;
  letter-spacing: -0.01em; text-decoration: none; color: var(--fg); }
.site-tagline { margin: 4px 0 0; color: var(--muted); font-size: 0.95rem; }

/* Header nav (about | license), top-right */
.site-header .wrap { position: relative; }
.site-nav { position: absolute; top: 42px; right: 20px; font-size: 0.85rem; white-space: nowrap; }
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover { color: var(--fg); text-decoration: underline; }
.site-nav .sep { color: var(--line); margin: 0 7px; }
@media (max-width: 520px) {
  .site-nav { position: static; margin-top: 10px; }
}

/* One-shot yellow highlight when you jump to a section */
@keyframes flash-hl { 0% { background-color: #ffe066; } 100% { background-color: transparent; } }
.flash { animation: flash-hl 1.5s ease-out; border-radius: 6px; }
.site-footer p { margin: 0 0 8px; }
.site-footer p:last-child { margin-bottom: 0; }

/* Home: index (tags + albums) */
.home-index { padding: 22px 0 10px; border-bottom: 1px solid var(--line); }
.idx-row { display: flex; gap: 14px; align-items: baseline; padding: 6px 0; }
.idx-label { flex: 0 0 60px; color: var(--muted); font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.08em; padding-top: 3px; }
.idx-items { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: baseline; }
.idx-tag, .idx-album { color: var(--fg); text-decoration: none; font-size: 0.95rem; }
.idx-tag:hover, .idx-album:hover, .idx-all:hover { text-decoration: underline; }
.idx-tag.active { font-weight: 650; }
.idx-tag::before { content: "#"; color: var(--muted); }
.idx-all { color: var(--muted); font-size: 0.85rem; text-decoration: none; }
.idx-empty { color: var(--muted); }
.filter-note { padding: 14px 0 0; color: var(--muted); font-size: 0.9rem; }

/* Home: expanded album feed */
.feed-album { padding: 26px 0; border-bottom: 1px solid var(--line); }
.feed-album:last-child { border-bottom: 0; }
.feed-album .photos { padding: 0; }
.feed-head { margin-bottom: 14px; }
.feed-head h2 { font-family: var(--font); font-size: 1.35rem; font-weight: 600;
  margin: 0; letter-spacing: -0.01em; }
.feed-head h2 a { color: var(--fg); text-decoration: none; }
.feed-head h2 a:hover { text-decoration: underline; }
.feed-head .meta { color: var(--muted); font-size: 0.88rem; margin-top: 3px; }

/* About */
.about { padding: 30px 0 64px; max-width: 640px; }
.about h2 { font-family: var(--font); font-size: 1.05rem; font-weight: 600; margin: 0 0 6px; }
.about p { color: var(--muted); margin: 0; }

/* Index pages (all tags / all albums) */
.index-list { list-style: none; padding: 0; margin: 16px 0 64px; }
.index-list li { display: flex; justify-content: space-between; gap: 16px;
  align-items: baseline; padding: 11px 0; border-bottom: 1px solid var(--line); }
.index-list a { color: var(--fg); text-decoration: none; }
.index-list a:hover { text-decoration: underline; }
.muted { color: var(--muted); font-size: 0.85rem; }

/* Grids */
.grid { display: grid; gap: 18px; padding: 18px 0 64px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.card { text-decoration: none; color: inherit; display: block; }
.card .cover, .card .noimg {
  width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 6px;
  background: var(--line); }
.card-title { font-weight: 550; margin-top: 8px; }
.card-sub { color: var(--muted); font-size: 0.85rem; }
.card:hover .cover { opacity: 0.92; }

/* Photo grid. A real CSS grid (not columns) so photos read LEFT-TO-RIGHT, row by
   row — matching the array order the lightbox arrows step through. Every cell is
   one landscape 3:2 tile; a portrait tile spans TWO rows so a vertical lines up
   with two stacked horizontals. Rows all share one height, so everything aligns.
   --cell is the computed column width (container minus gaps, divided by columns),
   used to set the row height to exactly 2/3 of the width (3:2). */
.photos {
  --cols: 3;
  --gap: 14px;
  --content: min(var(--maxw), 100vw - 40px);
  --cell: calc((var(--content) - (var(--cols) - 1) * var(--gap)) / var(--cols));
  display: grid;
  grid-template-columns: repeat(var(--cols), 1fr);
  grid-auto-rows: calc(var(--cell) * 2 / 3);
  gap: var(--gap);
  padding: 18px 0 64px;
}
.photos button { border: 0; background: none; padding: 0; margin: 0;
  display: block; width: 100%; height: 100%; }
.photos img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.photos .portrait { grid-row: span 2; }
@media (max-width: 760px) { .photos { --cols: 2; } }

.crumbs { padding-top: 22px; color: var(--muted); font-size: 0.9rem; }
.crumbs a { color: var(--muted); text-decoration: none; }
.album-head { padding: 6px 0 0; }
.album-head h1 { font-family: var(--font); margin: 2px 0; font-size: 1.9rem;
  font-weight: 600; letter-spacing: -0.01em; }
.album-head .meta { color: var(--muted); font-size: 0.9rem; }

.empty { padding: 48px 0; color: var(--muted); }
.site-footer { border-top: 1px solid var(--line); color: var(--muted);
  font-size: 0.85rem; }
.site-footer .wrap { padding: 20px; }
.site-footer a { color: var(--muted); }

/* Lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,0.94);
  display: none; align-items: center; justify-content: center; z-index: 50; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 94vw; max-height: 90vh; width: auto; border-radius: 4px; }
.lb-btn { position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.12); color: #fff; border: 0; border-radius: 50%;
  width: 48px; height: 48px; font-size: 1.5rem; }
.lb-prev { left: 16px; } .lb-next { right: 16px; }
.lb-close { position: absolute; top: 14px; right: 16px; background: none;
  color: #fff; border: 0; font-size: 2rem; line-height: 1; }
.lb-count { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center;
  color: rgba(255,255,255,0.7); font-size: 0.85rem; }
