html {
  scroll-behavior: smooth;
}
:root {
    --bg: #f7f7f7;
    --sidebar-bg: #1e1e24;
    --sidebar-text: #ffffff;
    --accent: #4c8bf5;
    --text-main: #222222;
    --text-sub: #555555;
    --max-width: 1100px;
  }
  
  /* reset-ish */
  * {
    box-sizing: border-box;
  }
  



  /* bodyなど標準的な者の設定 */
  body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    /* background-color: #000; */
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    color: var(--text-main);
  }
  
  /* links */
  a {
    color: var(--accent);
    text-decoration: none;
  }
  a:hover {
    text-decoration: underline;
  }
  
  /* layout */
  .page-wrapper {
    display: flex;
    min-height: 100vh;
  }
  
  /* sidebar */
  .sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
  }
  
  .profile {
    text-align: left;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  

  .profile-image {
    width: 55%;
    height: auto;
    display: block;
    border-radius: 8px;
    margin-bottom: 12px;
  }


  .profile-affiliation {
    display: block;
    font-size: 13px;
    color: #b0b0c0;
    line-height: 1.4;
    margin-top: 4px;
  }
  .profile-links {
    margin-top: 8px;
    font-size: 13px;
  }
  .profile-links a {
    color: #e0e4ff;
    margin-right: 6px;
  }
  
  .nav {
    margin-top: 16px;
    border-top: 1px solid #3a3a45;
    padding-top: 12px;
    font-size: 18px;
  }
  .nav-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #a0a0b0;
    margin-bottom: 8px;
  }
  .nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  .nav li {
    margin-bottom: 6px;
  }
  .nav a {
    color: var(--sidebar-text);
    opacity: 0.9;
  }
  .nav a:hover {
    opacity: 1;
    text-decoration: underline;
  }
  
  .sidebar-footer {
    margin-top: auto;
    font-size: 14px;
    color: #8d8da0;
  }
  
  /* main content */
  .content {
    flex: 1;
    padding: 32px 32px 40px;
    display: flex;
    justify-content: center;
  }
  .content-inner {
    width: 100%;
    max-width: var(--max-width);
    background: rgba(247, 247, 247, 0.9);
    padding: 24px 24px 40px;
    /* border-radius: 12px; */
    /* box-shadow: 0 10px 30px rgba(0,0,0,0.08); */
  }
  
  section {
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e0e0e0;
  }
  section:last-of-type {
    border-bottom: none;
  }
  
  h1, h2, h3 {
    font-weight: 600;
    margin-top: 0;
  }
  h1 {
    font-size: 32px;
    color: midnightblue;
    margin-bottom: 12px;
  }
  h2 {
    font-size: 22px;
    color:orange;
    margin-bottom: 12px;
  }
  .section-subtitle {
    color: var(--text-sub);
    font-size: 14px;
    margin-bottom: 4px;
  }
  p {
    line-height: 1.7;
    margin-top: 0;
  }
  
  /* lists */
  .pub-list {
    counter-reset: pub-counter;
    list-style: none;
    padding-left: 0;
  }
  .news-list,
  .cv-list,
  .contact-list {
    list-style: none;
    padding-left: 0;
  }
  .pub-list li,
  .news-list li,
  .cv-list li,
  .contact-list li {
    margin-bottom: 8px;
  }
  
  .pub-title {
    font-weight: 600;
  }
  .pub-meta {
    font-size: 14px;
    color: var(--text-sub);
  }

/* About の「Website of Hikaru Watanabe」用2カラムレイアウト */
.hero-row {
  display: grid;
  grid-template-columns: 6fr 4fr;
  gap: 16px;
  /* align-items: start; ← これを消すだけでもOK */
}

.hero-text p {
  margin-top: 0;
  line-height: 1.7;
}

/* 右の図ブロック */

.hero-image {
  display: flex;
  justify-content: center;
  align-items: center;     /* ← 画像を縦中央に */
}

.hero-image img {
  width: 60%; /*       右カラムの幅いっぱい（=ページ幅の約30%）*/
  height: auto;
  border-radius: 8px;
  display: block;
}


