:root {
  color-scheme: light dark;
  --bg: #fcfcfa;
  --ink: #1d1c19;
  --muted: #6e6a5f;
  --soft: #8b877c;
  --faint: #ada894;
  --line: #e2dfd6;
  --gold: #a38a2e;
  --gold-line: #d9cfa8;
  --glow: #fbf6e7;
  --thumb-a: #3a3e4a;
  --thumb-b: #23252e;
  --play: #fcfcfa;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #191813;
    --ink: #e8e5dc;
    --muted: #b1aca1;
    --soft: #97928a;
    --faint: #77736b;
    --line: #35332b;
    --gold: #c8ad50;
    --gold-line: #625a39;
    --glow: #29261b;
    --thumb-a: #505565;
    --thumb-b: #292c36;
    --play: #fcfcfa;
  }
}

:root[data-theme="light"] {
  --bg: #fcfcfa;
  --ink: #1d1c19;
  --muted: #6e6a5f;
  --soft: #8b877c;
  --faint: #ada894;
  --line: #e2dfd6;
  --gold: #a38a2e;
  --gold-line: #d9cfa8;
  --glow: #fbf6e7;
  --thumb-a: #3a3e4a;
  --thumb-b: #23252e;
  --play: #fcfcfa;
}

:root[data-theme="dark"] {
  --bg: #191813;
  --ink: #e8e5dc;
  --muted: #b1aca1;
  --soft: #97928a;
  --faint: #77736b;
  --line: #35332b;
  --gold: #c8ad50;
  --gold-line: #625a39;
  --glow: #29261b;
  --thumb-a: #505565;
  --thumb-b: #292c36;
  --play: #fcfcfa;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", sans-serif;
  line-height: 1.7;
}

a { text-underline-offset: 0.2em; }
.page {
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  padding: 56px 8% 64px;
}
.page-home { padding-top: 84px; }
.wordmark {
  margin: 0 0 72px;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.42em;
  text-transform: lowercase;
}
.thesis {
  margin: 0 0 12px;
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1.55;
  text-wrap: balance;
}
.thesis-sub {
  margin: 0 0 84px;
  color: var(--muted);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
}
.index { border-top: 1px solid var(--line); }
.index-row {
  display: grid;
  grid-template-columns: minmax(9em, 14em) 1fr auto;
  gap: 16px;
  align-items: baseline;
  padding: 30px 8px;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  transition: background 0.35s ease;
}
.index-row:hover, .index-row:focus-visible,
.post:hover, .post:focus-visible,
.cta:hover, .cta:focus-visible { background: var(--glow); outline: none; }
.index-row .channel { font-size: 1.25rem; font-weight: 600; letter-spacing: 0.04em; }
.index-row .role {
  color: var(--muted);
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
}
.index-row .go {
  color: var(--gold);
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  white-space: nowrap;
}
.index-row.is-coming {
  cursor: default;
  color: var(--soft);
  transition: none;
}
.index-row.is-coming:hover { background: transparent; }
.index-row.is-coming .channel { color: var(--ink); }
.index-row.is-coming .go {
  color: var(--soft);
  letter-spacing: 0.18em;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 88px;
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", sans-serif;
}
.back {
  color: var(--soft);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-decoration: none;
}
.back:hover { color: var(--ink); }
.here { color: var(--gold); font-size: 0.78rem; letter-spacing: 0.14em; }
.title {
  margin: 0 0 10px;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  font-weight: 500;
  letter-spacing: 0.06em;
}
.verb { margin: 0 0 18px; color: var(--muted); font-size: 0.95rem; letter-spacing: 0.08em; }
.statement {
  max-width: 38em;
  margin: 0 0 56px;
  color: var(--muted);
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", sans-serif;
  font-size: 0.85rem;
  line-height: 2;
}
.footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 88px;
  color: var(--soft);
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
}
.page-home .footer { margin-top: 72px; }
.footer a { color: inherit; }

