/* ============================================================
   甲斐研究室 — 共通スタイルシート
   style.css
============================================================ */

@import url("https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=Noto+Serif+JP:wght@300;400;600&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&display=swap");

/* ─── Design Tokens ─────────────────────────────────── */
:root {
  --navy: #0d1b2a;
  --navy-mid: #1a2e42;
  --navy-light: #243b55;
  --teal: #1eb8a0;
  --teal-light: #4ecdb8;
  --teal-muted: rgba(30, 184, 160, 0.12);
  --cream: #f5f0e8;
  --cream-dark: #ede5d6;
  --text-dark: #0d1b2a;
  --text-mid: #4a5568;
  --text-light: #8a9bb0;
  --white: #ffffff;
  --border: rgba(13, 27, 42, 0.1);
  --font-serif: "DM Serif Display", "Noto Serif JP", Georgia, serif;
  --font-sans: "DM Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --gutter: clamp(24px, 5vw, 64px);
  --max-w: 1080px;
}

/* ─── Reset ──────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: var(--font-sans);
  background: var(--cream);
  color: var(--text-dark);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: inherit;
}

/* ─── Layout Wrapper ────────────────────────────────── */
.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ─── Navigation ────────────────────────────────────── */
.nav {
  background: var(--navy);
  position: sticky;
  top: 0;
  z-index: 200;
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 24px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-logo-mark {
  width: 32px;
  height: 32px;
  border: 1.5px solid rgba(30, 184, 160, 0.35);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nav-logo-text {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 300;
  letter-spacing: 0.02em;
  line-height: 0.8;
}
.nav-logo-text strong {
  font-weight: 500;
  font-size: 14.5px;
  display: block;
  color: #fff;
}
.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}
.nav-links a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.04em;
  transition: color 0.2s;
  position: relative;
  padding-bottom: 2px;
  white-space: nowrap;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--teal);
}
.nav-links a.active::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 1.5px;
  background: var(--teal);
  border-radius: 2px;
}

/* ─── Hamburger (mobile) ────────────────────────────── */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 2px;
  transition:
    transform 0.25s,
    opacity 0.25s;
}
.nav-toggle.open span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.open span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* Mobile nav drawer */
.nav-drawer {
  display: none;
  background: var(--navy-mid);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.nav-drawer.open {
  display: block;
}
.nav-drawer ul {
  list-style: none;
  padding: 8px 0 16px;
}
.nav-drawer ul li a {
  display: block;
  padding: 13px var(--gutter);
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 0.04em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition:
    color 0.15s,
    background 0.15s;
}
.nav-drawer ul li a:hover,
.nav-drawer ul li a.active {
  color: var(--teal);
  background: rgba(30, 184, 160, 0.06);
}

/* ─── Page Header (interior pages) ─────────────────── */
.page-header {
  background: var(--navy);
  padding: 56px 0 48px;
  position: relative;
  overflow: hidden;
}
.page-header::after {
  content: "";
  position: absolute;
  top: -80px;
  right: -80px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  border: 1px solid rgba(30, 184, 160, 0.1);
  pointer-events: none;
}
.page-header-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--teal);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.page-header-label::before {
  content: "";
  display: block;
  width: 24px;
  height: 1px;
  background: var(--teal);
}
.page-header h1 {
  font-family: var(--font-serif);
  font-size: clamp(28px, 4vw, 44px);
  color: #fff;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.page-header-sub {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.45);
  font-weight: 300;
  margin-top: 10px;
}

/* ─── Section Shared ─────────────────────────────────── */
.section {
  padding: 72px 0;
}
.section-cream {
  background: var(--cream);
}
.section-white {
  background: var(--white);
}
.section-navy {
  background: var(--navy);
}