/* スマホなど狭い画面では縦並びに */
@media (max-width: 720px) {
  .hero-row {
    grid-template-columns: 1fr;
  }

  .hero-image img {
    width: 70%;
    max-width: 320px;
    margin: 0.5rem auto 0;
  }

}



/* news */

/* NEWS 全体のアイテム */
.news-item {
  display: grid;
  grid-template-columns: 70% 30%;   /* 左：テキスト / 右：画像 */
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid #ddd;
  align-items: start;
}

/* 左側のテキスト側 */
.news-text {
  font-size: 0.9rem;
  color: #555;
  font-weight: 600;
}

.news-date {
  margin-right: 8px;
  font-size: 0.9rem;
  font-weight: 700;     /* 太字 */
  color: #3366cc;       /* 色を青系に変更 */
}

.news-text h3 {
  margin: 0.2rem 0 0.4rem;
}

.news-body {
  margin: 0.4rem 0;
}

/* 右側の画像側 */

.news-img {
  display: flex;
  flex-direction: column;
  align-items: center;     /* 子要素（画像・キャプション）の中心を揃える */
}

.news-img img {
  width: 75%;        /* ← カラム幅いっぱい（＝ページの30%） */
  height: auto;
  border-radius: 6px;
  display: block;
}

.news-caption {
  font-size: 0.8rem;
  color: #666;
  margin-top: 0.3rem;
  text-align: center; /* 任意：中央寄せのほうが綺麗 */
}

/* スマホ対応（1 カラムに崩す） */
@media (max-width: 720px) {
  .news-item {
    grid-template-columns: 1fr;
  }

  .news-img img {
    width: 40%;                  /* ← 適度に大きく（任意） */
    max-width: 300px;            /* 大きすぎるのを防ぐ */
    margin: 0.5rem auto 0;       /* 中央寄せ */
  }

  .news-caption {
    text-align: center;
  }
}

/* すでにある accordion のベースはそのまま使う */

.accordion-group {
  margin-top: 16px;
}

.accordion-item {
  border: 1px solid #dddddd;
  border-radius: 6px;
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.9);
  overflow: hidden;
}

/* summary を横並びに */
.accordion-item summary {
  cursor: pointer;
  padding: 8px 12px;
  list-style: none;
  font-weight: 500;
  font-size: 14px;
  display: grid;
  grid-template-columns: auto 1fr auto; /* アイコン / タイトル / サムネ */
  align-items: center;
  gap: 8px;
}

.accordion-thumb {
  margin: 0;
  width: 60px;     /* ← サムネイルの横幅 */
  height: auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

.accordion-thumb img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  object-fit: cover;
  display: block;
}
/* OPEN 時（details が開いた後）は小さくする */
.accordion-item[open] .accordion-thumb img {
  /* width: 32px;          ← 48px → 32px（3割縮小） */
  transform: scale(0.80); /* ← 微縮小で視覚的にさらに控えめに */
  opacity: 0.50;         /* ← 重要度を下げるため薄く */
}


/* デフォルトの▼を消す */
.accordion-item summary::-webkit-details-marker {
  display: none;
}

/* タイトル */
.accordion-title {
  font-size: 16px;
  transition: color 0.5s ease, font-size 0.5s ease;
  font-weight: 500;
  flex: 1;
}

.accordion-item[open] .accordion-title {
  color: #4C8BF5;
  font-size: 16px;
  font-weight: 600;
  transform: translateX(2px);   /* or scale(1.03); など */
}


/* アイコン本体 */
.accordion-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);     /* 例: #4c8bf5 */
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  transform-origin: 50% 50%;
  transition: transform 1s ease;  /* ← 1秒回転アニメーション */
}

/* アイコンの中身を疑似要素で描く（▲, ▶, ＋ など好きな記号にできる） */
.accordion-icon::before {
  content: "✦";
  font-size: 16px;
  display: block;
  transition: transform 1s ease; /* ここが“回転の滑らかさ” */
}

