/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Design tokens
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
:root {
  --bg:      #FAFAF7;
  --ink:     #1A1816;
  --smoke:   #A09B95;
  --border:  #DAD5CE;
  --parch:   #F0EDE6;
  --seal:    #7B1A1A;

  --serif: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "MS PMincho", Georgia, serif;
  --sans:  "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;

  --nav-h: 60px;
  --ease:  cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:     #141210;
    --ink:    #EAE6DF;
    --smoke:  #72706C;
    --border: #2A2826;
    --parch:  #1C1A18;
  }
}
:root[data-theme="dark"] {
  --bg:     #141210;
  --ink:    #EAE6DF;
  --smoke:  #72706C;
  --border: #2A2826;
  --parch:  #1C1A18;
}
:root[data-theme="light"] {
  --bg:     #FAFAF7;
  --ink:    #1A1816;
  --smoke:  #A09B95;
  --border: #DAD5CE;
  --parch:  #F0EDE6;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Reset / base
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 300;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   NAV
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
#nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 56px;
  z-index: 900;
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
#nav.scrolled {
  background: rgba(250, 250, 247, 0.94);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border);
}
@media (prefers-color-scheme: dark) {
  #nav.scrolled { background: rgba(20, 18, 16, 0.94); }
}
:root[data-theme="dark"] #nav.scrolled { background: rgba(20, 18, 16, 0.94); }
:root[data-theme="light"] #nav.scrolled { background: rgba(250, 250, 247, 0.94); }

.nav-name {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  color: var(--ink);
  text-decoration: none;
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links { display: flex; gap: 36px; }

#lang-toggle {
  background: none;
  border: 1px solid var(--border);
  color: var(--smoke);
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  padding: 4px 10px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  flex-shrink: 0;
}
#lang-toggle:hover {
  border-color: var(--smoke);
  color: var(--ink);
}
.nav-links a {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 300;
  letter-spacing: 0.25em;
  color: var(--ink);
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 0.2s, color 0.2s;
}
.nav-links a:hover { opacity: 1; color: var(--seal); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   HERO
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
#hero {
  min-height: 100svh;
  padding-top: var(--nav-h);
  display: flex;
  flex-direction: column;
}
.hero-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 48px 80px;
}

.hero-top-img {
  display: block;
  max-height: calc(74svh - var(--nav-h));
  max-width: min(340px, 80vw);
  width: auto;
  object-fit: contain;
  opacity: 0;
  animation: hero-fade-in 3s ease forwards;
  animation-delay: 0.3s;
}

@keyframes hero-fade-in {
  to { opacity: 1; }
}

.hero-caption {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 300;
  letter-spacing: 0.55em;
  color: var(--smoke);
}

.hero-foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding-bottom: 36px;
}
.scroll-text {
  font-family: var(--sans);
  font-size: 0.6rem;
  letter-spacing: 0.45em;
  color: var(--smoke);
}
.scroll-bar {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--smoke), transparent);
  transform-origin: top;
  animation: pulse-down 2.6s ease-in-out infinite;
}
@keyframes pulse-down {
  0%, 100% { opacity: 0.4; transform: scaleY(1); }
  50%       { opacity: 0.85; transform: scaleY(0.55) translateY(12px); }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   SECTION HEADER
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.section-head {
  text-align: center;
  padding: 88px 0 68px;
}
.section-head h2 {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 300;
  letter-spacing: 0.7em;
  color: var(--smoke);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   GALLERY
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
#gallery { padding-bottom: 88px; }

.work-panel {
  display: flex;
  align-items: center;
  padding: 72px 88px;
  border-top: 1px solid var(--border);
  gap: 80px;
  /* scroll reveal */
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.work-panel.in-view {
  opacity: 1;
  transform: none;
}
.work-panel:nth-child(even) { flex-direction: row-reverse; }

/* image */
.work-img-wrap {
  flex-shrink: 0;
  cursor: zoom-in;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.work-img-wrap img {
  display: block;
  box-shadow:
    4px 8px 26px rgba(26, 24, 22, 0.1),
    0 2px 6px rgba(26, 24, 22, 0.05);
  transition: box-shadow 0.35s var(--ease);
}
.work-img-wrap:hover img {
  box-shadow:
    6px 14px 40px rgba(26, 24, 22, 0.16),
    0 4px 10px rgba(26, 24, 22, 0.08);
}

.work-panel.portrait  .work-img-wrap img { max-height: 68vh; max-width: 280px; width: auto; }
.work-panel.landscape .work-img-wrap img { max-height: 50vh; max-width: 55vw;  width: auto; }

/* meta */
.work-meta { flex: 1; min-width: 0; }

.work-num {
  display: block;
  font-family: var(--sans);
  font-size: 0.58rem;
  letter-spacing: 0.55em;
  color: var(--border);
  margin-bottom: 22px;
}
.work-title {
  font-size: clamp(1.15rem, 2.4vw, 1.65rem);
  font-weight: 400;
  letter-spacing: 0.1em;
  line-height: 1.5;
  margin-bottom: 10px;
}
.work-exh {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 300;
  letter-spacing: 0.25em;
  color: var(--smoke);
  margin-bottom: 18px;
}
.work-desc {
  font-size: 0.84rem;
  line-height: 2.3;
  color: var(--smoke);
  letter-spacing: 0.06em;
  margin-bottom: 30px;
}
.work-zoom-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 0 0 6px;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.63rem;
  letter-spacing: 0.4em;
  color: var(--smoke);
  transition: border-color 0.2s, color 0.2s;
}
.work-zoom-btn::after { content: '→'; font-size: 0.7rem; opacity: 0.7; }
.work-zoom-btn:hover {
  border-bottom-color: var(--seal);
  color: var(--seal);
}
.work-zoom-btn:focus-visible {
  outline: 2px solid var(--seal);
  outline-offset: 4px;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   PROFILE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
#profile {
  background: var(--parch);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 96px 80px;
}
.profile-wrap {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  gap: 80px;
  align-items: flex-start;
}
.profile-left { flex: 1; }
.profile-left h2 {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 300;
  letter-spacing: 0.7em;
  color: var(--smoke);
  margin-bottom: 40px;
}
#profile-text p {
  font-size: 0.92rem;
  line-height: 2.5;
  letter-spacing: 0.07em;
  color: var(--ink);
  margin-bottom: 12px;
}
.profile-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 36px;
}
.profile-images img {
  display: block;
  width: 100%;
  height: auto;
}

.profile-right { flex-shrink: 0; }

.profile-quals {
  margin-top: 36px;
}
.profile-quals-heading {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 300;
  letter-spacing: 0.4em;
  color: var(--smoke);
  margin-bottom: 12px;
}
.profile-quals ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.profile-quals li {
  font-size: 0.84rem;
  line-height: 1.8;
  letter-spacing: 0.06em;
  color: var(--ink);
  padding-left: 1em;
  position: relative;
}
.profile-quals li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--smoke);
}

