/* Kameda-Miyake Laboratory
   Static HTML/CSS site.
   No JavaScript, PHP, external fonts, or analytics scripts are required.

   Main green (#36854C) is taken from the supplied Kameda Lab logo.
*/

:root {
  --bg: #ffffff;
  --surface: #f3f8f2;
  --surface-2: #e8f2e8;
  --text: #202622;
  --muted: #626b65;
  --line: #d7e1d8;
  --accent: #36854c;
  --accent-dark: #246437;
  --accent-soft: #cfe1aa;
  --max-width: 1120px;
  --radius: 10px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "Yu Gothic UI", "Yu Gothic",
    "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;
  line-height: 1.75;
}

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

a {
  color: var(--accent-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: .18em;
}

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

.container {
  width: min(calc(100% - 40px), var(--max-width));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 1000;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid var(--line);
}

.skip-link:focus { left: 8px; }

.site-header {
  border-top: 5px solid var(--accent);
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.98);
}

.header-inner {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  color: var(--text);
  text-decoration: none;
  min-width: 0;
}

.brand:hover { color: var(--text); }

.lab-logo {
  width: 102px;
  height: 64px;
  object-fit: contain;
  flex: 0 0 auto;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.brand-text strong { font-size: 1.04rem; }
.brand-text span { color: var(--muted); font-size: .80rem; }

.global-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.global-nav a {
  display: flex;
  flex-direction: column;
  color: var(--text);
  text-decoration: none;
  font-size: .88rem;
  line-height: 1.25;
  white-space: nowrap;
}

.global-nav a span {
  color: var(--muted);
  font-size: .70rem;
}

.global-nav .nav-external {
  color: var(--accent-dark);
  font-weight: 600;
  flex-direction: row;
  gap: .18em;
  align-items: baseline;
}

.hero {
  padding: 74px 0 62px;
  background:
    linear-gradient(180deg, rgba(207,225,170,.30), rgba(255,255,255,0) 85%);
}

.hero-copy { max-width: 920px; }


.hero h1 {
  margin: 0;
  font-size: clamp(2.05rem, 5vw, 4.3rem);
  line-height: 1.12;
  letter-spacing: -.02em;
}

.hero h1 span {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: .42em;
  font-weight: 500;
  letter-spacing: 0;
}

.lead {
  max-width: 840px;
  margin: 28px 0 0;
  font-size: 1.08rem;
}

.lead-en {
  margin-top: 9px;
  color: var(--muted);
}

.section { padding: 60px 0; }
.section.alt { background: var(--surface); }

.section-header { margin-bottom: 24px; }

.section-header h2,
.page-header h1 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.45rem);
  line-height: 1.25;
}

.section-header h2 span,
.page-header h1 span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: .52em;
  font-weight: 500;
}