.section-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--teal);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-label::before {
  content: "";
  display: block;
  width: 24px;
  height: 1px;
  background: var(--teal);
}
.section-title {
  font-family: var(--font-serif);
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 400;
  color: var(--text-dark);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 6px;
}
.section-title-light {
  color: #fff;
}
.section-sub {
  font-size: 15px;
  color: var(--text-mid);
  font-weight: 300;
  margin-top: 6px;
  line-height: 1.8;
}

/* ─── Buttons ─────────────────────────────────────── */
.btn-primary {
  background: var(--teal);
  color: var(--navy);
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition:
    background 0.2s,
    transform 0.15s;
  border: none;
  cursor: pointer;
}
.btn-primary:hover {
  background: var(--teal-light);
  transform: translateY(-1px);
}
.btn-outline {
  color: rgba(255, 255, 255, 0.75);
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 400;
  text-decoration: none;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  transition:
    border-color 0.2s,
    color 0.2s;
  cursor: pointer;
}
.btn-outline:hover {
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}

/* ─── Tags / Badges ──────────────────────────────── */
.tag {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.07em;
  padding: 2px 9px;
  border-radius: 100px;
  display: inline-block;
  vertical-align: middle;
  white-space: nowrap;
}
.tag-grad {
  background: #e8f5f2;
  color: #0f7460;
  border: 1px solid rgba(30, 184, 160, 0.25);
}
.tag-award {
  background: #fef3e2;
  color: #92600a;
  border: 1px solid rgba(239, 159, 39, 0.25);
}
.tag-pub {
  background: #eff6ff;
  color: #1e4fa0;
  border: 1px solid rgba(56, 138, 221, 0.25);
}
.tag-paper {
  background: #f9dafd;
  color: hsl(281, 96%, 59%);
  border: 1px solid rgba(56, 138, 221, 0.25);
}
.tag-member {
  background: #f3f0fb;
  color: #5840aa;
  border: 1px solid rgba(88, 64, 170, 0.2);
}

/* ─── Footer ─────────────────────────────────────── */
.footer {
  background: var(--navy);
  padding: 56px 0 32px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.footer-brand {
  font-family: var(--font-serif);
  font-size: 22px;
  color: #fff;
  font-weight: 400;
  margin-bottom: 10px;
}
.footer-desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.35);
  font-weight: 300;
  line-height: 1.75;
  margin-bottom: 18px;
}
.footer-tagline {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.2);
  font-style: italic;
  font-family: var(--font-serif);
}
.footer-col-head {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--teal);
  margin-bottom: 16px;
  text-transform: uppercase;
}
.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-links a {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.42);
  text-decoration: none;
  font-weight: 300;
  transition: color 0.2s;
}
.footer-links a:hover {
  color: rgba(255, 255, 255, 0.8);
}
.footer-copy {
  padding-top: 24px;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.2);
  font-weight: 300;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.teal-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--teal);
  display: inline-block;
  margin-right: 6px;
  vertical-align: middle;
}

.breadcrumb {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.breadcrumb a {
  color: rgba(255, 255, 255, 0.4);
  text-decoration: none;
  transition: color 0.2s;
}
.breadcrumb a:hover {
  color: var(--teal);
}
.breadcrumb span {
  color: rgba(255, 255, 255, 0.25);
}

/* ─── Responsive ─────────────────────────────────── */
@media (max-width: 900px) {
  .nav-links {
    display: none;
  }
  .nav-toggle {
    display: flex;
  }
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 600px) {
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .footer-inner > *:first-child {
    grid-column: 1;
  }
}

.breadcrumb {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.breadcrumb a {
  color: rgba(255, 255, 255, 0.4);
  text-decoration: none;
  transition: color 0.2s;
}
.breadcrumb a:hover {
  color: var(--teal);
}
.breadcrumb span {
  color: rgba(255, 255, 255, 0.25);
}

.research-body {
  max-width: 720px;
}
.research-body p {
  font-size: 15.5px;
  color: var(--text-mid);
  line-height: 1.95;
  font-weight: 300;
  margin-bottom: 24px;
}
.figure-block {
  margin: 40px 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.figure-block img {
  width: 100%;
  display: block;
}
.figure-caption {
  padding: 14px 20px;
  font-size: 12.5px;
  color: var(--text-light);
  font-weight: 300;
  line-height: 1.6;
  border-top: 1px solid var(--border);
}
.nav-research {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 40px;
  margin-top: 48px;
  border-top: 1px solid var(--border);
}
.nav-research a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--teal);
  text-decoration: none;
  font-weight: 400;
  letter-spacing: 0.02em;
}
.nav-research a:hover {
  opacity: 0.75;
}

.stat-num {
  font-family: var(--font-serif);
  font-size: clamp(26px, 3vw, 34px);
  color: #fff;
  line-height: 1;
  margin-bottom: 4px;
}
.stat-num em {
  color: var(--teal);
  font-style: normal;
}
.stat-label {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.38);
  letter-spacing: 0.06em;
  font-weight: 300;
}

