/*
 * Ken Ikeda 公式サイト スタイルシート
 * Figma Make で作成したデザイン（白背景・黒文字・ミニマル・1ページ構成）を再現。
 * コンテンツは microCMS から取得して script.js が描画します。
 */

/* ---------- Reset / Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  background: #ffffff;
  color: #000000;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN",
    "Hiragino Sans", Meiryo, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  padding: 16px;
}

@media (min-width: 640px) {
  body {
    padding: 32px;
  }
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
}

/* ---------- Layout ---------- */
.site-container {
  max-width: 1024px;
}

.site-title-wrap {
  margin-bottom: 32px;
}

@media (min-width: 640px) {
  .site-title-wrap {
    margin-bottom: 48px;
  }
}

.site-title {
  font-size: 14px;
  font-weight: 500;
  margin: 0;
}

.site-title a {
  text-decoration: none;
}

/* ---------- Navigation ---------- */
.site-nav {
  margin-bottom: 32px;
}

@media (min-width: 640px) {
  .site-nav {
    margin-bottom: 48px;
  }
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 14px;
}

.site-nav li {
  margin-bottom: 4px;
}

.nav-link {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  text-transform: lowercase;
  display: inline;
}

.nav-link:hover,
.nav-link.is-active {
  text-decoration: underline;
}

/* ---------- Sections ---------- */
main {
  font-size: 14px;
}

.content-section {
  display: none;
}

.content-section.is-active {
  display: block;
}

.section-title {
  font-size: 18px;
  font-weight: 500;
  text-decoration: underline;
  text-transform: lowercase;
  margin: 0 0 16px;
}

.section-block {
  margin-bottom: 48px;
}

.section-block:last-child {
  margin-bottom: 0;
}

/* ---------- Biography ---------- */
.bio-photo-wrap {
  margin-bottom: 24px;
  max-width: 768px;
}

@media (min-width: 640px) {
  .bio-photo-wrap {
    margin-bottom: 32px;
  }
}

.bio-photo-wrap img {
  width: 100%;
  height: auto;
}

.bio-text {
  line-height: 1.625;
  max-width: 768px;
  font-size: 12px;
}

.bio-text p {
  margin: 0 0 16px;
}

.bio-text u,
.bio-text .term {
  text-decoration: underline;
}

@media (min-width: 640px) {
  .bio-text {
    font-size: 14px;
  }
}

/* ---------- Tables ---------- */
table.data-table {
  width: 100%;
  max-width: 896px;
  border-collapse: collapse;
  display: none;
}

@media (min-width: 640px) {
  table.data-table {
    display: table;
  }
}

table.data-table.narrow {
  max-width: 768px;
}

table.data-table thead tr {
  border-bottom: 1px solid #000000;
}

table.data-table th {
  text-align: left;
  padding: 0 16px 8px 0;
  text-transform: lowercase;
  font-weight: 400;
}

table.data-table th:last-child {
  padding-right: 0;
}

table.data-table tbody tr {
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
}

table.data-table td {
  padding: 8px 16px 8px 0;
  vertical-align: top;
}

table.data-table td:last-child {
  padding-right: 0;
}

.empty-row td {
  text-align: center;
  padding: 16px 0;
  opacity: 0.6;
}

/* ---------- Mobile list (shown under 640px) ---------- */
.mobile-list {
  display: block;
}

@media (min-width: 640px) {
  .mobile-list {
    display: none;
  }
}

.mobile-list .m-item {
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.mobile-list .m-item:last-child {
  margin-bottom: 0;
}

.m-year {
  font-size: 12px;
  opacity: 0.6;
  margin-bottom: 4px;
}

.m-title {
  margin-bottom: 4px;
}

.m-sub {
  font-size: 12px;
  opacity: 0.6;
}

.empty-note {
  opacity: 0.6;
  margin: 0;
}

/* ---------- Projects / Works ---------- */
.work-item {
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
  padding-bottom: 32px;
  margin-bottom: 32px;
  max-width: 768px;
}

.work-item:last-child {
  margin-bottom: 0;
  border-bottom: none;
}

.work-head {
  display: flex;
  gap: 24px;
  margin-bottom: 8px;
}

.work-year {
  opacity: 0.6;
  flex-shrink: 0;
}

.work-desc {
  line-height: 1.625;
  opacity: 0.8;
  margin: 0 0 16px;
  font-size: 12px;
}

@media (min-width: 640px) {
  .work-desc {
    font-size: 14px;
  }
}

.work-images {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.work-thumb {
  width: 80px;
  height: 80px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: none;
  padding: 0;
  cursor: pointer;
  transition: border-color 0.2s;
}

.work-thumb:hover {
  border-color: #000000;
}

.work-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Commissions intro ---------- */
.intro-text {
  max-width: 768px;
  line-height: 1.625;
  font-size: 12px;
  margin: 0 0 16px;
}

@media (min-width: 640px) {
  .intro-text {
    font-size: 14px;
  }
}

.intro-text.mb-lg {
  margin-bottom: 40px;
}

/* ---------- Contact ---------- */
.contact-link {
  text-decoration: none;
}

.contact-link:hover {
  text-decoration: underline;
}

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

.lightbox[hidden] {
  display: none;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 24px;
  color: #ffffff;
  font-size: 12px;
  text-transform: lowercase;
  opacity: 0.6;
  background: none;
  border: none;
  cursor: pointer;
}

.lightbox-close:hover {
  opacity: 1;
}

.lightbox-arrow {
  position: absolute;
  color: #ffffff;
  font-size: 12px;
  opacity: 0.6;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  text-transform: lowercase;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-arrow:hover {
  opacity: 1;
}

.lightbox-prev {
  left: 16px;
}

.lightbox-next {
  right: 16px;
}

.lightbox img {
  max-height: 100vh;
  max-width: 100%;
  object-fit: contain;
  padding: 32px;
}

@media (min-width: 640px) {
  .lightbox img {
    padding: 64px;
  }
}

.lightbox-counter {
  position: absolute;
  bottom: 16px;
  color: #ffffff;
  font-size: 12px;
  opacity: 0.4;
}

/* ---------- Loading state ---------- */
.loading-note {
  opacity: 0.5;
  font-size: 12px;
}

/* ---------- Discography album link ---------- */
.album-link {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.album-link:hover {
  text-decoration: underline;
}

/* ---------- Album detail modal ---------- */
.album-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.album-modal[hidden] {
  display: none;
}

.album-modal-inner {
  position: relative;
  background: #ffffff;
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 24px;
}

@media (min-width: 640px) {
  .album-modal-inner {
    padding: 32px;
  }
}

.album-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 12px;
  text-transform: lowercase;
  opacity: 0.6;
  cursor: pointer;
}

.album-modal-close:hover {
  opacity: 1;
}

.album-modal-cover img {
  width: 100%;
  max-width: 240px;
  margin-bottom: 16px;
}

.album-modal-title {
  font-size: 16px;
  font-weight: 500;
  margin: 0 0 4px;
}

.album-modal-meta {
  font-size: 12px;
  opacity: 0.6;
  margin-bottom: 16px;
}

.album-modal-desc {
  font-size: 13px;
  line-height: 1.625;
  white-space: pre-line;
  margin: 0 0 16px;
}

.album-modal-tracklist {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  font-size: 13px;
}

.album-modal-tracklist li {
  padding: 6px 0;
}

.album-modal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.album-modal-links a {
  font-size: 12px;
  text-decoration: underline;
}