.page-header {
  padding: 48px 0 32px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.page-header p {
  max-width: 860px;
  margin: 16px 0 0;
}

/* Top-page News: native CSS scrolling only. */
.news-box {
  max-height: 430px;
  overflow-y: auto;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
  padding-right: 10px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.news-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.news-list li {
  display: grid;
  grid-template-columns: 8.5em 1fr;
  gap: 22px;
  padding: 17px 8px;
  border-bottom: 1px solid var(--line);
}

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

.news-list time {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.news-list a {
  color: var(--text);
  text-decoration: none;
}

.news-list a:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

.news-en {
  display: block;
  font-size: 0.88em;
  margin-top: 3px;
}

.source-badge,
.ref-badge {
  display: inline-block;
  padding: .05em .48em;
  border-radius: 999px;
  font-size: .72em;
  vertical-align: .1em;
}

.source-badge {
  margin-left: .5em;
  border: 1px solid var(--line);
  color: var(--muted);
}

.ref-badge {
  margin-right: .45em;
  border: 1px solid #a9c9ad;
  color: var(--accent-dark);
  background: #eff7f0;
}

.ref-badge.secondary {
  border-color: var(--line);
  color: var(--muted);
  background: #f6f7f6;
}

.scroll-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: .84rem;
}

.research-item {
  padding: 40px 0;
  border-bottom: 1px solid var(--line);
}

.research-item:first-child { padding-top: 0; }
.research-item:last-child { border-bottom: 0; }

.research-item h2 {
  margin: 0 0 14px;
  color: var(--accent-dark);
}

.research-item .en { color: var(--muted); }

.research-focus {
  margin: 20px 0 0;
  padding: 18px 20px;
  border-left: 4px solid var(--accent);
  background: var(--surface);
}

.research-focus strong {
  color: var(--accent-dark);
}

.references-title {
  margin: 24px 0 10px;
  font-size: 1.02rem;
}

.references {
  margin-top: 0;
  padding: 20px 24px 20px 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.references li {
  margin: 12px 0;
  padding-left: 4px;
}

.references .venue {
  color: var(--muted);
}

.note {
  padding: 18px 20px;
  border-left: 4px solid var(--accent);
  background: var(--surface);
}


.leadership-note {
  margin: -4px 0 24px;
  padding: 16px 20px;
  border-left: 4px solid var(--accent);
  background: var(--surface);
}

.leadership-note p {
  margin: 0;
}

.leadership-note p + p {
  margin-top: 4px;
  color: var(--muted);
}

.alumni-header {
  margin-top: 46px;
}

.alumni-list {
  margin-bottom: 46px;
}

.alumni-current {
  margin: 0;
  color: var(--muted);
  font-size: .90rem;
}

.faculty-list {
  margin-bottom: 48px;
  border-top: 1px solid var(--line);
}

.faculty-row {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 22px;
  align-items: center;
  padding: 20px 8px;
  border-bottom: 1px solid var(--line);
}

.faculty-photo {
  width: 72px;
  height: 90px;
  object-fit: cover;
  object-position: center top;
  border-radius: 5px;
  background: var(--surface-2);
}

.faculty-body h2 {
  margin: 0 0 4px;
  font-size: 1.10rem;
  line-height: 1.4;
}

.inline-en {
  margin-left: .45em;
  color: var(--muted);
  font-size: .82em;
  font-weight: 500;
}

.faculty-body .title {
  margin: 0 0 8px;
}

.profile-link {
  display: inline-block;
  font-size: .86rem;
}

.member-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0 34px;
}

.member-table th,
.member-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.member-table thead th {
  background: var(--surface-2);
  color: var(--accent-dark);
  font-weight: 700;
}

.member-table tbody th {
  width: 44%;
  background: var(--surface);
  font-weight: 600;
}

.member-table .count {
  width: 8em;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-size: 1.08rem;
}

.small {
  color: var(--muted);
  font-size: .9rem;
}

.site-footer {
  margin-top: 72px;
  padding: 36px 0 24px;
  color: #edf5ee;
  background: #21472d;
}

.footer-grid {
  display: grid;
  grid-template-columns: .9fr 1.4fr;
  gap: 32px;
}


.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.18);
  color: #cbdccf;
  font-size: .80rem;
}

@media (max-width: 900px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    padding-block: 15px;
  }

  .global-nav {
    width: 100%;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .global-nav a { flex: 0 0 auto; }


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

@media (max-width: 620px) {
  .container {
    width: min(calc(100% - 28px), var(--max-width));
  }

  .lab-logo {
    width: 82px;
    height: 52px;
  }

  .hero { padding: 48px 0; }

  .news-box { max-height: 500px; }

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


  .faculty-row {
    grid-template-columns: 66px 1fr;
    gap: 14px;
    padding-inline: 0;
  }

  .faculty-photo {
    width: 60px;
    height: 76px;
  }

  .inline-en {
    display: block;
    margin-left: 0;
    margin-top: 1px;
  }

  .member-table,
  .member-table thead,
  .member-table tbody,
  .member-table tr,
  .member-table th,
  .member-table td {
    display: block;
    width: 100%;
  }

  .member-table thead {
    position: absolute;
    left: -9999px;
  }

  .member-table tbody th {
    border-bottom: 0;
  }

  .member-table .count {
    text-align: left;
    padding-top: 0;
  }
}
