/* =============================================================
   重松研究室 サイト共通スタイル
   色・余白などの基本設定は :root のカスタムプロパティを編集する
   ============================================================= */

:root {
  /* カラーパレット(青系×グレースケール) */
  --c-bg: #f6f7f9;
  --c-surface: #ffffff;
  --c-text: #15181e;
  --c-text-muted: #5b6472;
  --c-primary: #2563eb;      /* ブルー */
  --c-primary-dark: #1e40af;
  --c-primary-light: #e9effc;
  --c-accent: #38bdf8;       /* シアンアクセント */
  --c-border: #e2e5ea;
  --c-hero-from: #05070d;
  --c-hero-to: #0b1b3a;

  /* タイポグラフィ */
  --font-body: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic UI",
    "Meiryo", system-ui, sans-serif;

  /* レイアウト */
  --max-width: 1080px;
  --radius: 14px;
  --shadow: 0 2px 12px rgba(28, 35, 33, 0.07);
  --shadow-hover: 0 8px 24px rgba(28, 35, 33, 0.12);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.8;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--c-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- ヘッダー ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 248, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--c-border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  white-space: nowrap;
}

.brand a {
  color: var(--c-text);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.brand a:hover {
  text-decoration: none;
  color: var(--c-primary);
}

.brand .brand-en {
  font-size: 0.72rem;
  color: var(--c-text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.global-nav ul {
  display: flex;
  list-style: none;
  gap: 4px;
}

.global-nav a {
  display: block;
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--c-text);
  font-size: 0.92rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}

.global-nav a:hover {
  background: var(--c-primary-light);
  color: var(--c-primary-dark);
  text-decoration: none;
}

.global-nav a.active {
  background: var(--c-primary);
  color: #fff;
}

/* モバイルメニュー */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--c-text);
  padding: 8px;
}

/* ---------- ヒーロー ---------- */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--c-hero-from), var(--c-hero-to));
  color: #fff;
  padding: 108px 0 116px;
  overflow: hidden;
}

/* カオスアトラクタ描画用キャンバス(js/hero-canvas.js) */
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(100deg, rgba(5, 7, 13, 0.85) 0%, rgba(5, 7, 13, 0.45) 45%, transparent 75%),
    radial-gradient(ellipse 600px 400px at 88% 15%, rgba(56, 189, 248, 0.1), transparent);
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 2;
}

.hero-tagline {
  font-size: clamp(1.7rem, 4.5vw, 2.8rem);
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1.4;
  margin-bottom: 18px;
}

.hero-sub {
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: rgba(255, 255, 255, 0.85);
  max-width: 640px;
  margin-bottom: 34px;
}

.hero-lab-name {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--c-accent);
  border: 1px solid rgba(56, 189, 248, 0.5);
  border-radius: 999px;
  padding: 4px 16px;
  margin-bottom: 26px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--c-accent);
  color: #05070d;
}

.btn-primary:hover {
  box-shadow: 0 6px 18px rgba(56, 189, 248, 0.4);
}

