@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500&display=swap');

:root {
  --paper: #f6f5f2;
  --text: #11110f;
  --muted: #7c7b76;
  --image-bg: #e9e8e4;
  --page-width: 980px;
  --header-top: 24px;
  --header-right: 30px;
  --footer-bottom: 28px;
  --footer-left: 32px;
  --gallery-top: 178px;
  --gallery-bottom: 80px;
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: var(--paper);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  font-size: 12px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body { overscroll-behavior: none; }
button, a { font: inherit; color: inherit; }
a { text-decoration: none; }

.seo-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: fixed;
  top: var(--header-top);
  right: var(--header-right);
  width: max-content;
  height: auto;
  margin: 0;
  padding: 0;
  z-index: 9999;
  pointer-events: none;
  background: transparent;
}

.identity {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  pointer-events: auto;
  cursor: zoom-in;
}

.identity-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 1px;
}

.identity-kicker {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.2;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.identity-name {
  color: var(--text);
  font-size: 11px;
  line-height: 1.25;
  font-weight: 500;
  letter-spacing: -0.015em;
}

.portrait-frame {
  display: block;
  width: 52px;
  height: 66px;
  overflow: hidden;
  background: #dfded9;
}

.portrait-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
  filter: grayscale(100%);
}

main {
  position: relative;
  width: min(calc(100% - 56px), var(--page-width));
  height: 100dvh;
  margin: 0 auto;
  padding: 0;
  overflow: hidden;
}

.gallery {
  position: absolute;
  top: var(--gallery-top);
  right: 0;
  bottom: var(--gallery-bottom);
  left: 0;
  width: 100%;
  height: auto;
  margin: 0;
  padding: 0 12px 120px 0;
  overflow-y: scroll;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 128px;
  scrollbar-width: thin;
  scrollbar-color: rgba(17, 17, 15, 0.38) transparent;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  outline: none;
}

.gallery::-webkit-scrollbar { width: 5px; }
.gallery::-webkit-scrollbar-track { background: transparent; }
.gallery::-webkit-scrollbar-thumb {
  background: rgba(17, 17, 15, 0.38);
  border-radius: 10px;
}
.gallery::-webkit-scrollbar-thumb:hover { background: rgba(17, 17, 15, 0.58); }

.photo-card {
  flex: 0 0 auto;
  width: min(100%, 760px);
  min-width: 0;
  margin: 0;
  padding: 0;
}

.photo-card.is-portrait,
.photo-card.is-square,
.photo-card.is-landscape { flex: 0 0 auto; }

.photo-button {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: var(--image-bg);
  cursor: zoom-in;
}

.photo-button img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  padding: 0;
}

figcaption {
  margin: 12px 0 0;
  padding: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: 0.01em;
  white-space: pre-line;
}

.empty-gallery {
  flex: 0 0 auto;
  width: 100%;
  margin: 0;
  padding: 90px 0;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.site-footer {
  position: fixed;
  bottom: var(--footer-bottom);
  left: var(--footer-left);
  width: max-content;
  height: auto;
  margin: 0;
  padding: 0;
  z-index: 9999;
  color: var(--muted);
  font-size: 9px;
  line-height: 1;
  letter-spacing: 0.03em;
  pointer-events: none;
  background: transparent;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 70px 40px;
  background: rgba(13, 13, 12, 0.97);
}

.lightbox.is-open { display: flex; }

.lightbox-image {
  display: block;
  width: auto;
  height: auto;
  max-width: 92vw;
  max-height: 84vh;
  object-fit: contain;
}

.lightbox-close {
  position: fixed;
  top: 18px;
  right: 28px;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: white;
  font-size: 30px;
  font-weight: 300;
  line-height: 40px;
  cursor: pointer;
}

.lightbox-caption {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  margin: 0;
  padding: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 10px;
  line-height: 1.4;
  white-space: pre-line;
  text-align: center;
}

@media (max-width: 700px) {
  :root {
    --gallery-top: 162px;
    --gallery-bottom: 70px;
  }

  .site-header { top: 18px; right: 18px; }
  .identity { gap: 8px; }
  .identity-kicker { font-size: 8px; }
  .identity-name { font-size: 10px; }
  .portrait-frame { width: 42px; height: 54px; }

  main {
    width: calc(100% - 28px);
    height: 100dvh;
  }

  .gallery {
    gap: 72px;
    padding: 0 8px 100px 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(17, 17, 15, 0.38) transparent;
  }

  .gallery::-webkit-scrollbar { width: 4px; }

  .photo-card,
  .photo-card.is-landscape,
  .photo-card.is-portrait,
  .photo-card.is-square {
    flex: 0 0 auto;
    width: 100%;
  }

  figcaption { margin-top: 9px; font-size: 9px; }
  .site-footer { bottom: 20px; left: 18px; }
  .lightbox { padding: 50px 18px; }
  .lightbox-image { max-width: 94vw; max-height: 82vh; }
  .lightbox-close { top: 12px; right: 14px; }
}
