/* ── reset & base ── */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0; padding: 24px;
  font-family: "Inter", "SF Pro Text", system-ui, -apple-system, sans-serif;
  font-size: 15px; line-height: 1.6;
  background: #0e0e0e; color: #c8c8c8;
  -webkit-font-smoothing: antialiased;
}
a { color: #7db8e0; text-decoration: none; transition: color 0.15s; }
a:hover { color: #aed4f0; }
h1 { font-size: 1.5em; font-weight: 500; letter-spacing: -0.01em; margin: 0 0 4px; }
h2 { font-size: 1.1em; font-weight: 500; color: #999; margin: 0 0 8px; }
.subtitle { font-size: 0.88em; color: #777; margin-bottom: 24px; line-height: 1.5; }
.subtitle a { color: #888; }
.subtitle a:hover { color: #aaa; }

/* ── photo grid ── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 3px;
}
.grid a {
  display: block; aspect-ratio: 1; overflow: hidden;
  border-radius: 2px; position: relative;
}
.grid img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.25s ease, filter 0.25s ease;
}
.grid a:hover img { transform: scale(1.05); filter: brightness(1.15); }
.grid .video-badge::after {
  content: "\25B6"; position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  color: rgba(255,255,255,0.9); font-size: 1.8em;
  text-shadow: 0 1px 6px rgba(0,0,0,0.6); pointer-events: none;
}

/* ── tag pills ── */
.tags { margin: 12px 0; display: flex; flex-wrap: wrap; gap: 4px; }
.tags a {
  display: inline-block; background: #1a1a1a; padding: 3px 10px;
  border-radius: 12px; font-size: 0.82em; color: #aaa;
  border: 1px solid #2a2a2a; transition: background 0.15s, color 0.15s;
}
.tags a:hover { background: #252525; color: #ddd; border-color: #3a3a3a; }

/* ── year sections on index ── */
.year-section { margin-bottom: 36px; }
.year-header {
  font-size: 1.05em; font-weight: 500; color: #888;
  margin: 0 0 10px; padding: 10px 0 6px;
  border-bottom: 1px solid #222;
  position: sticky; top: 0; background: #0e0e0e; z-index: 10;
}
.year-header span { font-size: 0.75em; color: #555; font-weight: 400; margin-left: 6px; }

/* ── table of contents ── */
.toc { margin-bottom: 24px; font-size: 0.88em; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.toc a { color: #666; }
.toc a:hover { color: #aaa; }

/* ── photo page ── */
.photo-page { max-width: 1200px; margin: 0 auto; }
.nav {
  margin-bottom: 20px; padding-bottom: 12px;
  border-bottom: 1px solid #1a1a1a;
  font-size: 0.88em; display: flex; gap: 16px; flex-wrap: wrap;
}
.nav a { color: #666; }
.nav a:hover { color: #aaa; }
.date { color: #666; font-size: 0.88em; margin-top: 2px; }
.media { margin: 20px 0; }
.media img {
  max-width: 100%; max-height: 82vh; display: block;
  border-radius: 3px;
}
.media video {
  max-width: 100%; max-height: 82vh; display: block;
  border-radius: 3px;
}
.description { margin: 16px 0; line-height: 1.65; color: #b0b0b0; }
.comments { margin-top: 24px; }
.comments > strong { font-size: 0.9em; color: #888; font-weight: 500; }
.comment {
  background: #161616; padding: 10px 14px; margin: 8px 0;
  border-radius: 6px; font-size: 0.88em; line-height: 1.5;
  border-left: 2px solid #2a2a2a;
}
.comment .comment-date { color: #555; font-size: 0.82em; margin-top: 4px; }
.notes { margin-top: 12px; font-size: 0.85em; color: #888; line-height: 1.5; }
.meta { font-size: 0.82em; color: #555; margin-top: 20px; line-height: 1.6; }
.meta a { color: #666; }
.meta a:hover { color: #999; }
.original-link { font-size: 0.82em; margin-top: 10px; }
.original-link a { color: #666; }
.original-link a:hover { color: #999; }
.stats {
  font-size: 0.82em; color: #555; margin-top: 32px;
  padding-top: 16px; border-top: 1px solid #1a1a1a;
}

/* ── tag index ── */
.tag-list { line-height: 2.2; }
.tag-list a {
  display: inline-block; background: #161616; padding: 3px 12px; margin: 3px;
  border-radius: 12px; color: #aaa;
  border: 1px solid #222; transition: background 0.15s, color 0.15s;
}
.tag-list a:hover { background: #1e1e1e; color: #ddd; border-color: #333; }
.tag-list .count { color: #555; font-size: 0.82em; }

/* ── search ── */
.search-box { margin-bottom: 24px; }
.search-box input {
  width: 100%; max-width: 420px; padding: 10px 14px; font-size: 0.95em;
  background: #161616; color: #c8c8c8; border: 1px solid #2a2a2a; border-radius: 8px;
  font-family: inherit; transition: border-color 0.15s;
}
.search-box input::placeholder { color: #555; }
.search-box input:focus { outline: none; border-color: #4a7a9a; }
#search-results { margin-bottom: 24px; }
#search-results .result-count { font-size: 0.82em; color: #666; margin-bottom: 10px; }

/* ── responsive ── */
@media (max-width: 640px) {
  body { padding: 14px; }
  h1 { font-size: 1.3em; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 2px; }
  .toc { gap: 2px 10px; font-size: 0.82em; }
  .nav { gap: 10px; font-size: 0.82em; }
  .search-box input { max-width: 100%; }
  .media img, .media video { max-height: 60vh; }
}
@media (min-width: 1400px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}
