:root {
  --bg: #f4f4f4;
  --surface: #f4f4f4;
  --text: #111111;
  --text-muted: #bbbbbb;
  --accent: #111111;
  --border: #eeeeee;
  --radius: 4px;
  --transition: 0.2s ease;
}

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

html {
  scrollbar-gutter: stable;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Hiragino Sans, "Meiryo", sans-serif;
  font-size: 14px;
  line-height: 1.6;
}


a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* ---- Header ---- */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.header-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 12px 32px 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

main:has(.hero) {
  padding-top: 0;
}

.site-title {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.28em;
  color: var(--text);
  text-decoration: none;
  text-transform: uppercase;
}
.site-title:hover {
  text-decoration: none;
  opacity: 0.5;
}

nav {
  display: flex;
  gap: 28px;
  align-items: center;
}
nav a {
  display: flex;
  opacity: 0.35;
  transition: opacity var(--transition);
}
nav a:hover {
  opacity: 1;
  text-decoration: none;
}
nav a img {
  display: block;
}

/* ---- Main ---- */
main {
  max-width: 960px;
  margin: 0 auto;
  padding: 40px 32px 100px;
}

/* ---- Hero (top page) ---- */
.hero {
  margin-left: calc(50% - 50vw);
  width: 100vw;
}
.hero-img {
  width: 100%;
  height: 82vh;
  object-fit: cover;
  object-position: center 35%;
  display: block;
}

/* ---- Blurred background (other pages) ---- */
.bg-fixed {
  position: fixed;
  inset: -30px;
  z-index: -1;
  background-image: url('pict/2021_02.jpg');
  background-size: cover;
  background-position: center 35%;
  filter: blur(24px);
}

body.has-bg {
  background: rgba(255, 255, 255, 0.78);
}

/* ---- Gallery grid ---- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}

.thumb {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  display: block;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.06),
    0 4px 16px rgba(0, 0, 0, 0.08);
  transition: transform var(--transition), box-shadow var(--transition);
}
.thumb:hover {
  transform: scale(1.03);
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.08),
    0 8px 24px rgba(0, 0, 0, 0.13);
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---- Lightbox ---- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.lightbox.open {
  display: flex;
}

.lightbox-img-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 88vw;
  max-height: 90vh;
}
.lightbox-img-wrap img {
  max-width: 88vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 2px;
}

.lightbox-close {
  position: fixed;
  top: 18px;
  right: 22px;
  background: none;
  border: none;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity var(--transition);
  line-height: 1;
  padding: 4px 8px;
}
.lightbox-close:hover { opacity: 1; }

.lightbox-prev,
.lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #fff;
  font-size: 52px;
  cursor: pointer;
  opacity: 0.4;
  transition: opacity var(--transition);
  padding: 8px 14px;
  user-select: none;
  line-height: 1;
}
.lightbox-prev { left: 6px; }
.lightbox-next { right: 6px; }
.lightbox-prev:hover,
.lightbox-next:hover { opacity: 1; }

/* ---- Footer ---- */
footer {
  padding: 48px 32px 56px;
}

.footer-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 20px;
}

.footer-icons {
  display: flex;
  gap: 16px;
  align-items: center;
}

.footer-social-link {
  width: 23px;
  height: 23px;
  background: var(--text);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity var(--transition);
  flex-shrink: 0;
}
.footer-social-link:hover {
  opacity: 0.6;
  text-decoration: none;
}
.footer-social-link img {
  width: 10px;
  height: 10px;
  display: block;
  filter: invert(1);
}

.footer-brand {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--text);
  text-transform: uppercase;
  line-height: 1;
  display: flex;
  align-items: center;
  margin-right: -0.22em;
}

/* ---- Mail page ---- */
.mail-wrap {
  max-width: 480px;
  margin: 56px auto;
  padding: 0 4px;
}
.mail-wrap h1 {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 36px;
}

.mail-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.mail-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.mail-form input,
.mail-form textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  outline: none;
  transition: border-color var(--transition);
  width: 100%;
}
.mail-form input:focus,
.mail-form textarea:focus {
  border-color: #aaaaaa;
}
.mail-form textarea {
  resize: vertical;
  min-height: 130px;
}
.mail-form button[type="submit"] {
  align-self: flex-start;
  background: var(--text);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 10px 28px;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity var(--transition);
}
.mail-form button[type="submit"]:hover {
  opacity: 0.6;
}
.mail-note {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ---- About page ---- */
.about-wrap {
  max-width: 540px;
  margin: 56px auto;
  padding: 0 4px;
}

.about-card {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-bottom: 48px;
}
.about-card > img {
  flex-shrink: 0;
}

/* 吹き出し */
.fukidashi {
  position: relative;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.8;
}
.fukidashi::before,
.fukidashi::after {
  content: '';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border-style: solid;
}
.fukidashi::before {
  left: -11px;
  border-width: 9px 11px 9px 0;
  border-color: transparent var(--border) transparent transparent;
}
.fukidashi::after {
  left: -9px;
  border-width: 8px 10px 8px 0;
  border-color: transparent #ffffff transparent transparent;
}

.about-meta {
  font-size: 13px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 24px;
  line-height: 2.2;
}
.about-meta strong {
  color: var(--text);
}
.about-meta img {
  display: block;
  margin-top: 6px;
}

.back-link {
  display: inline-block;
  margin-top: 44px;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  transition: color var(--transition);
}
.back-link:hover {
  color: var(--text);
  text-decoration: none;
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
  /* Header */
  .header-inner {
    padding: 10px 16px;
  }
  nav {
    gap: 20px;
  }
  .site-title {
    font-size: 20px;
  }

  /* Main */
  main {
    padding: 24px 16px 60px;
  }

  /* Hero */
  .hero-img {
    height: 48vh;
  }

  /* Gallery */
  .gallery {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 8px;
  }

  /* Lightbox */
  .lightbox-prev { left: 2px; }
  .lightbox-next { right: 2px; }

  /* About */
  .about-wrap {
    margin: 32px auto;
  }
  .about-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .about-meta {
    word-break: break-all;
  }
  /* 吹き出し：縦並び時は上向き矢印に */
  .fukidashi::before,
  .fukidashi::after {
    top: auto;
    left: 20px;
    transform: none;
  }
  .fukidashi::before {
    top: -11px;
    border-width: 0 9px 11px 9px;
    border-color: transparent transparent var(--border) transparent;
  }
  .fukidashi::after {
    top: -9px;
    border-width: 0 8px 10px 8px;
    border-color: transparent transparent #ffffff transparent;
  }

  /* Mail */
  .mail-wrap {
    margin: 32px auto;
  }

  /* Footer */
  footer {
    padding-left: 0;
    padding-right: 0;
  }
  .footer-inner {
    padding: 0 16px;
  }
}