.profile-photo {
  display: block;
  width: 180px;
  height: 180px;
  object-fit: cover;
  object-position: center top;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   CONTACT
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
#contact { padding: 96px 80px; text-align: center; }
.contact-wrap { max-width: 480px; margin: 0 auto; }
.contact-wrap h2 {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 300;
  letter-spacing: 0.7em;
  color: var(--smoke);
  margin-bottom: 36px;
}
.contact-wrap p {
  font-size: 0.9rem;
  line-height: 2.1;
  letter-spacing: 0.06em;
  color: var(--smoke);
  margin-bottom: 36px;
}
.contact-wrap a {
  font-family: var(--sans);
  font-size: 0.76rem;
  letter-spacing: 0.3em;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  padding-bottom: 5px;
  transition: border-color 0.2s, color 0.2s;
}
.contact-wrap a:hover {
  border-bottom-color: var(--seal);
  color: var(--seal);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   FOOTER
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
footer {
  border-top: 1px solid var(--border);
  padding: 28px 80px;
  text-align: center;
}
footer p {
  font-family: var(--sans);
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  color: var(--smoke);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   LIGHTBOX
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
#lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 9, 8, 0.96);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease);
}
#lightbox[aria-hidden="false"] {
  opacity: 1;
  pointer-events: auto;
}
#lb-close {
  position: absolute;
  top: 24px;
  right: 32px;
  background: none;
  border: none;
  color: rgba(234, 230, 223, 0.45);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 8px;
  transition: color 0.2s;
}
#lb-close:hover { color: rgba(234, 230, 223, 0.95); }
#lb-close:focus-visible { outline: 2px solid var(--seal); outline-offset: 4px; }

#lb-fig {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  max-width: 90vw;
  max-height: 92vh;
}
#lb-img {
  display: block;
  max-width: 90vw;
  max-height: 84vh;
  object-fit: contain;
}
#lb-cap {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  color: rgba(234, 230, 223, 0.5);
  text-align: center;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   RESPONSIVE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media (max-width: 900px) {
  #nav { padding: 0 28px; }
  .nav-links { gap: 22px; }

  .hero-inner {
    padding: 32px 28px 20px;
    gap: 16px;
  }
  .hero-top-img {
    max-height: 60svh;
  }

  .work-panel {
    flex-direction: column !important;
    padding: 48px 28px;
    gap: 36px;
  }
  .work-panel.portrait  .work-img-wrap img { max-height: 62svh; max-width: 78vw; }
  .work-panel.landscape .work-img-wrap img { max-height: 38svh; max-width: 100%; }
  .work-meta { max-width: 100%; }

  #profile { padding: 64px 28px; }
  .profile-wrap { flex-direction: column; gap: 40px; }
  .profile-right { padding-top: 0; }
  .profile-images { grid-template-columns: 1fr; }

  #contact { padding: 64px 28px; }
  footer { padding: 24px 28px; }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   REDUCED MOTION
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media (prefers-reduced-motion: reduce) {
  .scroll-bar { animation: none; opacity: 0.5; }
  .hero-top-img { animation: none; opacity: 1; }
  .work-panel { transition: opacity 0.1s; transform: none !important; }
  * { transition-duration: 0.05s !important; }
}