/* 開いたとき：アイコンを90度回転（▶ → ▼っぽく） */
.accordion-item[open] .accordion-icon::before {
  transform: rotate(180deg);
}

/* 好みでホバー時にちょっと大きくする */
/* .accordion-item summary:hover .accordion-icon::before {
  transform: scale(1.2);
} */

/* 中身 */
.accordion-content {
  padding: 8px 12px 12px;
  border-top: 1px solid #eeeeee;
  font-size: 16px;
  transition: height 0.25s ease, opacity 0.25s ease;
  /* color: #444; */
}


/* 小タイトルブロック */
.accordion-body-title {
  padding: 8px 12px 12px;
  font-weight: 600;
  font-size: 17px;
  color: midnightblue;
  margin-bottom: 10px;
}

/* 左: テキスト / 右: 図 の2カラムレイアウト */
.accordion-body {
  display: grid;
  gap: 2rem;
  grid-template-columns: 7fr 3fr;   /* ← 左7 : 右3 */
  margin: 1rem;
  align-items: start;
}

/* テキスト側の調整 */
.accordion-text p {
  margin: 4px 0;
}

/* 図側（大きい図） */
.accordion-figure {
  margin: 4px 0;
  text-align: center;
}

.accordion-figure img {
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto 4px;
}

.accordion-figure figcaption {
  font-size: 14px;
  /* color: transparent; */
  color: #666;
}
/* スマホでは縦並びに戻す */
@media (max-width: 720px) {
  .accordion-body {
    flex-direction: column;
  }
}


/* language switch */

.lang-switch {
  position: sticky;
  top: 5%;
  z-index: 20;
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  margin-bottom: 12px;
  font-size: 13px;
}

.lang-switch a,
.lang-switch .lang-current {
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #ffff42;
  text-decoration: none;
}

.lang-switch a {
  color: #555;
  background: #fff;
}

.lang-switch a:hover {
  background: #eee;
}

.lang-switch .lang-current {
  background: #1e1e24;
  color: #fff;
  border-color: #1e1e24;
}
  

  
  /* responsive */
  @media (max-width: 900px) {
    .page-wrapper {
      flex-direction: column;
    }
    .sidebar {
      position: static;
      height: auto;
      width: 100%;
      flex-direction: row;
      align-items: center;
      padding: 12px 16px;
    }
    .content {
      padding: 16px;
    }
    .content-inner {
      padding: 16px 16px 32px;
    }
    .nav-title {
      display: none;
    }
    .nav ul {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }
    .sidebar-footer {
      display: none;
    }
  }

  /* publication */


  /* publications: JA page memo (click to open) */

  .pub-list .pub-item {
    counter-increment: pub-counter;
    margin-bottom: 16px;
    position: relative;
    padding-left: 32px;
  }
  .pub-list .pub-item::before {
    content: counter(pub-counter) ".";
    position: absolute;
    left: 0;
    top: 0;
    font-weight: bold;
    color: #444;
  }

.pub-details {
  border: 1px solid #dddddd;
  border-radius: 6px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.95);
}

.pub-details summary {
  list-style: none;
  cursor: pointer;
}

.pub-details summary::-webkit-details-marker {
  display: none;
}

.pub-details[open] {
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.pub-memo {
  color: #e56fba;
  font-weight: bold;
}

.pub-memo_ja {
  margin-top: 6px;
  font-size: 13px;
  color: #333;
  padding: 8px 10px;
  background: rgba(255,255,255,0.85);
  border-left: 3px solid #999;
  border-radius: 4px;
}

/* summary をボタンっぽくする */
.memo-summary {
  display: inline-block;
  padding: 4px 10px;
  font-size: 12px;
  background: #f0f0f5;
  color: #333;
  border: 1px solid #bbb;
  border-radius: 6px;
  cursor: pointer;
  list-style: none;
}

/* デフォルトの▼マークを消す（対応ブラウザ用） */
.memo-summary::-webkit-details-marker {
  display: none;
}

.hidden-text {
  color: transparent;
}