:root {
  color-scheme:dark;
  --bg:#080808;
  --fg:#eee;
  --muted:#969696;
  --sans:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif;
}
* {
  box-sizing:border-box;
}
body {
  margin:0;
  background:var(--bg);
  color:var(--fg);
  font:16px/1.6 var(--sans);
  -webkit-font-smoothing:antialiased;
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
}
a {
  color:inherit;
  text-underline-offset:.25em;
}
a:hover {
  color:var(--muted);
}
a:focus-visible,button:focus-visible {
  outline:3px solid #488bcc;
  outline-offset:5px;
}
header,main {
  max-width:1800px;
  margin:auto;
  padding:24px;
}
h1 {
  font-size:1.5rem;
  line-height:1.25;
  letter-spacing:-.025em;
  margin:12px 0 32px;
}
h2,h3 {
  letter-spacing:-.015em;
}
.gallery {
  columns:1;
  column-gap:8px;
}
/* Columns preserve DOM and keyboard order: newest first, down each column. */
.photo-card {
  display:block;
  position:relative;
  margin:0 0 8px;
  break-inside:avoid;
  line-height:0;
  overflow:hidden;
}
.photo-card picture,.full-photo picture {
  display:contents;
}
.photo-card img {
  display:block;
  width:100%;
  height:auto;
}
.overlay {
  position:absolute;
  inset:0;
  display:flex;
  flex-direction:column;
  justify-content:end;
  padding:24px;
  background:linear-gradient(transparent 50%,#0009);
  color:#fff;
  line-height:1.5;
  font-size:.85rem;
  opacity:0;
  transition:opacity .15s;
}
.photo-card:hover .overlay,.photo-card:focus-visible .overlay {
  opacity:1;
}
.archive-year ul {
  display:flex;
  flex-wrap:wrap;
  list-style:none;
  padding:0;
  gap:12px 24px;
}
.muted {
  color:var(--muted);
}
.muted {
  font-size:.8rem;
  margin-left:6px;
}
nav {
  display:flex;
  gap:24px;
  flex-wrap:wrap;
  margin-block:32px;
}
.full-photo {
  display:block;
  text-align:center;
  padding-block:8px;
}
.full-photo img {
  display:block;
  width:auto;
  height:auto;
  max-width:100%;
  max-height:calc(100dvh - 16px);
  margin-inline:auto;
}
.photo-page nav {
  justify-content:center;
}
.photo-view {
  height:100vh;
  height:100dvh;
  overflow:hidden;
}
.photo-view main {
  width:100%;
  max-width:none;
  height:100%;
  margin:0;
  padding:0;
}
.photo-view .photo-page,.photo-view .full-photo {
  width:100%;
  height:100%;
}
.photo-view .full-photo {
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0;
}
.photo-view .full-photo img {
  max-width:100%;
  max-height:100%;
}
.photo-view nav[hidden] {
  display:none;
}
.skip {
  position:fixed;
  top:-100px;
  left:20px;
  background:var(--bg);
  padding:12px;
  z-index:9999;
}
.skip:focus {
  top:10px;
}
.sr-only {
  position:absolute;
  width:1px;
  height:1px;
  overflow:hidden;
  clip-path:inset(50%);
}
.pswp {
  --pswp-bg:var(--bg);
}
.pswp__top-bar {
  display:none;
}
@media(min-width:640px) {
  .gallery {
    columns:2;
  }
}
@media(min-width:1024px) {
  .gallery {
    columns:3;
  }
}
@media(min-width:1360px) {
  .gallery {
    columns:4;
  }
}
@media(min-width:1680px) {
  .gallery {
    columns:5;
  }
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after {
    scroll-behavior:auto!important;
    transition:none!important;
  }
}
/* A subtle frame follows each photograph, including the enlarged views. */
.photo-card,.photo-card .overlay {
  border-radius:3px;
}
.photo-card img,.full-photo img,.pswp__img {
  border:1px solid #1a1a1a;
  border-radius:3px;
}
h1,h2,h3,h4,h5,h6 {
  font-family:var(--sans);
  font-weight:400;
  font-style:normal;
  font-kerning:normal;
  text-wrap:balance;
}
.site-header {
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  gap:24px;
  width:100%;
  max-width:1800px;
  padding:clamp(24px,5vh,48px) 24px 16px;
}
.site-header a {
  font-family:var(--sans);
  font-size:1.25rem;
  line-height:1.5;
  font-weight:500;
  letter-spacing:0;
  text-decoration:none;
}
/* /archive: a calendar per year, one square per day, filled when a photo was
   posted. Months reflow 3 → 4 → 6 → 12 across; squares scale with the width. */
.calendar-year {
  margin:0 0 56px;
}
.calendar-year h2 {
  font-size:.875rem;
  font-weight:500;
  font-variant-numeric:tabular-nums;
  margin:0 0 20px;
}
.calendar-year h2 span {
  color:var(--muted);
  font-weight:400;
  margin-left:8px;
}
.months {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:24px 16px;
  align-items:start;
}
.month h3 {
  font-size:.75rem;
  color:var(--muted);
  margin:0 0 8px;
}
.days {
  display:grid;
  grid-template-columns:repeat(7,minmax(0,1fr));
  gap:2px;
}
.days>* {
  aspect-ratio:1;
  border-radius:2px;
  background:#1c1c1c;
}
.days a {
  background:var(--fg);
}
.days a:hover,.days a:focus-visible {
  background:var(--muted);
}
.days a:focus-visible {
  outline-offset:2px;
}
.days .pad {
  visibility:hidden;
}
@media(min-width:640px) {
  .months {
    grid-template-columns:repeat(4,minmax(0,1fr));
  }
}
@media(min-width:900px) {
  .months {
    grid-template-columns:repeat(6,minmax(0,1fr));
    gap:32px 20px;
  }
}
@media(min-width:1280px) {
  .months {
    grid-template-columns:repeat(12,minmax(0,1fr));
    gap:20px 16px;
  }
}
/* Phones: give photographs more of the width. */
@media(max-width:639px) {
  header,main {
    padding-inline:12px;
  }
  main {
    padding-top:12px;
  }
  .site-header {
    padding:24px 12px 4px;
  }
  .gallery {
    column-gap:6px;
  }
  .photo-card {
    margin-bottom:6px;
  }
  .photo-view main {
    padding:0;
  }
}
/* Year/month pages: older period on the left, newer on the right. */
.period-nav {
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:baseline;
  gap:16px;
  margin-block:40px 16px;
  font-size:.9rem;
}
.period-nav a {
  text-decoration:none;
}
.period-nav>a {
  color:var(--muted);
}
.period-nav span:last-child {
  text-align:right;
}