.btn-ghost {
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  color: #fff;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* ---------- ページヘッダー(下層ページ) ---------- */
.page-header {
  background: linear-gradient(135deg, var(--c-hero-from), var(--c-hero-to));
  color: #fff;
  padding: 52px 0;
}

.page-header h1 {
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  letter-spacing: 0.04em;
}

.page-header .page-header-en {
  color: var(--c-accent);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* ---------- セクション ---------- */
.section {
  padding: 64px 0;
}

.section-title {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.section-title-en {
  color: var(--c-primary);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 4px;
}

.section-lead {
  color: var(--c-text-muted);
  margin-bottom: 36px;
  max-width: 680px;
}

.section-more {
  text-align: center;
  margin-top: 32px;
}

/* ---------- カード ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  transition: transform 0.15s, box-shadow 0.15s;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--c-primary-light);
  color: var(--c-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.card-icon svg {
  width: 26px;
  height: 26px;
}

.card h3 {
  font-size: 1.12rem;
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}

.card p {
  font-size: 0.92rem;
  color: var(--c-text-muted);
}

.keyword-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
}

.keyword {
  font-size: 0.75rem;
  background: var(--c-primary-light);
  color: var(--c-primary-dark);
  border-radius: 999px;
  padding: 3px 12px;
  font-weight: 500;
}

/* ---------- お知らせ ---------- */
.news-list {
  list-style: none;
  border-top: 1px solid var(--c-border);
}

.news-item {
  display: grid;
  grid-template-columns: 110px 90px 1fr;
  gap: 16px;
  align-items: baseline;
  padding: 18px 8px;
  border-bottom: 1px solid var(--c-border);
}

.news-date {
  color: var(--c-text-muted);
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
}

.news-category {
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
  border-radius: 999px;
  padding: 2px 0;
  background: var(--c-primary-light);
  color: var(--c-primary-dark);
}

.news-category[data-cat="受賞"] {
  background: #edeff3;
  color: #3d4654;
}

.news-category[data-cat="発表"] {
  background: #e3edfa;
  color: #1d4f91;
}

.news-category[data-cat="イベント"] {
  background: #e0f4fc;
  color: #0e7490;
}

.news-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.news-body {
  grid-column: 3;
  font-size: 0.88rem;
  color: var(--c-text-muted);
  margin-top: 4px;
}

/* ---------- メンバー ---------- */
.member-faculty-card {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.member-avatar {
  flex-shrink: 0;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-primary), var(--c-primary-dark));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
}

.member-name {
  font-size: 1.25rem;
  font-weight: 700;
}

.member-name-en {
  color: var(--c-text-muted);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  margin-left: 10px;
}

.member-role {
  color: var(--c-primary);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.member-message {
  font-size: 0.92rem;
  color: var(--c-text-muted);
}

.member-links {
  margin-top: 10px;
  display: flex;
  gap: 14px;
  font-size: 0.88rem;
}

/* テーブル(学生・卒業生・業績) */
.simple-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--c-surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.simple-table th,
.simple-table td {
  text-align: left;
  padding: 14px 18px;
  border-bottom: 1px solid var(--c-border);
  font-size: 0.92rem;
}

.simple-table th {
  background: var(--c-primary-light);
  color: var(--c-primary-dark);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
}

.simple-table tr:last-child td {
  border-bottom: none;
}

/* ---------- 業績リスト ---------- */
.pub-list {
  list-style: none;
  counter-reset: pub;
}

.pub-item {
  position: relative;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 18px 22px 18px 58px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  font-size: 0.93rem;
}

.pub-item::before {
  counter-increment: pub;
  content: counter(pub);
  position: absolute;
  left: 18px;
  top: 18px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--c-primary-light);
  color: var(--c-primary-dark);
  font-weight: 700;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pub-title {
  font-weight: 600;
}

.pub-meta {
  color: var(--c-text-muted);
  font-size: 0.86rem;
}

/* ---------- アクセス ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.contact-block {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.contact-block h3 {
  font-size: 1.05rem;
  margin-bottom: 12px;
  color: var(--c-primary-dark);
}

.contact-block dl dt {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--c-text-muted);
  margin-top: 12px;
}

.contact-block dl dd {
  margin-left: 0;
}

/* ---------- CTA バンド ---------- */
.cta-band {
  background: linear-gradient(135deg, var(--c-primary-dark), var(--c-primary));
  color: #fff;
  border-radius: var(--radius);
  padding: 44px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.cta-band h2 {
  font-size: 1.3rem;
  letter-spacing: 0.03em;
}

.cta-band p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.92rem;
}

/* ---------- フッター ---------- */
.site-footer {
  background: #0b1220;
  color: rgba(255, 255, 255, 0.75);
  padding: 44px 0 28px;
  margin-top: 48px;
  font-size: 0.88rem;
}

.site-footer .footer-lab {
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.site-footer .footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  list-style: none;
  margin: 18px 0 24px;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.75);
}

.site-footer a:hover {
  color: #fff;
}

.footer-copy {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 18px;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.5);
}

/* ---------- お知らせ詳細記事 ---------- */
.article {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 40px 44px;
  box-shadow: var(--shadow);
  max-width: 760px;
  margin: 0 auto;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.article-meta .news-category {
  padding: 2px 14px;
}

.article-title {
  font-size: 1.45rem;
  line-height: 1.5;
  letter-spacing: 0.02em;
  margin-bottom: 22px;
}

.article-body p {
  margin-bottom: 16px;
  font-size: 0.95rem;
}

.article-body ul {
  margin: 0 0 16px 1.4em;
  font-size: 0.95rem;
}

.article-body li {
  margin-bottom: 6px;
}

.article-refs {
  border-top: 1px solid var(--c-border);
  margin-top: 24px;
  padding-top: 18px;
}

.article-refs h2 {
  font-size: 0.95rem;
  color: var(--c-primary-dark);
  margin-bottom: 8px;
}

.article-refs ul {
  margin-left: 1.4em;
  font-size: 0.92rem;
}

.article-source {
  margin-top: 18px;
  font-size: 0.85rem;
  color: var(--c-text-muted);
}

@media (max-width: 600px) {
  .article {
    padding: 28px 22px;
  }
}

/* ---------- researchmap リンクカード ---------- */
.researchmap-card {
  background: linear-gradient(135deg, var(--c-hero-from), var(--c-hero-to));
  color: #fff;
  border-radius: var(--radius);
  padding: 56px 40px;
  text-align: center;
  box-shadow: var(--shadow-hover);
}

.researchmap-card h2 {
  font-size: 1.35rem;
  letter-spacing: 0.03em;
  margin-bottom: 12px;
}

.researchmap-card p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.93rem;
  max-width: 560px;
  margin: 0 auto 28px;
}

/* ---------- スクロール時フェードイン ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- レスポンシブ ---------- */
@media (max-width: 820px) {
  .nav-toggle {
    display: block;
  }

  .global-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--c-surface);
    border-bottom: 1px solid var(--c-border);
    box-shadow: var(--shadow-hover);
  }

  .global-nav.open {
    display: block;
  }

  .global-nav ul {
    flex-direction: column;
    padding: 12px 20px;
  }

  .news-item {
    grid-template-columns: 90px 76px 1fr;
    gap: 10px;
  }

  .member-faculty-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .member-links {
    justify-content: center;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .news-item {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .news-body {
    grid-column: 1;
  }
}