/* Memento Moment */
.mm .statement { margin-bottom: 72px; }
.gallery { columns: 3; column-gap: 22px; }
.photo { break-inside: avoid; margin: 0 0 22px; }
.photo-image { position: relative; width: 100%; overflow: hidden; background: var(--photo); }
.photo-image::after {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='120'%20height='120'%3E%3Cfilter%20id='n'%3E%3CfeTurbulence%20type='fractalNoise'%20baseFrequency='0.8'%20numOctaves='2'/%3E%3CfeColorMatrix%20type='saturate'%20values='0'/%3E%3C/filter%3E%3Crect%20width='120'%20height='120'%20filter='url(%23n)'%20opacity='0.4'/%3E%3C/svg%3E");
  content: "";
  mix-blend-mode: soft-light;
  pointer-events: none;
}
.photo-image:hover { filter: brightness(1.03); }
.photo figcaption { display: flex; justify-content: space-between; align-items: baseline; padding-top: 8px; }
.photo-title { font-size: 0.92rem; font-weight: 600; letter-spacing: 0.1em; }
.photo-date { color: var(--soft); font-family: "Hiragino Kaku Gothic ProN", sans-serif; font-size: 0.7rem; letter-spacing: 0.1em; font-variant-numeric: tabular-nums; }
.ratio-32 .photo-image { aspect-ratio: 3 / 2; }
.ratio-45 .photo-image { aspect-ratio: 4 / 5; }
.ratio-11 .photo-image { aspect-ratio: 1; }
.ratio-34 .photo-image { aspect-ratio: 3 / 4; }
.ratio-1610 .photo-image { aspect-ratio: 16 / 10; }
.akatsuki { --photo: linear-gradient(160deg, #d9c7b2 0%, #a99ea0 55%, #8e93a6 100%); }
.madoakari { --photo: linear-gradient(200deg, #f0e9d8 0%, #d8cbae 60%, #b7a98c 100%); }
.umigiri { --photo: linear-gradient(180deg, #e6e4da 0%, #c3cbcd 55%, #aeb9bd 100%); }
.yomachi { --photo: linear-gradient(215deg, #6e7486 0%, #4a4e5c 55%, #3a3e4a 100%); }
.mori { --photo: linear-gradient(170deg, #c9cdbd 0%, #93a08d 55%, #6e7a6b 100%); }
.seibutsu { --photo: linear-gradient(190deg, #e8e2d6 0%, #dbd2c0 55%, #cfc5b2 100%); }
.touka { --photo: linear-gradient(150deg, #f3ebdd 0%, #e0c9a0 60%, #c79f63 100%); }
.hakuu { --photo: linear-gradient(185deg, #d7dbdc 0%, #b4bcc2 55%, #939da8 100%); }
.yoru { --photo: linear-gradient(205deg, #565a6a 0%, #3d4150 60%, #2e3140 100%); }

/* Crush on Cinema */
.cta {
  display: inline-block;
  margin-bottom: 72px;
  padding: 12px 28px;
  border: 1px solid var(--gold-line);
  color: var(--gold);
  font-family: "Hiragino Kaku Gothic ProN", sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-decoration: none;
  transition: background 0.35s ease;
}
.videos { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; margin-bottom: 72px; }
.video { color: inherit; text-decoration: none; }
.thumbnail { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(200deg, var(--thumb-a), var(--thumb-b)); }
.thumbnail::after { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); border-style: solid; border-width: 11px 0 11px 19px; border-color: transparent transparent transparent var(--play); content: ""; opacity: 0.9; }
.video-title { margin: 0; padding-top: 8px; font-size: 0.92rem; font-weight: 600; letter-spacing: 0.04em; }
.video-date { margin: 0; color: var(--soft); font-family: "Hiragino Kaku Gothic ProN", sans-serif; font-size: 0.7rem; letter-spacing: 0.1em; }
.series { border-top: 1px solid var(--line); }
.series-row { display: grid; grid-template-columns: minmax(9em, 14em) 1fr; gap: 16px; align-items: baseline; padding: 24px 8px; border-bottom: 1px solid var(--line); }
.series-name { font-size: 1.05rem; font-weight: 600; letter-spacing: 0.04em; }
.series-description { color: var(--muted); font-family: "Hiragino Kaku Gothic ProN", sans-serif; font-size: 0.8rem; }

/* Tres Pescados */
.posts { border-top: 1px solid var(--line); }
.post { display: grid; grid-template-columns: 7em 1fr; gap: 20px; padding: 28px 8px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; transition: background 0.35s ease; }
.post-date { padding-top: 4px; color: var(--soft); font-family: "Hiragino Kaku Gothic ProN", sans-serif; font-size: 0.74rem; letter-spacing: 0.08em; font-variant-numeric: tabular-nums; }
.post-title { margin: 0 0 6px; font-size: 1.12rem; font-weight: 600; letter-spacing: 0.03em; }
.post-excerpt { max-width: 46em; margin: 0; color: var(--muted); font-family: "Hiragino Kaku Gothic ProN", sans-serif; font-size: 0.82rem; line-height: 1.9; }
.coming { margin-top: 48px; color: var(--faint); font-family: "Hiragino Kaku Gothic ProN", sans-serif; font-size: 0.78rem; letter-spacing: 0.1em; }
.coming-page .statement { margin-bottom: 0; }
.coming-mark {
  margin: 56px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--soft);
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
}

/* Company */
.greeting { max-width: 34em; margin: 0 auto; }
.declaration { margin: 0 0 40px; font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 500; letter-spacing: 0.08em; }
.body-copy { margin: 0 0 40px; font-size: 0.95rem; line-height: 2.3; }
.contact-copy { color: var(--muted); font-family: "Hiragino Kaku Gothic ProN", sans-serif; font-size: 0.85rem; }
.language-switch { display: flex; gap: 0.7em; margin: 0; padding: 0; border: 0; background: none; color: var(--gold); font: inherit; font-size: 0.78rem; letter-spacing: 0.14em; cursor: pointer; }
.language-switch span { color: var(--soft); }
.language-switch[aria-pressed="true"] .ja-label { color: var(--soft); }
.language-switch[aria-pressed="true"] .en-label { color: var(--gold); }
[hidden] { display: none !important; }

/* 404 */
.not-found { display: grid; place-content: center; text-align: center; }
.not-found .thesis-sub { margin-bottom: 40px; }
.not-found .back { color: var(--gold); }

@media (max-width: 900px) { .gallery { columns: 2; } }
@media (max-width: 720px) {
  .index-row { grid-template-columns: 1fr; gap: 4px; }
  .index-row .go { justify-self: end; }
}
@media (max-width: 560px) {
  .gallery { columns: 1; }
  .post { grid-template-columns: 1fr; gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}
