:root {
  --bg: #f7f7f5;
  --text: #111;
  --muted: #6b6b6b;
  --line: rgba(0,0,0,0.06);
  --max: 1400px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.4;
}

body.lightbox-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  width: 100%;
  height: auto;
}

.site-header {
  padding: 28px 20px 18px;
  border-bottom: 1px solid var(--line);
}

.site-header-inner,
.page-header-inner,
.wrap {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.brand {
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.page-header {
  padding: 48px 20px 28px;
}

.page-header h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 500;
  letter-spacing: -0.02em;
}

.subtitle {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.wrap {
  padding-bottom: 60px;
}

.photo-grid {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto 60px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 28px;
}

.photo-card {
  grid-column: span 3;
  margin: 0;
}

.photo-card a {
  display: block;
  overflow: hidden;
  background: #fff;
  position: relative;
}

.photo-card a::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--blur-url);
  background-size: cover;
  background-position: center;
  filter: blur(18px);
  transform: scale(1.12);
  opacity: 0.9;
}

.photo-card img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  position: relative;
  z-index: 1;
  transition: transform 0.25s ease;
}

.photo-card a:hover img {
  transform: scale(1.01);
}

.meta {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.title,
.date {
  font-size: 0.85rem;
  color: var(--muted);
}

/* single page */

.single-photo {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
}

.single-photo-image img {
  max-height: 82vh;
  object-fit: contain;
  background: #fff;
}

.single-photo-meta h1 {
  margin: 0 0 8px;
  font-size: 1.5rem;
  font-weight: 500;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.tags a,
.tag-pill {
  display: inline-flex;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* lightbox */

.lightbox {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(247, 247, 245, 0.97);
  z-index: 9999;
}

.lightbox.is-open {
  display: flex;
}

.lightbox-stage {
  width: min(92vw, 1600px);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.lightbox-stage img {
  width: auto;
  max-width: 100%;
  max-height: 82vh;
  object-fit: contain;
}

.lightbox-meta {
  margin-top: 14px;
  text-align: center;
}

.lightbox-title,
.lightbox-date {
  margin: 0;
  color: var(--muted);
}

.lightbox-title {
  font-size: 0.95rem;
}

.lightbox-date {
  font-size: 0.85rem;
  margin-top: 4px;
}

.lightbox-close,
.lightbox-nav {
  border: 0;
  background: transparent;
  color: #111;
  cursor: pointer;
  font: inherit;
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 24px;
  font-size: 2rem;
  line-height: 1;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 3rem;
  line-height: 1;
  padding: 12px;
}

.lightbox-prev {
  left: 18px;
}

.lightbox-next {
  right: 18px;
}

@media (max-width: 1100px) {
  .photo-card { grid-column: span 4; }
}

@media (max-width: 800px) {
  .photo-card { grid-column: span 6; }
}

@media (max-width: 500px) {
  .photo-card { grid-column: span 12; }

  .site-header-inner,
  .page-header-inner,
  .wrap,
  .photo-grid {
    width: min(var(--max), calc(100% - 24px));
  }

  .lightbox-nav {
    font-size: 2.2rem;
  }

  .meta {
    flex-direction: column;
    gap: 4px;
  }
}