:root,
:root[data-theme="light"] {
  --bg: #fafaf8;
  --text: #1a1a1a;
  --text-sub: #777;
  --line: #e5e3de;
  --tile-gap: 14px;
}

:root[data-theme="dark"] {
  --bg: #101010;
  --text: #ececec;
  --text-sub: #9a9a9a;
  --line: #2a2a2a;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Helvetica Neue", Helvetica, Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.7;
  transition: background 0.3s ease, color 0.3s ease;
}

main { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* --- global nav --- */
.global-nav {
  max-width: 1080px;
  margin: 0 auto;
  padding: 18px 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.nav-logo {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.3em;
  color: var(--text);
  text-decoration: none;
}
.nav-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}
.nav-links a {
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--text-sub);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}
.nav-links a:hover { color: var(--text); }
.nav-links a[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--text);
}
.theme-toggle {
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-sub);
  font-size: 11px;
  letter-spacing: 0.1em;
  padding: 4px 12px;
  cursor: pointer;
}
.theme-toggle:hover { color: var(--text); border-color: var(--text-sub); }

/* --- home header --- */
.site-header {
  text-align: center;
  padding: 56px 20px 40px;
}
.site-title {
  font-size: 32px;
  font-weight: 500;
  letter-spacing: 0.35em;
  text-indent: 0.35em;
}
.site-sub {
  margin-top: 6px;
  font-size: 12px;
  letter-spacing: 0.25em;
  color: var(--text-sub);
  text-transform: uppercase;
}

/* --- category tiles --- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--tile-gap);
}
@media (max-width: 720px) {
  .category-grid { grid-template-columns: repeat(2, 1fr); }
}
.tile {
  display: block;
  position: relative;
  text-decoration: none;
  color: var(--text);
  overflow: hidden;
}
.tile img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease, opacity 0.3s ease;
}
.tile:hover img { transform: scale(1.03); opacity: 0.92; }
.tile-label {
  display: block;
  padding: 10px 2px 18px;
  font-size: 13px;
  letter-spacing: 0.18em;
  font-weight: 500;
}
.tile-label small {
  margin-left: 10px;
  font-size: 11px;
  font-weight: 400;
  color: var(--text-sub);
  letter-spacing: 0.1em;
}

/* --- profile / contact --- */
.profile, .contact {
  max-width: 640px;
  margin: 0 auto;
  padding: 56px 0 0;
  text-align: center;
}
.profile h2, .contact h2 {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  margin-bottom: 18px;
}
.profile p, .contact-note { font-size: 14px; color: var(--text); opacity: 0.85; }
.contact-links { margin-top: 14px; display: flex; gap: 24px; justify-content: center; }
.contact-links a {
  color: var(--text);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-decoration: none;
  border-bottom: 1px solid var(--text);
  padding-bottom: 2px;
}
.contact-links a[aria-disabled="true"] { color: var(--text-sub); border-color: var(--line); pointer-events: none; }

.site-footer {
  text-align: center;
  padding: 72px 20px 32px;
  font-size: 11px;
  color: var(--text-sub);
  letter-spacing: 0.1em;
}

/* --- category page --- */
.page-title-wrap { text-align: center; padding: 40px 20px 36px; }
.page-title {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
}
.page-title-jp {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-sub);
  letter-spacing: 0.2em;
}
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--tile-gap);
  padding-bottom: 40px;
}
@media (max-width: 720px) {
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
}
.photo-grid figure { margin: 0; cursor: zoom-in; }
.photo-grid img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
  transition: opacity 0.3s ease;
}
.photo-grid figure:hover img { opacity: 0.92; }

/* --- lightbox --- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.96);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 94vw;
  max-height: 92vh;
  object-fit: contain;
}
.lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: #ccc;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}
