:root {
  --paper: #f7f7f3;
  --paper-2: #efefe9;
  --ink: #0a0b0d;
  --muted: #64676d;
  --line: rgba(10, 11, 13, 0.16);
  --line-strong: rgba(10, 11, 13, 0.72);
  --blue: #0057ff;
  --blue-deep: #003dcc;
  --white: #ffffff;
  --serif: "Hiragino Mincho ProN", "Yu Mincho", YuMincho, "Noto Serif JP", serif;
  --sans: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --max: 1360px;
  --rail: clamp(20px, 3.4vw, 56px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--serif);
  font-feature-settings: "palt" 1;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  line-break: strict;
  overflow-wrap: break-word;
}
::selection { background: var(--blue); color: var(--white); }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

.site-shell {
  max-width: var(--max);
  margin: 0 auto;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  min-height: 100vh;
  background: rgba(247, 247, 243, .97);
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: stretch;
  min-height: 72px;
  background: rgba(247, 247, 243, .92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-strong);
}
.site-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 var(--rail);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.brand-mark { width: 10px; height: 10px; background: var(--blue); }
.site-nav { display: flex; }
.site-nav a {
  display: grid;
  place-items: center;
  min-width: 108px;
  min-height: 72px;
  padding: 0 18px;
  border-left: 1px solid var(--line);
  font-size: 13px;
  letter-spacing: .08em;
  transition: background .2s ease, color .2s ease;
}
.site-nav a:hover { background: var(--ink); color: var(--white); }

/* ---------- hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(260px, .9fr);
  border-bottom: 1px solid var(--line-strong);
}
.hero-main { padding: clamp(64px, 9vw, 132px) var(--rail) clamp(48px, 6.5vw, 88px); }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 26px;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--line-strong); }
.hero-title {
  margin: 0;
  font-size: clamp(38px, 6.1vw, 78px);
  font-weight: 600;
  line-height: 1.32;
  letter-spacing: .01em;
  text-wrap: balance;
}
.hero-title em {
  font-style: normal;
  color: var(--blue);
}
.hero-lead {
  max-width: 38em;
  margin: 30px 0 0;
  font-size: 15px;
  line-height: 2.0;
  color: var(--ink);
}
.hero-lead--sp { display: none; }
.hero-side {
  border-left: 1px solid var(--line);
  display: grid;
  align-content: space-between;
  justify-items: center;
  padding: 34px 28px;
  gap: 28px;
}
.hero-mascot {
  width: min(120px, 35%);
  height: auto;
  margin-top: clamp(16px, 3vw, 44px);
}
.hero-side dl { justify-self: stretch; }
.hero-side dl { margin: 0; display: grid; gap: 16px; }
.hero-side dt {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 5px;
}
.hero-side dd { margin: 0; font-size: 13.5px; line-height: 1.7; }

/* ---------- stats strip ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--line-strong);
}
.stat {
  padding: 26px var(--rail) 30px;
  border-right: 1px solid var(--line);
}
.stat:last-child { border-right: 0; }
.stat-num {
  font-family: var(--mono);
  font-size: clamp(22px, 2.6vw, 34px);
  letter-spacing: .02em;
  line-height: 1;
}
.roll { display: inline-block; overflow: hidden; height: 1em; }
.roll-col {
  display: flex;
  flex-direction: column;
  transform: translateY(0);
  transition: transform 1.4s cubic-bezier(.2, .85, .25, 1);
}
.roll-col span { display: block; height: 1em; line-height: 1; }
@media (prefers-reduced-motion: reduce) {
  .roll-col { transition: none; }
  .reveal { transition: none; }
}
.stat-num small { font-size: .55em; letter-spacing: .06em; }
.stat-label {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .06em;
}

/* ---------- section scaffold ---------- */
.section { border-bottom: 1px solid var(--line-strong); }
.section-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  padding: 30px var(--rail) 26px;
  border-bottom: 1px solid var(--line);
}
.section-title { line-height: 1; }
.section-index {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--blue);
  letter-spacing: .14em;
}
.section-title {
  margin: 0;
  font-size: clamp(22px, 2.8vw, 32px);
  font-weight: 600;
  letter-spacing: .02em;
}
.section-note {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- bookshelf ---------- */
.shelf {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: auto auto;
  padding: clamp(44px, 6vw, 80px) var(--rail) 0;
  column-gap: clamp(24px, 3vw, 48px);
  align-items: end;
}
.shelf-item {
  display: grid;
  grid-row: span 2;
  grid-template-rows: subgrid;
  gap: 0;
}
.shelf-item > a, .shelf-item > .cover-slot { align-self: end; }
.shelf-item--featured { grid-column: span 5; }
.shelf-item--std { grid-column: span 4; }
.shelf-item--slot { grid-column: span 3; }

.cover {
  position: relative;
  container-type: inline-size;
  aspect-ratio: 128 / 182;
  display: grid;
  border: 1px solid var(--line-strong);
  background: var(--white);
  box-shadow: 14px 18px 0 rgba(10, 11, 13, 0.06);
  transition: transform .35s cubic-bezier(.16, 1, .3, 1), box-shadow .35s ease;
  overflow: hidden;
}
a:hover .cover { transform: translateY(-8px); box-shadow: 16px 26px 0 rgba(10, 11, 13, 0.09); }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 10px;
  border-right: 1px solid var(--line);
  background: linear-gradient(to right, rgba(10,11,13,.10), rgba(10,11,13,0));
}

