﻿:root {
  --bg: #f4f8f4;
  --surface: #ffffff;
  --surface-soft: #f8fbf8;
  --ink: #13221c;
  --ink-soft: #42534d;
  --line: #cfddd5;
  --primary: #066a58;
  --primary-strong: #044b3f;
  --secondary: #b98a2b;
  --accent: #deecdf;
  --max: 1140px;
  --radius: 16px;
  --shadow: 0 12px 30px rgba(19, 34, 28, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;
  color: var(--ink);
  line-height: 1.68;
  background:
    radial-gradient(circle at 12% 8%, #e8f6ea 0%, transparent 36%),
    radial-gradient(circle at 88% 12%, #faefd8 0%, transparent 34%),
    var(--bg);
}

a {
  color: var(--primary-strong);
}

a:hover {
  color: var(--primary);
}

h1,
h2,
h3,
.brand-en {
  font-family: "Segoe UI", "Yu Gothic", "Meiryo", sans-serif;
  letter-spacing: 0.02em;
  line-height: 1.25;
}

p,
ul,
ol {
  margin: 0.55rem 0;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.ambient {
  position: fixed;
  width: 34vw;
  height: 34vw;
  border-radius: 999px;
  filter: blur(64px);
  opacity: 0.2;
  pointer-events: none;
  z-index: -2;
}

.ambient-left {
  left: -14vw;
  top: 18vh;
  background: #4a9a6f;
  animation: drift 14s ease-in-out infinite alternate;
}

.ambient-right {
  right: -14vw;
  bottom: 10vh;
  background: #d7aa49;
  animation: drift 18s ease-in-out infinite alternate-reverse;
}

@keyframes drift {
  from {
    transform: translateY(-10px) scale(1);
  }
  to {
    transform: translateY(18px) scale(1.08);
  }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(12px);
  background: rgba(244, 248, 244, 0.9);
  border-bottom: 1px solid rgba(19, 34, 28, 0.1);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 1rem;
}

.brand {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-en {
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 800;
}

.brand-ja {
  font-size: 0.84rem;
}

.nav-list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 0;
  margin: 0;
}

.nav-list a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 700;
}

.nav-list a:hover,
.nav-list a.active {
  color: var(--primary);
}

.menu-toggle {
  display: none;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  margin: 5px 0;
  background: var(--ink);
}

.hero,
.page-hero {
  padding: 6.6rem 0 4.7rem;
}

.hero-inner,
.page-hero-inner {
  max-width: 860px;
}

.eyebrow {
  color: var(--secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.84rem;
  font-weight: 800;
}

h1 {
  margin: 0.45rem 0 1.2rem;
  font-size: clamp(2rem, 5.5vw, 3.5rem);
}

.lead {
  font-size: 1.04rem;
  color: var(--ink-soft);
  max-width: 65ch;
}

.hero-actions {
  margin-top: 1.7rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.btn {
  display: inline-block;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 800;
  padding: 0.76rem 1.15rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.btn.primary {
  color: #fff;
  background: linear-gradient(120deg, #036655, #09937a);
  box-shadow: 0 10px 22px rgba(3, 102, 85, 0.28);
}

.btn.ghost {
  color: var(--ink);
  border: 1px solid var(--line);
  background: var(--surface);
}

.section {
  padding: 4.4rem 0;
}

.section-accent {
  background: linear-gradient(180deg, rgba(222, 236, 223, 0.58), rgba(222, 236, 223, 0.12));
}

.section h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.45rem, 4vw, 2.1rem);
}

.stats-grid,
.card-grid,
.members-grid,
.link-grid,
.kpi-grid {
  margin-top: 1.5rem;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.members-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stats-grid article,
.card,
.members-grid article,
.link-card,
.kpi,
.contact-card,
.notice,
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.1rem;
}

.card h3,
.members-grid h3,
.stats-grid h3,
.kpi h3,
.link-card h3 {
  margin: 0 0 0.45rem;
  font-size: 1.04rem;
}

.kpi p {
  margin: 0;
}

.kpi .num {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.chip {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  padding: 0.44rem 0.78rem;
}

.chip.active,
.chip:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.news-list {
  list-style: none;
  padding: 0;
  margin: 1.2rem 0 0;
  display: grid;
  gap: 0.82rem;
}

.news-list li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  grid-template-columns: 128px 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 0.9rem 1rem;
}

.news-list time {
  color: var(--primary);
  font-weight: 800;
  font-size: 0.94rem;
}

.news-list p {
  margin: 0;
}

.tag {
  font-size: 0.8rem;
  background: var(--accent);
  color: var(--primary);
  border-radius: 999px;
  font-weight: 700;
  padding: 0.22rem 0.65rem;
}

.pub-list {
  padding-left: 1.2rem;
  margin-top: 0.85rem;
  display: grid;
  gap: 0.7rem;
}

.pub-list li {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem 0.95rem;
}

.notice {
  margin-top: 1rem;
  border-left: 4px solid var(--primary);
  background: var(--surface-soft);
}

.two-col {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 1rem;
  align-items: start;
}

.table-wrap {
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 560px;
}

th,
td {
  border: 1px solid var(--line);
  padding: 0.62rem 0.68rem;
  text-align: left;
  vertical-align: top;
  background: #fff;
}

th {
  background: #edf6ef;
  font-weight: 800;
}

.breadcrumb {
  font-size: 0.92rem;
  color: var(--ink-soft);
}

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

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.9rem;
  padding: 1.2rem 0 1.6rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.footer-nav a {
  text-decoration: none;
  font-weight: 700;
}

.to-top {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  border: 0;
  background: var(--primary);
  color: #fff;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: 0.2s ease;
}

.to-top.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .kpi-grid,
  .stats-grid,
  .card-grid,
  .link-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .members-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .news-list li {
    grid-template-columns: 118px 1fr;
  }

  .tag {
    justify-self: end;
  }

  .two-col,
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .menu-toggle {
    display: block;
  }

  .nav-list {
    position: absolute;
    top: 64px;
    right: 1rem;
    display: none;
    flex-direction: column;
    gap: 0;
    width: min(76vw, 320px);
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #f9fbf8;
    box-shadow: var(--shadow);
    padding: 0.55rem;
  }

  .nav-list.open {
    display: flex;
  }

  .nav-list li {
    border-bottom: 1px solid #e7efea;
  }

  .nav-list li:last-child {
    border-bottom: 0;
  }

  .nav-list a {
    display: block;
    padding: 0.66rem 0.55rem;
  }

  .hero,
  .page-hero {
    padding-top: 5.7rem;
  }

  .kpi-grid,
  .stats-grid,
  .card-grid,
  .members-grid,
  .link-grid {
    grid-template-columns: 1fr;
  }

  .news-list li {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  .tag {
    justify-self: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

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

.thesis-table .col-year,
.thesis-table .year-col {
  width: 9em;
  min-width: 9em;
}

.thesis-table .col-type,
.thesis-table .type-col {
  width: 8em;
  min-width: 8em;
}

.thesis-table .col-link,
.thesis-table .link-col {
  width: 6em;
  min-width: 6em;
  text-align: center;
}

.elegant-page {
  background:
    radial-gradient(circle at 8% 8%, #edf8ef 0%, transparent 35%),
    radial-gradient(circle at 92% 12%, #f8eed9 0%, transparent 34%),
    linear-gradient(180deg, #f6faf6 0%, #f1f6f1 100%);
}

.danwa-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.danwa-card {
  border-left: 4px solid var(--primary);
  background: linear-gradient(180deg, #ffffff 0%, #f9fcfa 100%);
}

.danwa-card h3 {
  margin-bottom: 0.7rem;
  font-size: 1.1rem;
}

.danwa-body {
  color: #24322d;
  line-height: 1.9;
}

.danwa-body a {
  font-weight: 700;
}

.ob-body {
  line-height: 1.9;
}

.ob-body h1,
.ob-body h2 {
  margin-top: 0;
}

.ob-pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;
  font-size: 0.98rem;
}
