:root {
  --bg: #f6f4ef;
  --surface: #fbfaf7;
  --surface-muted: #ede9e0;
  --text: #1c1a17;
  --text-muted: #767067;
  --border: rgba(28, 26, 23, 0.09);
  --accent: #5e6f58;
  --hanko: #b84a39;
  --accent-soft: rgba(94, 111, 88, 0.11);
}
[data-theme="dark"] {
  --bg: #0f0e0d;
  --surface: #161513;
  --surface-muted: #1f1d1a;
  --text: #eae5dc;
  --text-muted: #938c82;
  --border: rgba(234, 229, 220, 0.09);
  --accent: #93a88c;
  --hanko: #c95b49;
  --accent-soft: rgba(147, 168, 140, 0.13);
}
*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; background-color: var(--bg); color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 300; line-height: 1.6; -webkit-font-smoothing: antialiased;
  transition: background-color 0.4s ease, color 0.4s ease;
}
a { color: inherit; text-decoration: none; }
.kanji-watermark {
  position: fixed; right: 28px; top: 50%; transform: translateY(-50%);
  writing-mode: vertical-rl; font-family: "Noto Serif JP", serif;
  font-size: 3.4rem; font-weight: 300; letter-spacing: 0.35em;
  color: var(--text); opacity: 0.035; pointer-events: none; user-select: none; z-index: 0;
}
.container { position: relative; z-index: 1; width: 100%; max-width: 1060px; margin: 0 auto; padding: 0 28px; }
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner { height: 68px; display: flex; align-items: center; justify-content: space-between; }
.brand {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: "Cormorant Garamond", Georgia, serif; font-size: 1.25rem; font-weight: 500; letter-spacing: 0.03em;
}
.ikigai-mark { color: var(--accent); transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1); }
.brand:hover .ikigai-mark { transform: rotate(45deg); }
.header-actions { display: flex; align-items: center; gap: 14px; }
.btn-music {
  display: inline-flex; align-items: center; gap: 9px; padding: 7px 14px;
  border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); font-family: inherit; font-size: 0.78rem; font-weight: 400;
  letter-spacing: 0.04em; cursor: pointer; transition: border-color 0.25s ease, background 0.25s ease;
}
.btn-music:hover, .btn-music.playing { border-color: var(--accent); }
.btn-music.playing { background: var(--accent-soft); color: var(--accent); }
.soundwave { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.soundwave span { width: 2px; height: 4px; background: currentColor; border-radius: 1px; transition: height 0.2s ease; }
.btn-music.playing .soundwave span:nth-child(1) { animation: waveBar 1.1s ease-in-out infinite; }
.btn-music.playing .soundwave span:nth-child(2) { animation: waveBar 1.1s ease-in-out 0.22s infinite; }
.btn-music.playing .soundwave span:nth-child(3) { animation: waveBar 1.1s ease-in-out 0.44s infinite; }
.btn-music.playing .soundwave span:nth-child(4) { animation: waveBar 1.1s ease-in-out 0.15s infinite; }
@keyframes waveBar { 0%, 100% { height: 3px; } 50% { height: 12px; } }
.btn-minimal {
  display: inline-flex; align-items: center; gap: 5px; font-size: 0.8rem; font-weight: 400;
  letter-spacing: 0.04em; color: var(--text-muted); padding: 6px 10px; transition: color 0.2s ease;
}
.btn-minimal:hover { color: var(--text); }
.arrow-up-right { font-size: 0.75rem; opacity: 0.7; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border);
  background: transparent; color: var(--text-muted); display: grid; place-items: center;
  cursor: pointer; transition: color 0.2s ease, border-color 0.2s ease;
}
.icon-btn:hover { color: var(--text); border-color: var(--text-muted); }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: none; }
.profile-hero {
  display: flex; align-items: center; justify-content: space-between;
  gap: 40px; padding: 64px 0 52px; border-bottom: 1px solid var(--border);
}
.hero-left { display: flex; align-items: center; gap: 32px; }
.avatar-frame { position: relative; flex-shrink: 0; width: 104px; height: 104px; }
.avatar-img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
  border: 1px solid var(--border); padding: 4px; background: var(--surface); display: block;
}
.hanko-seal {
  position: absolute; bottom: 0; right: 0; width: 26px; height: 26px; border-radius: 4px;
  background: var(--hanko); color: #fbfaf7; font-family: "Noto Serif JP", serif;
  font-size: 0.78rem; font-weight: 500; display: grid; place-items: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.eyebrow { font-size: 0.68rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; font-weight: 400; }
.profile-handle { margin: 0; font-family: "Cormorant Garamond", Georgia, serif; font-size: 2.35rem; font-weight: 400; letter-spacing: -0.01em; line-height: 1.15; }
.profile-bio { margin: 10px 0 18px; max-width: 440px; font-size: 0.94rem; color: var(--text-muted); line-height: 1.65; }
.profile-bio em { font-family: "Cormorant Garamond", Georgia, serif; font-size: 1.12rem; color: var(--text); }
.profile-stats { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 0.82rem; letter-spacing: 0.03em; }
.stat strong { font-weight: 500; }
.stat span, .stat-sep { color: var(--text-muted); }
.hero-ikigai-art { display: flex; flex-direction: column; align-items: center; gap: 8px; flex-shrink: 0; }
.ikigai-venn { width: 118px; height: 118px; stroke: var(--text); stroke-opacity: 0.22; stroke-width: 1; fill: none; animation: slowSpin 48s linear infinite; }
.venn-center { fill: var(--hanko); stroke: none; }
@keyframes slowSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.ikigai-caption { font-size: 0.64rem; letter-spacing: 0.24em; color: var(--text-muted); }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 28px 0 24px; flex-wrap: wrap; }
.filter-tabs { display: inline-flex; gap: 22px; }
.tab {
  border: none; background: transparent; color: var(--text-muted); font-family: inherit;
  font-size: 0.82rem; font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 6px 0; cursor: pointer; display: inline-flex; align-items: baseline; gap: 6px;
  border-bottom: 1px solid transparent; transition: color 0.25s ease, border-color 0.25s ease;
}
.tab .count { font-size: 0.7rem; opacity: 0.65; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--text); }
.showing-label { font-family: "Cormorant Garamond", Georgia, serif; font-style: italic; font-size: 0.98rem; color: var(--text-muted); }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; padding-bottom: 84px; }
.photo-card { position: relative; display: flex; flex-direction: column; background: transparent; border: none; padding: 0; cursor: pointer; text-align: left; color: inherit; }
.photo-frame { position: relative; width: 100%; aspect-ratio: 4 / 5; overflow: hidden; background: var(--surface-muted); border: 1px solid var(--border); }
.photo-frame img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  filter: saturate(0.94) contrast(1.01);
  transition: transform 0.85s cubic-bezier(0.19, 1, 0.22, 1), filter 0.45s ease;
}
.photo-card:hover .photo-frame img { transform: scale(1.035); filter: saturate(1.02) contrast(1.02); }
.reel-badge {
  position: absolute; top: 12px; right: 12px; background: rgba(15, 14, 13, 0.62); color: #fbfaf7;
  backdrop-filter: blur(6px); border-radius: 999px; padding: 4px 10px; font-size: 0.66rem;
  letter-spacing: 0.08em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 5px; z-index: 2;
}
.photo-caption-bar { display: flex; justify-content: space-between; align-items: baseline; padding-top: 10px; font-size: 0.74rem; color: var(--text-muted); letter-spacing: 0.04em; }
.photo-index { font-family: "Cormorant Garamond", Georgia, serif; font-size: 0.9rem; color: var(--text); }
.site-footer { border-top: 1px solid var(--border); padding: 36px 0 52px; color: var(--text-muted); font-size: 0.8rem; letter-spacing: 0.03em; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-kanji { font-family: "Noto Serif JP", serif; color: var(--accent); letter-spacing: 0.15em; }
.site-footer a { color: var(--text); border-bottom: 1px solid var(--border); }
.site-footer a:hover { border-bottom-color: var(--text); }
.footer-note { margin: 0; }
.lightbox { position: fixed; inset: 0; z-index: 50; display: none; align-items: center; justify-content: center; padding: 28px; }
.lightbox.open { display: flex; }
.lightbox-backdrop { position: absolute; inset: 0; background: rgba(12, 11, 10, 0.88); backdrop-filter: blur(12px); }
.lightbox-card {
  position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.65fr);
  max-width: 980px; width: 100%; max-height: 86vh; background: var(--surface);
  overflow: hidden; border: 1px solid var(--border); box-shadow: 0 28px 70px rgba(0, 0, 0, 0.45);
}
.lightbox-media { background: #0b0a09; display: flex; align-items: center; justify-content: center; max-height: 86vh; }
.lightbox-media img { width: 100%; height: 100%; max-height: 86vh; object-fit: contain; display: block; }
.lightbox-info { padding: 28px; display: flex; flex-direction: column; justify-content: space-between; gap: 20px; }
.lightbox-meta-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.lightbox-author { display: flex; align-items: center; gap: 12px; }
.mini-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.author-handle { font-family: "Cormorant Garamond", Georgia, serif; font-size: 1.08rem; font-weight: 500; }
.post-date { font-size: 0.74rem; color: var(--text-muted); }
.type-pill { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.12em; padding: 3px 9px; border: 1px solid var(--border); color: var(--text-muted); }
.lightbox-caption { margin: 0; font-family: "Cormorant Garamond", Georgia, serif; font-size: 1.12rem; color: var(--text); line-height: 1.65; flex: 1; }
.lightbox-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 16px; border-top: 1px solid var(--border); }
.lightbox-counter { font-family: "Cormorant Garamond", Georgia, serif; font-size: 0.92rem; color: var(--text-muted); }
.lightbox-close, .lightbox-nav {
  position: fixed; z-index: 3; width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16); background: rgba(20, 19, 18, 0.6);
  color: #fff; display: grid; place-items: center; cursor: pointer; transition: background 0.2s ease;
}
.lightbox-close:hover, .lightbox-nav:hover { background: rgba(20, 19, 18, 0.9); }
.lightbox-close { top: 22px; right: 22px; }
.lightbox-prev { left: 22px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 22px; top: 50%; transform: translateY(-50%); }
@media (max-width: 860px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .hero-ikigai-art { display: none; }
  .lightbox-card { grid-template-columns: 1fr; max-height: 90vh; overflow-y: auto; }
  .lightbox-media { max-height: 55vh; }
}
@media (max-width: 560px) {
  .container { padding: 0 18px; }
  .hero-left { flex-direction: column; align-items: flex-start; gap: 18px; }
  .profile-hero { padding: 40px 0 32px; }
  .gallery-grid { grid-template-columns: 1fr; gap: 28px; }
}