* { box-sizing: border-box; }

body {
  margin: 0;
  background: #fff;
  color: #222;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.7;
}

a { color: #1f6fb5; }

/* top bar */
.topbar {
  background: #111;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
}
.topbar a { color: #fff; text-decoration: none; }
.topbar .site-name { font-size: 18px; }
.topbar nav a { margin-left: 18px; font-size: 14px; color: #ccc; }
.topbar nav a:hover { color: #fff; }

main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

hr { border: 0; border-top: 1px solid #ddd; margin: 40px 0; }

/* home */
.intro {
  display: flex;
  align-items: center;
  gap: 40px;
  justify-content: center;
}
.intro-art { width: 260px; max-width: 40%; }
.intro-text { text-align: center; }
.intro-text h1 { color: #1f6fb5; font-weight: 600; margin: 0 0 8px; }

.big-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}
.big-buttons img { width: 520px; max-width: 100%; transition: transform .15s; }
.big-buttons a:hover img { transform: scale(1.03); }

/* gallery: year cards */
.year-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 32px;
}
.year-card { text-decoration: none; color: #111; text-align: center; }
.year-card img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
}
.year-card span {
  display: inline-block;
  margin-top: 10px;
  font-size: 22px;
  font-weight: 600;
  text-decoration: underline;
}

/* gallery: one year's photodump */
.year-title { text-align: center; color: #1f6fb5; font-weight: 600; }
.dump {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 20px;
}
.thumb img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: contain;
  display: block;
  transition: transform .15s;
}
.thumb:hover img { transform: scale(1.04); }
.thumb { position: relative; display: block; }

/* badges on thumbnails: 🗨 = has commentary, ✎ = has a sketch */
.badges {
  position: absolute;
  right: 6px;
  bottom: 6px;
  display: flex;
  gap: 6px;
}
.badge {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #fff;
  border: 1.5px solid #222;
  color: #222;
  font-size: 17px;
  line-height: 27px;
  text-align: center;
  cursor: help;
}
.note-badge { font-size: 15px; }

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}
.lightbox[hidden] { display: none; }

.lb-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
}
.lb-stage { position: relative; line-height: 0; }
#lb-final { max-width: 92vw; max-height: 88vh; display: block; }
.lightbox.has-note #lb-final { max-width: calc(92vw - 380px); }

/* commentary panel beside the picture */
.lb-note {
  width: 320px;
  max-height: 80vh;
  overflow-y: auto;
  font-size: 15px;
  line-height: 1.8;
  white-space: pre-wrap;
  color: #333;
  cursor: auto;
  padding-left: 24px;
  border-left: 1px solid #ddd;
}
.lb-note[hidden] { display: none; }

/* the sketch sits on top and gets "drawn" across with a wipe */
#lb-sketch {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.9s ease-in-out;
}
.lightbox.sketching #lb-sketch { clip-path: inset(0 0 0 0); }

.lb-pencil {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid #222;
  background: #fff;
  color: #222;
  font-size: 26px;
  cursor: pointer;
}
.lb-pencil[hidden] { display: none; }
.lightbox.sketching .lb-pencil { background: #222; color: #fff; }

/* blog */
.page-title { text-align: center; color: #1f6fb5; font-weight: 600; }
.post-list { list-style: none; padding: 0; max-width: 640px; margin: 0 auto; }
.post-list li { padding: 10px 0; border-bottom: 1px solid #eee; }
.post-list .date { color: #888; margin-right: 16px; font-variant-numeric: tabular-nums; }

.post { max-width: 680px; margin: 0 auto; }
.post img { max-width: 100%; }
.post .date { color: #888; margin-top: -12px; }
.back { text-align: center; margin-top: 48px; }

/* phones */
@media (max-width: 600px) {
  .intro { flex-direction: column; gap: 16px; }
  .intro-art { max-width: 70%; }
  .year-cards { grid-template-columns: 1fr; }
  .dump { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .topbar nav a { margin-left: 12px; }

  /* phones: commentary goes under the picture */
  .lb-inner { flex-direction: column; gap: 16px; }
  .lightbox.has-note #lb-final { max-width: 92vw; max-height: 55vh; }
  .lb-note {
    width: 90vw;
    max-height: 25vh;
    padding-left: 0;
    padding-top: 12px;
    border-left: 0;
    border-top: 1px solid #ddd;
  }
}
