/* ============================================
   Takayama Lab - Redesigned Stylesheet
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Helvetica Neue", "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  font-size: 15px;
  line-height: 1.8;
  color: #333;
  background: #f8f8f8;
  -webkit-font-smoothing: antialiased;
}

a {
  color: #1a5276;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s;
}

a:hover {
  color: #2980b9;
}

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

ul, ol {
  list-style: none;
}

table {
  border-collapse: collapse;
}

/* --- Layout --- */
.wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

/* --- Header --- */
.header {
  background: #fff;
  border-bottom: 3px solid #1a3550;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.header_ttl a {
  color: inherit;
  display: block;
  text-decoration: none;
}

.header_ttl h1 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #1a3550;
  line-height: 1.2;
  margin-bottom: 0px;
}

.header_ttl .sub {
  font-size: 11px;
  color: #777;
  letter-spacing: 0.04em;
  line-height: 1;
  display: block;
  margin-top: 1px;
}

.header_nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header_nav a {
  display: block;
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 500;
  color: #555;
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

.header_nav a:hover {
  background: #f0f4f8;
  color: #1a3550;
}

.header_nav a.now {
  background: #1a3550;
  color: #fff;
}

.header_nav a.now:hover {
  background: #24476a;
  color: #fff;
}

.member_link {
  display: inline-block;
  padding: 6px 14px;
  font-size: 12px;
  text-decoration: none;
  color: #1a3550 !important;
  border: 1px solid #1a3550;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

.member_link:hover {
  background: #1a3550;
  color: #fff !important;
}

/* --- Mobile menu --- */
.menu_toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: #1a3550;
}

.menu_toggle svg {
  width: 24px;
  height: 24px;
}

/* --- Hero --- */
.hero {
  position: relative;
  width: 100%;
  height: 240px;
  overflow: hidden;
  background: #000;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero img {
  width: 100%;
  max-width: 1100px;
  height: 240px;
  object-fit: cover;
  object-position: center 55%;
  display: block;
}

.hero_text {
  position: absolute;
  bottom: 16px;
  left: 24px;
  line-height: 1.4;
}

.hero_affiliation {
  color: rgba(255, 255, 255, 0.75);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.hero_title {
  color: rgba(255, 255, 255, 0.9);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}

@media (max-width: 768px) {
  .hero_text {
    display: none;
  }
  .hero, .hero img {
    height: 120px;
  }
}

/* --- Main --- */
.main {
  flex: 1;
  padding: 40px 0 80px;
}

.page_title {
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  color: #1a3550;
  margin-bottom: 40px;
  padding-bottom: 16px;
  border-bottom: 2px solid #e0e0e0;
}

/* --- Info Box (Top page) --- */
.info_box {
  background: #fff;
  border-radius: 8px;
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.info_box h2 {
  font-size: 20px;
  font-weight: 700;
  color: #1a3550;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e0e0e0;
}

.info_box p {
  margin-bottom: 8px;
  line-height: 1.8;
}

.info_box ul {
  margin: 0;
}

.info_box li {
  margin-bottom: 12px;
}

.info_box li span {
  display: inline-block;
  margin-right: 12px;
  font-weight: 500;
  color: #777;
}

/* --- Member List --- */
.member_grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 60px;
}

.member_card {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  transition: box-shadow 0.2s;
}

.member_card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.member_card .course {
  display: inline-block;
  background: #1a3550;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  padding: 2px 10px;
  border-radius: 3px;
  margin-bottom: 8px;
}

.member_card .name {
  font-size: 18px;
  font-weight: 700;
  color: #333;
  margin-bottom: 6px;
  border-bottom: 1px dotted #e0e0e0;
  padding-bottom: 6px;
}

.member_card .name a {
  color: #333;
  text-decoration: none;
}

.member_card .name a:hover {
  color: #1a5276;
}

.member_card .from {
  font-size: 13px;
  color: #999;
  margin-bottom: 4px;
}

.member_card .mail {
  font-size: 12px;
  color: #999;
  word-break: break-all;
  line-height: 1.6;
}

.member_card .mail a {
  font-size: 12px;
}

/* --- OB/OG List --- */
.obog_section {
  margin-top: 60px;
}

.obog_section h3 {
  font-size: 24px;
  font-weight: 700;
  color: #1a3550;
  margin-bottom: 24px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e0e0e0;
}

.obog_year {
  margin-bottom: 32px;
}

.obog_year h4 {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: #1a3550;
  padding: 8px 16px;
  border-radius: 4px;
  margin-bottom: 12px;
}

.obog_table {
  width: 100%;
  margin-bottom: 8px;
}

.obog_table td {
  padding: 8px 12px;
  border-bottom: 1px solid #e0e0e0;
  vertical-align: top;
  font-size: 14px;
  line-height: 1.7;
}

.obog_table td:first-child {
  width: 80px;
  color: #777;
  font-size: 13px;
  white-space: nowrap;
}

.obog_table td:nth-child(2) {
  width: 140px;
  font-weight: 500;
  white-space: nowrap;
}

.obog_table td:last-child {
  color: #555;
}

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

.award {
  display: inline-block;
  font-size: 12px;
  color: #b8860b;
  font-weight: 500;
}

.award::before {
  content: "\1F3C6 ";
}

/* --- Text Box (Study page) --- */
.text_box {
  background: #fff;
  border-radius: 8px;
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.text_box h3 {
  font-size: 18px;
  font-weight: 700;
  color: #1a3550;
  margin-bottom: 16px;
  padding-left: 14px;
  border-left: 3px solid #1a3550;
}

.text_box p {
  margin-bottom: 12px;
  line-height: 1.9;
  text-align: justify;
}

/* --- Figure Box --- */
.figure_box {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin-bottom: 32px;
  padding: 24px;
  background: #f0f0f0;
  border-radius: 8px;
}

.figure_box .figure {
  text-align: center;
}

.figure_box .figure img {
  border-radius: 4px;
  margin: 0 auto;
}

.figure_box .figure p {
  font-size: 12px;
  color: #777;
  margin-top: 6px;
}

.quote {
  font-size: 12px;
  color: #999;
  margin-bottom: 32px;
  text-align: right;
}

.quote span {
  font-weight: 500;
  margin-right: 8px;
}

/* --- Lecture List --- */
.lecture_list {
  background: #fff;
  border-radius: 8px;
  padding: 24px 32px;
  margin-bottom: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.lecture_list h3 {
  font-size: 17px;
  font-weight: 600;
  color: #1a3550;
  padding-left: 14px;
  border-left: 3px solid #1a3550;
}

/* --- Access --- */
.access_info {
  background: #fff;
  border-radius: 8px;
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  text-align: center;
  line-height: 2;
}

#gmaps {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

#gmaps iframe {
  width: 100%;
  height: 450px;
  display: block;
}

/* --- Mobile Page Nav --- */
.mobile_pagenav {
  display: none;
}

@media (max-width: 768px) {
  .mobile_pagenav {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    border-top: 1px solid #e0e0e0;
    background: #fff;
  }

  .mobile_pagenav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 8px;
    font-size: 13px;
    font-weight: 500;
    color: #1a3550;
    text-decoration: none;
    border-bottom: 1px solid #e0e0e0;
    transition: background 0.2s;
  }

  .mobile_pagenav a:not(:last-child) {
    border-right: 1px solid #e0e0e0;
  }

  .mobile_pagenav a:hover {
    background: #f0f4f8;
  }

  .mobile_pagenav a.now {
    background: #1a3550;
    color: #fff;
  }

  .mobile_pagenav .nav_icon {
    font-size: 22px;
    margin-bottom: 4px;
    line-height: 1;
  }
}

/* --- Footer --- */
.footer {
  background: #1a3550;
  color: #ccc;
  padding: 32px 0;
  margin-top: auto;
}

.footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.footer_nav {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer_nav a {
  color: #ccc;
  font-size: 13px;
  text-decoration: none;
  transition: color 0.2s;
}

.footer_nav a:hover {
  color: #fff;
}

.copyright {
  font-size: 12px;
  color: #999;
}

/* --- Page Top Button --- */
.page_top_btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  background: #1a3550;
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  line-height: 44px;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, background 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  z-index: 50;
}

.page_top_btn.visible {
  opacity: 1;
  visibility: visible;
}

.page_top_btn:hover {
  background: #24476a;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
  .header .container {
    height: auto;
    flex-wrap: wrap;
    padding-top: 12px;
    padding-bottom: 12px;
    gap: 8px;
  }

  .header_ttl h1 {
    font-size: 16px;
  }

  .header_ttl .sub {
    font-size: 10px;
  }

  .header_nav {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 2px;
    padding-top: 8px;
    border-top: 1px solid #e0e0e0;
  }

  .header_nav.open {
    display: flex;
  }

  .header_nav a {
    padding: 10px 16px;
    border-radius: 4px;
  }

  .menu_toggle {
    display: block;
  }

  .member_link {
    display: none;
  }

  .main {
    padding: 24px 0 48px;
  }

  .page_title {
    font-size: 22px;
    margin-bottom: 24px;
  }

  .info_box,
  .text_box,
  .lecture_list {
    padding: 20px;
  }

  .member_grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .member_card {
    padding: 14px;
  }

  .member_card .name {
    font-size: 15px;
  }

  .obog_table td:first-child {
    width: 60px;
    font-size: 12px;
  }

  .obog_table td:nth-child(2) {
    width: auto;
  }

  .obog_table td {
    padding: 6px 8px;
    font-size: 13px;
  }

  .figure_box {
    flex-direction: column;
    align-items: center;
    padding: 16px;
  }

  .footer_nav {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .member_grid {
    grid-template-columns: 1fr;
  }
}
