/* ==========================================================================
   Base
   ========================================================================== */

:root {
  /* Kyoto University school color (dark blue) */
  --ku-blue: #00205b;
  --ku-blue-hover: #3d4f8a;
  --text-muted: #999999;
  --text-muted-hover: #666666;
  --content-width: 960px;
}

* {
  box-sizing: border-box;
}

html {
  overflow-y: scroll;
}

body {
  margin: 0;
  background-color: #ffffff;
  color: #333333;
  font-family: "Hiragino Mincho ProN", "Hiragino Mincho Pro", "Yu Mincho", "YuMincho", serif;
  font-size: 15px;
  line-height: 2.1;
}

a {
  color: var(--ku-blue);
  text-decoration: none;
}

a:hover {
  color: var(--ku-blue-hover);
  text-decoration: underline;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

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

/* ==========================================================================
   Header
   ========================================================================== */

#header {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 45px 24px 0;
  margin-bottom: 60px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

#header_logo a {
  display: block;
  line-height: 1.4;
  color: #222222;
}

#header_logo a:hover {
  text-decoration: none;
}

#header_logo .header_logo_ja {
  display: block;
  font-size: 28px;
  letter-spacing: 0.14em;
}

#header_logo .header_logo_en {
  display: block;
  font-size: 12px;
  letter-spacing: 0.03em;
  color: var(--text-muted);
}

#menu_head ul {
  display: flex;
  align-items: center;
}

#menu_head li {
  font-size: 13px;
  letter-spacing: 0.05em;
}

#menu_head li a {
  padding: 14px 20px;
  display: inline-block;
  color: #222222;
}

#menu_head li a:hover {
  color: var(--text-muted);
  text-decoration: none;
}

#menu_head .menu_divider {
  width: 1px;
  height: 12px;
  background-color: #333333;
}

/* ==========================================================================
   Main contents
   ========================================================================== */

#contents {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 24px 40px;
  min-height: 50vh;
}

.page-title {
  font-size: 22px;
  font-weight: normal;
  letter-spacing: 0.05em;
  margin-bottom: 32px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eeeeee;
}

/* ==========================================================================
   Section groups (used by About and Info pages)
   ========================================================================== */

.section-group {
  margin-bottom: 32px;
}

.section-group h2 {
  font-size: 15px;
  font-weight: normal;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.section-group li {
  padding: 6px 0;
  font-size: 15px;
}

.cv-table {
  border-collapse: collapse;
  table-layout: fixed;
  width: 100%;
}

.cv-table td {
  padding: 2px 0;
  vertical-align: top;
}

.cv-table td:first-child {
  padding-right: 24px;
  white-space: nowrap;
}

.cv-table td:nth-child(2) {
  padding-right: 16px;
  white-space: nowrap;
}

.cv-table a {
  color: inherit;
  text-decoration: none;
}

.cv-table a:hover {
  text-decoration: underline;
}

.member-links a {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.03em;
  padding: 2px 8px;
  margin-right: 6px;
  border: 1px solid #cccccc;
  color: var(--text-muted-hover);
}

.member-links a.sns-link-start {
  margin-left: 14px;
}

.member-links a:hover {
  border-color: var(--ku-blue);
  color: var(--ku-blue);
  text-decoration: none;
}

/* ==========================================================================
   Publications
   ========================================================================== */

.pub-list li {
  padding: 10px 0;
  border-bottom: 1px dotted #dddddd;
  font-size: 15px;
}

.notes-list li {
  border-bottom: none;
}

/* ==========================================================================
   Notes
   ========================================================================== */

.note-meta {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.note-tag {
  margin-left: 12px;
}

/* ==========================================================================
   Home
   ========================================================================== */

.home-news {
  margin-top: 64px;
}

.home-news h2 {
  font-size: 13px;
  font-weight: normal;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.home-news h2 a {
  color: inherit;
}

.home-news h2 a:hover {
  color: var(--ku-blue);
}

.home-news ul {
  font-size: 13px;
  color: var(--text-muted-hover);
}

.home-news li {
  padding: 4px 0;
}

.home-news-date {
  color: #aaaaaa;
  margin-right: 12px;
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Research topics (grid + cards)
   ========================================================================== */

.topic-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.home-topic-grid {
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-top: 80px;
}

.topic-card {
  display: block;
}

.topic-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background-color: #f2f2f0;
  filter: grayscale(100%);
  transition: filter 0.3s ease;
}

.topic-card-title {
  display: block;
  margin-top: 10px;
  font-size: 15px;
  letter-spacing: 0.04em;
}

.topic-card-summary {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-muted);
}

.topic-card:hover img {
  filter: grayscale(0%);
}

.topic-hero-figure {
  margin: 0 0 28px;
  max-width: 560px;
}

.topic-hero {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background-color: #f2f2f0;
}

.topic-hero-caption {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
}

.aside-link {
  margin: 14px 0 0;
  font-size: 12px;
  color: #aaaaaa;
}

/* ==========================================================================
   Prose (Research)
   ========================================================================== */

.prose p {
  margin: 0 0 20px;
  text-align: justify;
  text-justify: inter-ideograph;
}

.prose p:last-child {
  margin-bottom: 0;
}

.lab-name {
  margin: 0 0 16px;
}

.lab-name-ja {
  font-size: 17px;
  font-weight: bold;
  color: #333333;
  letter-spacing: 0.04em;
}

.lab-title-en {
  font-size: 13px;
  color: var(--text-muted);
  margin-left: 12px;
}

/* ==========================================================================
   Footer
   ========================================================================== */

#footer {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 24px 24px 60px;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid #eeeeee;
}

#footer a {
  color: var(--text-muted);
}

#footer a:hover {
  color: var(--text-muted-hover);
  text-decoration: none;
}

#footer .copyright {
  margin-top: 12px;
}

/* ==========================================================================
   Not found (404)
   ========================================================================== */

.not-found {
  text-align: center;
  padding: 80px 0;
}

.not-found img {
  margin: 0 auto;
}

.not-found-title {
  font-size: 3em;
  font-weight: normal;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 600px) {
  #header {
    flex-direction: column;
    align-items: flex-start;
  }
  #menu_head ul {
    flex-wrap: wrap;
  }
  #menu_head li a {
    padding: 10px 12px;
  }
  .topic-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}
