:root{
  --bg:#ffffff; --fg:#111; --muted:#666; --link:#008b8b; --line:#e6e6e6;
}
*{box-sizing:border-box}
html,body {
  margin: 0; padding: 0; background: var(--bg); color: var(--fg);
  font: 16px/1.7 "Times New Roman","Times","Noto Serif","Hiragino Mincho ProN","Yu Mincho","MS PMincho",serif;
}
a{color:var(--link);text-decoration:none;transition:color .2s ease}
a:hover{color:#00b3a6;text-decoration:underline}
.container{max-width:920px;margin:0 auto;padding:0 16px}

/* ===== header (desktop base) ===== */
.site-header{
  position: relative;
  background: url('/assets/header-bg.jpg') no-repeat center center;
  background-size: cover;
  color:#fff;
  overflow:hidden;
}
/* 下部だけに半透明の青緑グラデーションを重ねる */
.site-header::before{
  content:"";
  position:absolute; left:0; right:0; bottom:0;
  height:40%;
  background: linear-gradient(to top, rgba(0,139,139,0.55), rgba(0,139,139,0.00));
  z-index:0;
}
.header-inner{
  display:flex; align-items:flex-end; justify-content:space-between;
  height:480px; padding:0 0 16px 0;
  position:relative; z-index:1;
}
.site-header h1{font-size:32px;margin:0}
.site-header h1 a,
.site-header nav a,
.site-header .lang{color:#fff}
.site-header nav a{margin-left:16px;font-weight:600}
.lang{margin-left:16px;color:#fff}

/* タイトルは上品な欧文セリフで強調 */
.site-header h1{
  font-family:"Georgia","Times New Roman","Times",serif;
  letter-spacing:.3px;
}

/* ===== body ===== */
h2{font-size:20px;margin:24px 0 8px}

/* ===== NEWS section: 固定高さ＋スクロール（全体枠） ===== */
.news{
  list-style:none;
  margin:0;
  padding:8px 12px;
  max-height:320px;             /* ← 好みで 250〜400px に調整 */
  overflow-y:auto;
  border:1px solid var(--line);
  border-radius:8px;
  background:#fafafa;
}
/* スクロールバー（WebKit系） */
.news::-webkit-scrollbar { width:8px; }
.news::-webkit-scrollbar-thumb { background:rgba(0,0,0,.25); border-radius:4px; }
.news::-webkit-scrollbar-thumb:hover { background:rgba(0,0,0,.4); }

/* ===== NEWS項目：Gridで “日付固定幅 / 本文可変” ===== */
.news li{
  display:grid;
  grid-template-columns: 7.5em 1fr; /* 左:日付(固定) 右:本文(可変) */
  column-gap:.8em;
  align-items:start;
  padding:8px 0;
  border-bottom:1px solid var(--line);
}
.news li:last-child{ border-bottom:none; }

/* 左カラム（日付） */
.news time{
  grid-column:1;
  color:var(--muted);
  font-family:"Times New Roman","Times","Noto Serif","Hiragino Mincho ProN","Yu Mincho","MS PMincho",serif;
  font-size:.95em;
  line-height:1.7;
  white-space:nowrap;
}

/* 右カラム（本文全体） */
.news li > span{
  grid-column:2;
  display:block;
  line-height:1.8;
  word-break:normal;            /* 自然な改行 */
  overflow-wrap:anywhere;       /* 長いURL/DOIのみ適宜折返し */
  font-size:1em;
  -webkit-text-size-adjust:100%;/* iOSの自動拡大を抑止 */
}
.news li a, .news li em{
  font-size:inherit !important;
  line-height:inherit;
}

/* ===== footer ===== */
.site-footer{border-top:1px solid var(--line);margin-top:40px;padding:24px 0;color:var(--muted);font-size:14px}
main p{margin:0 0 12px}

/* ===== 2-column layout for pages with sidebar ===== */
.wrap{
  max-width:1100px; margin:24px auto; padding:0 16px;
  display:flex; gap:24px;
}
.content{ flex:1; min-width:0; }
.sidebar{ width:280px; flex:0 0 280px; }

/* ===== Profile card ===== */
.profile-card{
  background:#fff; border:1px solid var(--line); border-radius:16px;
  padding:16px; box-shadow:0 2px 10px rgba(0,0,0,.04);
}
.profile-photo{
  width:100%; aspect-ratio:3/4; object-fit:cover;
  border-radius:12px; display:block; margin-bottom:12px;
}
.profile-card h3{ margin:8px 0 6px; font-size:18px; }
.profile-card p{ margin:6px 0 10px; color:var(--fg); }
.profile-card .mono{ font-family:ui-monospace,Menlo,Consolas,monospace; font-size:14px; color:#444; }
.profile-links{ list-style:none; padding:0; margin:10px 0 0; }
.profile-links li{ margin:6px 0; }

/* ===== responsive tweaks ===== */
@media (max-width:960px){
  .wrap{ flex-direction:column; }
  .sidebar{ width:auto; }
}

/* ===== Mobile header layout ===== */
@media (max-width: 600px){
  .site-header .container{
    padding-left: calc(20px + env(safe-area-inset-left));
    padding-right: calc(20px + env(safe-area-inset-right));
  }

  .header-inner{
    height:400px; padding:16px 0;
    flex-direction:column;
    align-items:center;
    gap:10px; text-align:center;
  }

  .site-header h1{ margin:0; font-size:26px; }
  .site-header h1 a{ display:inline-block; white-space:nowrap; padding:4px 0; }

  .site-header nav{
    display:flex; flex-wrap:wrap; justify-content:center;
    gap:6px 14px; line-height:1.6;
  }
  .site-header nav a{ margin-left:0; font-size:14px; }

  .site-header .lang{
    display:block; width:100%; margin:2px 0 0; text-align:center; font-size:13px;
  }

  .wrap{ margin:12px auto; gap:12px; }
  .profile-card{ padding:12px; border-radius:12px; }
  .profile-photo{ border-radius:10px; max-width:70%; margin:0 auto 10px; display:block; }
  h2{ font-size:18px; margin:16px 0 6px; }

  .news{ max-height:400px; }
  .news li{
    grid-template-columns: 7.5em 1fr;
    column-gap:.6em;
    padding:6px 0;
  }
  .news time{ font-size:.9em; }
}

/* ====== Compact header for subpages ====== */
.site-header.is-compact .header-inner{
  height:220px; padding:0 0 14px 0;
  flex-direction:row; align-items:flex-end; gap:12px;
}
.site-header.is-compact h1{ margin:0; font-size:28px; }
.site-header.is-compact nav{ display:flex; flex-wrap:nowrap; align-items:center; }
.site-header.is-compact nav a{ margin-left:14px; font-size:16px; }
.site-header.is-compact .lang{ margin-left:14px; font-size:15px; }
.site-header.is-compact::before{
  height:24%;
  background:linear-gradient(to top, rgba(0,139,139,0.38), rgba(0,139,139,0.00));
}

@media (max-width:600px){
  .site-header.is-compact .header-inner{
    height:auto; padding:14px 0; flex-direction:column; align-items:center; text-align:center; gap:8px;
  }
  .site-header.is-compact h1{ font-size:22px; }
  .site-header.is-compact nav{ flex-wrap:wrap; justify-content:center; gap:6px 12px; }
  .site-header.is-compact nav a{ margin-left:0; font-size:14px; }
  .site-header.is-compact .lang{ display:block; width:100%; margin-top:2px; text-align:center; font-size:13px; }
  .site-header.is-compact::before{ height:40%; }
}

/* ===== Awards section: NEWSと同一レイアウト（スクロールなし） ===== */
.awards{
  list-style:none;
  margin:0;
  padding:8px 12px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#fafafa;
}
/* NEWSと同じ：Grid 2カラム（左:7.5em, 右:自動） */
.awards li{
  display:grid;
  grid-template-columns: 7.5em 1fr;
  column-gap:.8em;
  align-items:start;
  padding:8px 0;
  border-bottom:1px solid var(--line);
}
.awards li:last-child{ border-bottom:none; }

.awards time{
  grid-column:1;
  color:var(--muted);
  font-family:"Times New Roman","Times","Noto Serif","Hiragino Mincho ProN","Yu Mincho","MS PMincho",serif;
  font-size:.95em;
  line-height:1.7;
  white-space:nowrap;
}
.awards li > span{
  grid-column:2;
  display:block;
  line-height:1.8;
  word-break:normal;
  overflow-wrap:anywhere;
  font-size:1em;
  -webkit-text-size-adjust:100%;
}
.awards li a, .awards li em{
  font-size:inherit !important;
  line-height:inherit;
}

/* スマホ時もNEWSと同じ幅・見え方（縦積みにしない） */
@media (max-width:600px){
  .awards li{
    grid-template-columns: 7.5em 1fr;
    column-gap:.6em;
    padding:6px 0;
  }
  .awards time{ font-size:.9em; }
}

/* ==== Mobile: ナビの可読性アップ（白文字×写真でも読める） ==== */
@media (max-width: 600px){
  .site-header nav{
    display:flex; flex-wrap:wrap; justify-content:center;
    gap: 8px 10px;
  }
  .site-header nav a,
  .site-header .lang{
    font-size: 16px;              /* ← 少し大きく */
    font-weight: 700;             /* ← 太めで視認性UP */
    line-height: 1.3;
    color: #fff;
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 999px;         /* ← pill 形状 */
    background: rgba(0,0,0,.32);  /* ← 写真上でも読める半透明 */
    text-shadow: 0 1px 2px rgba(0,0,0,.35);
  }
  .site-header nav a:hover,
  .site-header .lang:hover{
    background: rgba(0,0,0,.42);
  }

  /* コンパクトヘッダーでも同様の見やすさ */
  .site-header.is-compact nav{ gap: 8px 10px; }
  .site-header.is-compact nav a,
  .site-header.is-compact .lang{
    font-size: 16px;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(0,0,0,.28);
    text-shadow: 0 1px 2px rgba(0,0,0,.35);
  }
}

/* ==== Mobile: 本文のサイズ/行間を控えめに ==== */
@media (max-width: 600px){
  html { font-size: 15px; }                 /* 16px→15pxに微調整 */
  body { -webkit-text-size-adjust: 100%; }

  .content { font-size: 0.98rem; }
  .content p, .content li { line-height: 1.65; }

  .news li > span,
  .awards li > span { line-height: 1.7; }
  .news time,
  .awards time { font-size: .92em; }
}
