/* ===== Base ===== */
:root {
  --bg: #edf4ef;
  --bg-soft: #f7faf7;
  --surface: rgba(255, 255, 255, 0.92);
  --text: #243128;
  --muted: #627061;
  --line: #d7dfd5;
  --accent: #4d6b50;
  --accent-deep: #2f4a33;
  --shadow: 0 18px 42px rgba(34, 49, 40, 0.08);
  --radius: 18px;
  --max: 1080px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Noto Sans JP", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(77, 107, 80, 0.10), transparent 26%),
    radial-gradient(circle at top right, rgba(47, 74, 51, 0.08), transparent 22%),
    linear-gradient(180deg, #f4f8f4 0%, var(--bg) 100%);
  line-height: 1.8;
}

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

a {
  color: var(--accent-deep);
  text-underline-offset: 0.18em;
}

a:hover {
  opacity: 0.84;
}

.container {
  width: min(calc(100% - 32px), var(--max));
  margin-inline: auto;
}

main {
  padding-bottom: 72px;
}

/* ===== Header ===== */
.site-header {
  padding: 84px 0 40px;
}

.hero {
  position: relative;
}

.eyebrow,
.section-kicker {
  margin: 0 0 10px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.site-header h1 {
  margin: 0;
  font-size: clamp(2.2rem, 4.2vw, 4rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.site-header h1 span {
  display: block;
  margin-top: 0.35em;
  font-size: clamp(1.1rem, 1.8vw, 1.5rem);
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.lead {
  max-width: 760px;
  margin: 20px 0 0;
  font-size: 1.05rem;
  color: var(--muted);
}

.language-nav {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
  padding: 8px;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(255,255,255,0.88);
  border-radius: 999px;
  box-shadow: var(--shadow);
}

.language-nav a {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--muted);
  font-weight: 700;
}

.language-nav a.active {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
}

/* ===== Layout ===== */
.intro-grid,
.two-col,
.work-grid {
  display: grid;
  gap: 24px;
}

.intro-grid,
.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 24px;
}

.work-grid {
  grid-template-columns: minmax(180px, 240px) 1fr;
  align-items: center;
}

/* ===== Cards ===== */
.card {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.86);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  padding: 28px;
}

.section-heading {
  margin-bottom: 18px;
}

.section-heading h2 {
  margin: 0;
  font-size: 1.7rem;
  line-height: 1.3;
}

h1, h2, h3 {
  color: var(--accent-deep);
}

h3 {
  margin: 22px 0 10px;
  font-size: 1.08rem;
}

.featured-work {
  margin-bottom: 24px;
}

/* ===== Profile ===== */
.profile-list {
  margin: 0;
}

.profile-list > div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.profile-list > div:first-child {
  border-top: none;
  padding-top: 0;
}

.profile-list dt {
  font-weight: 700;
  color: var(--muted);
}

.profile-list dd {
  margin: 0;
}

/* ===== Timeline ===== */
.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
}

.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  padding: 0 0 18px 22px;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  box-shadow: 0 0 0 5px rgba(77, 107, 80, 0.12);
}

.timeline li::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1.18em;
  bottom: 0;
  width: 2px;
  background: var(--line);
}

.timeline li:last-child::after {
  display: none;
}

.year {
  font-weight: 700;
  color: var(--accent-deep);
}

/* ===== Work ===== */
.book-cover {
  display: block;
  width: fit-content;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 18px 32px rgba(34, 49, 40, 0.14);
}

.work-copy h3 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 1.4rem;
}

/* ===== Lists ===== */
.stack-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.compact-list li {
  margin: 0 0 16px;
  padding: 0;
}

.compact-list li:last-child {
  margin-bottom: 0;
}

.plain-list p {
  margin: 0 0 18px;
}

.plain-list p:last-child {
  margin-bottom: 0;
}

/* ===== Buttons ===== */
.button-row {
  margin-top: 20px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  box-shadow: 0 10px 24px rgba(77, 107, 80, 0.22);
}

.button.secondary {
  background: #fff;
  color: var(--accent-deep);
  border: 1px solid var(--line);
  box-shadow: none;
}

/* ===== Divider ===== */
hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 20px 0;
}

/* ===== Footer ===== */
.site-footer {
  padding: 0 0 48px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}

.footer-links a {
  display: inline-flex;
  padding: 12px 16px;
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(255,255,255,0.88);
  border-radius: 999px;
  text-decoration: none;
  box-shadow: var(--shadow);
}

/* ===== Responsive ===== */
@media (max-width: 700px) {
  .intro-grid,
  .two-col,
  .work-grid,
  .timeline li,
  .profile-list > div {
    grid-template-columns: 1fr;
  }

  .timeline li {
    gap: 6px;
  }
}