/* 仮カバー（実書影が来たら .cover 内を <img> に差し替える） */
.cover-mock {
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 12% 11% 9% 15%;
}
.cover-mock .cm-pub {
  font-family: var(--mono);
  font-size: 3cqw;
  letter-spacing: .16em;
  color: var(--muted);
}
.cover-mock .cm-title {
  align-self: center;
  font-size: 9.5cqw;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: .04em;
}
.cover-mock .cm-title .cm-sub { display: block; font-size: .46em; margin-top: 1em; color: var(--muted); font-weight: 400; line-height: 1.6; }
.cover-mock .cm-author { font-size: 4cqw; letter-spacing: .1em; }
.cover-mock--claudecode { background: linear-gradient(160deg, #ffffff 58%, #eef2ff 100%); padding-bottom: 20%; }
.cover-mock--claudecode .cm-band {
  position: absolute;
  inset: auto 0 0 0;
  height: 14%;
  background: var(--blue);
  color: var(--white);
  display: flex;
  align-items: center;
  padding: 0 12%;
  font-family: var(--mono);
  font-size: 3.6cqw;
  letter-spacing: .12em;
}
.cover-mock--atogaki { background: linear-gradient(165deg, #0a0b0d 0%, #23262d 100%); color: #f2f2ee; }
.cover-mock--atogaki .cm-pub, .cover-mock--atogaki .cm-title .cm-sub { color: rgba(242, 242, 238, .64); }

.cover-slot {
  aspect-ratio: 128 / 182;
  border: 1px dashed var(--line-strong);
  display: grid;
  place-items: center;
  place-content: center;
  gap: 10px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .16em;
  text-align: center;
}
.cover-slot::before { content: "+"; font-size: 26px; line-height: 1; }

.shelf-caption { border-top: 1px solid var(--line-strong); margin-top: -1px; padding: 18px 2px 26px; }
.shelf-item .shelf-caption { border-top: 1px solid var(--line-strong); }
.shelf-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 10px;
}
.shelf-title { margin: 0 0 8px; font-size: 17px; font-weight: 600; letter-spacing: .02em; }
.shelf-desc { margin: 0; font-size: 13px; line-height: 1.9; color: var(--muted); }
.shelf-meta {
  margin: 12px 0 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--ink);
}

.shelf-board {
  grid-column: 1 / -1;
  height: 0;
}

.shelf-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border: 1px solid var(--line-strong);
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: .06em;
  transition: background .2s ease, color .2s ease;
}
.btn:hover { background: var(--ink); color: var(--white); }
.btn--primary { background: var(--ink); color: var(--white); }
.btn--primary:hover { background: var(--blue); border-color: var(--blue); }
.btn--disabled { opacity: .45; pointer-events: none; }
.btn .arrow { font-family: var(--mono); }

/* ---------- profile ---------- */
.profile {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
}
.profile-bio {
  padding: clamp(40px, 5vw, 64px) var(--rail);
  border-right: 1px solid var(--line);
}
.profile-bio p {
  max-width: 38em;
  margin: 0 0 1.6em;
  font-size: 14.5px;
  line-height: 2.05;
}
.profile-bio p:last-child { margin-bottom: 0; }
.profile-history { padding: clamp(40px, 5vw, 64px) var(--rail); }
.timeline { margin: 0; display: grid; }
.timeline > div {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 18px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.timeline > div:first-child { padding-top: 0; }
.timeline dt {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--blue);
  padding-top: 3px;
  white-space: nowrap;
}
.timeline dd { margin: 0; font-size: 13.5px; line-height: 1.85; }
.timeline dd strong { font-weight: 600; }

/* ---------- contact ---------- */
.contact {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr);
}
.contact-main { padding: clamp(44px, 6vw, 76px) var(--rail); }
.contact-main p { max-width: 38em; margin: 0 0 1.4em; font-size: 14.5px; line-height: 2.0; }
.contact-side {
  border-left: 1px solid var(--line);
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 22px;
  padding: 36px var(--rail);
}
.contact-mascot { width: min(140px, 42%); height: auto; transform: translateX(22%); }

/* ---------- footer ---------- */
.site-footer {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: stretch;
  min-height: 72px;
}
.footer-copy {
  display: flex;
  align-items: center;
  padding: 0 var(--rail);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--muted);
}
.footer-links { display: flex; }
.footer-links a {
  display: grid;
  place-items: center;
  min-width: 100px;
  padding: 0 18px;
  border-left: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  transition: background .2s ease, color .2s ease;
}
.footer-links a:hover { background: var(--ink); color: var(--white); }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; }
  .hero-side { border-left: 0; border-top: 1px solid var(--line); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .shelf { grid-template-columns: 1fr 1fr; align-items: start; }
  .shelf-item--featured { grid-column: 1 / -1; }
  .shelf-item--std, .shelf-item--slot { grid-column: span 1; }
  .profile, .contact { grid-template-columns: 1fr; }
  .profile-bio { border-right: 0; border-bottom: 1px solid var(--line); }
  .contact-side { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 620px) {
  .site-nav a { min-width: 0; padding: 0 14px; font-size: 12px; }
  .site-nav a.nav-hide-sp { display: none; }
  .hero-title { font-size: clamp(24px, 7.4vw, 34px); }
  .hero-lead--pc { display: none; }
  .hero-lead--sp { display: block; }
  .shelf { grid-template-columns: 1fr; }
  .shelf-item--std, .shelf-item--slot { grid-column: 1 / -1; }
  .cover, .cover-slot { max-width: 320px; }
  .site-footer { grid-template-columns: 1fr; }
  .footer-copy { padding: 18px var(--rail); }
  .footer-links a { border-left: 0; border-top: 1px solid var(--line); min-height: 52px; }
}