/* ── News bar ────────────────────────── */
.news-bar {
  background: var(--cream-dark);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}
.news-bar-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.news-bar-tag {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--teal);
  letter-spacing: 0.1em;
  white-space: nowrap;
  background: var(--teal-muted);
  border: 1px solid rgba(30, 184, 160, 0.25);
  padding: 3px 10px;
  border-radius: 100px;
}
.news-bar-text {
  font-size: 13.5px;
  color: var(--text-mid);
  font-weight: 300;
  flex: 1;
  min-width: 0;
}
.news-bar-date {
  font-size: 12px;
  color: var(--text-light);
  white-space: nowrap;
}

/* ── Research cards ──────────────────── */
.research-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2px;
  margin-top: 44px;
  background: var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(13, 27, 42, 0.07);
}
.research-card {
  background: var(--white);
  padding: 40px 36px;
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
}
.research-card:hover {
  background: var(--cream);
}
.research-card-num {
  font-family: var(--font-serif);
  font-size: 54px;
  color: rgba(30, 184, 160, 0.1);
  line-height: 1;
  position: absolute;
  top: 24px;
  right: 28px;
  font-weight: 400;
  user-select: none;
}
.research-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--teal-muted);
  border: 1px solid rgba(30, 184, 160, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
}
.research-card-icon svg {
  width: 20px;
  height: 20px;
}
.research-card h3 {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 400;
  color: var(--text-dark);
  margin-bottom: 12px;
  line-height: 1.3;
}
.research-card p {
  font-size: 15.5px;
  color: var(--text-mid);
  line-height: 1.7;
  font-weight: 300;
}
.research-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 22px;
  font-size: 12.5px;
  color: var(--teal);
  font-weight: 400;
  letter-spacing: 0.04em;
}

/* ── News list ───────────────────────── */
.news-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 0;
}
.news-see-all {
  font-size: 12.5px;
  color: var(--teal);
  text-decoration: none;
  font-weight: 400;
  letter-spacing: 0.04em;
  padding-bottom: 4px;
  transition: opacity 0.2s;
}
.news-see-all:hover {
  opacity: 0.7;
}
.news-list {
  margin-top: 36px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(13, 27, 42, 0.05);
}
.news-item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 20px 24px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}
.news-item:last-child {
  border-bottom: none;
}
.news-item:hover {
  background: var(--cream);
}
.news-date {
  font-size: 12px;
  color: var(--text-light);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  padding-top: 3px;
  min-width: 82px;
  font-weight: 300;
}
.news-body {
  flex: 1;
  min-width: 0;
}
.news-text {
  font-size: 13.5px;
  color: var(--text-mid);
  line-height: 1.7;
  font-weight: 300;
}
.news-text a {
  color: var(--teal);
}

@media (max-width: 480px) {
  .news-item {
    flex-direction: column;
    gap: 8px;
  }
  .news-date {
    min-width: auto;
  }
}