@media (max-width: 560px) {
  .site-header {
    padding-top: 64px;
  }

  .card {
    padding: 22px 18px;
  }

  .language-nav {
    width: 100%;
    justify-content: center;
    border-radius: 18px;
  }

  .language-nav a {
    flex: 1 1 auto;
    text-align: center;
  }
}

/* 書籍ボタンだけ強調 */
.button.secondary {
  background: #fff;
  color: var(--accent-deep);
  border: 1px solid var(--line);
  box-shadow: none;
}

.button.secondary:hover {
  background: #2f4a33;
}


.button-row {
  display: flex;
  justify-content: center;   /* 中央寄せ */
  gap: 12px;
  flex-wrap: wrap;           /* 折り返し */
}

.button {
  flex: 0 0 auto;            /* 幅を固定（←重要） */
  padding: 0 18px;
  white-space: nowrap;       /* 改行防止 */
}

.two-col {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.two-col .card {
  flex: 1;
  min-width: 280px;
}


.two-col {
  display: flex;
  gap: 24px;
  align-items: stretch;
}

.two-col .card {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card .button-row {
  margin-top: auto;
}

.two-col {
  display: flex;
  gap: 24px;
  align-items: stretch;
}

.two-col > .card {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 520px;
}

.two-col > .card .work-copy {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.two-col > .card .button-row {
  margin-top: auto;
}


.publications-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.publication-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 560px;
}

.publication-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.publication-card .button-row {
  margin-top: 24px;
}

.publication-card .button {
  width: 100%;
  text-align: center;
  box-sizing: border-box;
}

.button-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.button-column .button {
  width: 100%;
  text-align: center;
}

/* card の高さと重なり対策 */
.card {
  box-sizing: border-box;
  height: auto;
  min-height: 0;
  margin: 0;
  overflow: hidden;
}

/* section 同士の間隔 */
main section {
  margin-bottom: 2rem;
}

/* 2カラムやグリッド内のカード */
.intro-grid,
.two-col,
.publications-grid {
  align-items: start;
}

/* 見出しや本文の余白を詰めすぎ・空きすぎ防止 */
.card h2,
.card h3,
.card h4,
.card p,
.card ul,
.card ol,
.card dl {
  margin-top: 0;
}

/* 最後の要素の下余白を暴れさせない */
.card > *:last-child {
  margin-bottom: 0;
}

/* ボタン行が大きく空くのを防ぐ */
.button-row,
.button-column {
  margin-top: 1rem;
}

/* ===== Featured Book 修正ここから ===== */

/* 枠を消す */
.featured-work,
.featured-work.card {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

/* ボタン縦並び */
.featured-work .button-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ボタンサイズ統一 */
.featured-work .button {
  width: 300px;
  max-width: 100%;
  text-align: center;
}

/* 右寄せを強制的に戻す（応急処置） */
.publications-grid {
  display: block;
}

/* ===== Featured Book 修正ここまで ===== */

/* ===== Featured Book 修正 ===== */

/* Featured Book の外枠を消す */
.featured-work {
  background: none;
  border: none;
  box-shadow: none;
  padding: 0;
}

/* 中身を左寄せに戻す */
.featured-work .work-grid {
  align-items: start;
}

/* ボタンを縦並び・同じサイズにする */
.featured-work .button-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

/* ボタンだけ同じ幅にする */
.featured-work .button {
  width: 220px;
  flex: none;
  text-align: center;
}

/* ===== 追加ここから ===== */

/* 枠を消す */
.featured-work,
.featured-work.card,
.featured-work .card {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

/* ボタンを縦並びにする */
.featured-work .button-row {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px;
}

/* ===== 追加ここまで ===== */

/* ===== Featured Book 枠を消す ===== */

.featured-work .card {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.featured-work {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
}

/* Featured Book の枠を強制的に消す */
section.featured-work,
section.featured-work.card,
.featured-work,
.featured-work.card {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}

/* Featured Book 内のカード枠も全部消す */
.featured-work .card,
.featured-work > .card,
.featured-work .work-grid {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* ===== SNSボタン修正 ===== */

.button-row {
  display: flex;
  flex-direction: column;   /* 縦並び */
  align-items: flex-start;  /* 左寄せ */
  gap: 10px;
}

.button-row .button {
  width: 220px;             /* 同じサイズ */
  text-align: center;
}

/* ===== セクションの白枠を消す ===== */

.featured-work,
.featured-work .card {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
}

/* ===== Featured Book の白枠を消す ===== */
.publication-card,
.featured-work,
.featured-work .card {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* ===== Amazon / Google Scholar ボタン ===== */

.featured-work .button-row,
.publication-card .button-row {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 12px !important;
}

.featured-work .button,
.publication-card .button,
.featured-work a[href*="scholar"],
.publication-card a[href*="scholar"] {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 320px !important;
  max-width: 100%;
  min-height: 48px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  text-align: center;
}

.button-row .button {
  width: auto;
  min-width: 180px;
  padding: 0 24px;
}

/* ===== 全ボタン横幅統一 ===== */

.button {
  width: 260px;          /* ← 好きな幅に調整OK */
  max-width: 100%;
  text-align: center;
  justify-content: center;
}

/* ===== Amazon / Scholar ボタン幅を揃える ===== */

.featured-work .button {
  width: 220px !important;   /* ← 好きな幅に調整OK */
  max-width: 100%;
  padding: 0 16px !important;
  justify-content: center;
}

/* ===== Go to Amazon / Google Scholar だけ幅を狭くする ===== */
.featured-work .button-row .button {
  width: 220px !important;
  max-width: 220px !important;
  min-width: 0 !important;
  flex: 0 0 220px !important;
  padding-left: 12px !important;
  padding-right: 12px !important;
}

/* ===== 横幅だけ揃える（高さは維持） ===== */

.button {
  width: auto !important;
  max-width: 260px;   /* ← ここだけ調整 */
  min-width: 180px;
  white-space: nowrap; /* ← 折り返し防止（重要） */
  justify-content: center;
  text-align: center;
}

/* ===== 全ボタンを小さいサイズに統一 ===== */

.button {
  width: auto !important;         /* 固定幅を解除 */
  min-width: 0 !important;
  padding: 0 14px !important;     /* ← 小さめに統一 */
  font-size: 14px;                /* ← 必要なら調整 */
  white-space: nowrap;            /* ← 改行防止 */
  flex: 0 0 auto !important;
}

/* Amazonボタンを他のボタンと同じサイズにする */
.featured-work .button {
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  flex: 0 0 auto !important;
  padding: 0 18px !important;
  border-radius: 999px;
}

/* Amazonボタンを「論文一覧を見る」と同じ普通サイズに戻す */
.featured-work .button {
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  flex: none !important;

  min-height: 46px !important;
  padding: 0 18px !important;
  border-radius: 999px !important;
  white-space: nowrap !important;
}

/* Amazonボタンだけ横幅を最低限広げる */
.featured-work .button {
  min-width: 160px !important;
  justify-content: center;
}

/* 小さいボタン（フッター風） */
.button.small {
  width: auto;
  flex: none;
  padding: 10px 18px;
  min-height: auto;
  border-radius: 999px;
}

/* フッター風の小さいボタン */
.button.small {
  width: auto !important;
  flex: none !important;
  padding: 12px 18px;
  min-height: auto;
  background: rgba(255,255,255,0.82);
  color: var(--accent-deep);
  border: 1px solid rgba(255,255,255,0.88);
  box-shadow: var(--shadow);
}

/* 小さいボタンを横いっぱいにしない */
.button-column .button.small,
.publication-card .button.small {
  width: auto !important;
  align-self: flex-start;
}

/* Amazonボタンだけ正常サイズに戻す */
.button.small {
  min-height: auto;
  height: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  width: auto !important;
  aspect-ratio: auto;   /* ←これが効く場合あり */
}

.amazon-btn {
  width: auto !important;
  min-height: auto;
  height: auto;
  aspect-ratio: auto;
  padding: 12px 20px;
}

/* Amazonボタンを横長に固定 */
.publication-card .button-row a.amazon-wide {
.publication-card .button-row a.amazon-wide {
  width: auto !important;        /* ←ここが重要 */
  max-width: none;
  height: 56px;
  padding: 0 28px;
  border-radius: 999px;
  display: inline-flex;
}
  max-width: none !important;
  height: 56px !important;
  min-height: 56px !important;
  max-height: 56px !important;
  padding: 0 28px !important;
  border-radius: 999px !important;
  aspect-ratio: unset !important;
  flex: none !important;
}

/* Publications全体を白枠に */
.publications-card {
  background: #fff;
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

/* 本のAmazonボタンだけ横長にする */
.book-amazon-button {
  width: 100% !important;
  max-width: 420px !important;
  height: 56px !important;
  min-height: 56px !important;
  max-height: 56px !important;
  padding: 0 28px !important;
  border-radius: 999px !important;
  aspect-ratio: auto !important;
  flex: none !important;
  display: inline-flex !important;
}

.button-column .button.small {
  width: auto !important;
  flex: none !important;
  align-self: flex-start;
  padding: 12px 20px;
}

.button.secondary.main-link {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff;
  border: none;
}
