/* ==============================
   基本設定
============================== */
@charset "UTF-8";
body {
  font-family:"ヒラギノ角ゴ Pro W3","メイリオ",sans-serif;
  background-color: #dddddd;
  margin: 0;
  line-height: 1.7;
}

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

/* ==============================
   ヘッダー
============================== */
header {
  position: relative;          /* ← これ重要 */
  padding: 60px 20px;
  background-image: url(jupiter1.jpg);
  background-size: cover;
  background-position: center;
  color: #ffffff;
  text-align: center;
  overflow: hidden;
}

/* 半透明オーバーレイ */
header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35); /* ← 暗さ調整はここ */
  z-index: 0;
}

/* 文字を前面に出す */
header h1,
header p {
  position: relative;
  z-index: 1;
}

/* ==============================
   ナビ（言語切替）
============================== */
nav {
  text-align: center;
  margin: 20px auto;
}

nav .btn {
  margin: 4px;
}

/* ==============================
   コンテンツ構造
============================== */
article {
  background-color:#ffffff;
  padding: 16px;
  max-width: 1100px;
  margin: auto;
  border-radius: 4px;
}

h2 {
  font-size: 22px;
  background-color: #444444;
  color: #ffffff;
  padding: 10px;
  border-radius: 4px;
  margin-top: 40px;
}


/* ==============================
   プロフィール（読みやすさ改善）
   ※レイアウト全体は変えず、本文だけ整えます
============================== */
.profile-block{
  max-width: 75ch;           /* 1行を長くしすぎない */
  margin: 18px auto 0;       /* 中央寄せ */
  padding: 2px 6px;
}

.profile-block p,
.profile-block P{
  font-size: 1.05rem;
  line-height: 1.9;
  margin: 0 0 1em;
}

.profile-block a{
  word-break: break-word;
}

/* モバイルでは少しだけ文字を小さく */
@media (max-width: 600px){
  .profile-block p,
  .profile-block P{
    font-size: 1rem;
    line-height: 1.85;
  }
}


/* ==============================
   本のカードレイアウト
============================== */
ul.book {
  list-style-type: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  padding: 0;

}

li.book {
  border: 1px solid #cccccc;
  padding: 12px;
  border-radius: 6px;
  background-color: #ffffff;
}

li.book h3 {
  font-size: 16px;
  margin: 8px 0;
  font-weight: bold;
}

li.book p {
  font-size: 14px;
  margin-top: 6px;
}

/* ==============================
   フッター
============================== */
footer {
  background-color:#333333;
  color:#ffffff;
  padding:16px;
  text-align:center;
  font-size: 14px;
}

footer a {
  color: #ffffff !important;
  text-decoration: none;
}

footer a:hover {
  color: #cccccc !important; /* ホバー時は少しグレーに */
}

/* ==============================
   ボタン
============================== */
a.btn {
  display: inline-block;
  padding: 6px 12px;
  border: 2px solid #444444;
  color: #444444;
  text-decoration: none;
}

a.btn:hover {
  background-color: #444444;
  color: #ffffff;
}

@media (min-width: 1024px) {
  ul.book {
    grid-template-columns: repeat(4, 1fr);  /* PCでは4列 */
  }

  li.book {
    padding: 8px;
  }

  li.book h3 {
    font-size: 14px;
  }
}

.float-left {
  float: left;
  margin: 10px 15px 10px 0;
  width: 200px;   /* 画像サイズ調整 */
}