*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --kyoto-red: #9b0000;
  --kyoto-red-light: #c8102e;
  --bg: #ffffff;
  --bg-alt: #f5f4f0;
  --bg-nav: #1a1a1a;
  --text: #1a1a1a;
  --text-muted: #555;
  --text-light: #777;
  --border: #ddd;
  --border-light: #e8e8e8;
  --link: #9b0000;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Source Sans 3', 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.65;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

/* TOP BAR */
.top-bar {
  background: var(--kyoto-red);
  color: white;
  font-size: 11.5px;
  padding: 5px 0;
}

.top-bar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  gap: 2rem;
  justify-content: flex-end;
}

.top-bar a { color: rgba(255,255,255,0.85); text-decoration: none; }
.top-bar a:hover { color: white; text-decoration: underline; }

/* NAV */
nav {
  background: var(--bg-nav);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: stretch;
}

.nav-logo {
  color: white;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 1rem 1.5rem 1rem 0;
  text-decoration: none;
  white-space: nowrap;
  border-right: 1px solid rgba(255,255,255,0.12);
  margin-right: 0.5rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-logo span {
  color: rgba(255,255,255,0.45);
  font-weight: 300;
  font-size: 13px;
}

.nav-links {
  display: flex;
  list-style: none;
  align-items: stretch;
}

.nav-links li a {
  display: flex;
  align-items: center;
  padding: 0 1rem;
  height: 100%;
  color: rgba(255,255,255,0.75);
  font-size: 13.5px;
  font-weight: 400;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.15s, background 0.15s;
  border-bottom: 3px solid transparent;
}

.nav-links li a:hover {
  color: white;
  background: rgba(255,255,255,0.06);
  border-bottom-color: var(--kyoto-red-light);
}

.nav-lang {
  margin-left: auto;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  color: rgba(255,255,255,0.45);
  font-size: 12.5px;
  text-decoration: none;
  transition: color 0.15s;
}

.nav-lang:hover { color: white; }

/* HERO */
.hero {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}

.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3.5rem 2rem;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 4rem;
  align-items: center;
}

.hero h1 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 2rem;
  font-weight: 400;
  line-height: 1.28;
  margin-bottom: 1.1rem;
  color: var(--text);
}

.hero-sub {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 1.2rem;
  max-width: 600px;
}

.hero-affiliations {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.9;
  border-left: 3px solid var(--kyoto-red);
  padding-left: 1rem;
  margin-top: 1.5rem;
}

.hero-affiliations a { color: var(--text-muted); }
.hero-affiliations a:hover { color: var(--link); text-decoration: underline; }

.hero-photo-block { text-align: center; }

.hero-photo-placeholder {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: #ccc;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 3px solid white;
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
}

.img-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-name { font-weight: 600; font-size: 16px; margin-bottom: 3px; }

.hero-title { font-size: 13px; color: var(--text-muted); line-height: 1.6; }

.recruit-note {
  display: inline-block;
  margin-top: 1.1rem;
  font-size: 12.5px;
  background: #fff9f5;
  border: 1px solid #e8d8c8;
  border-radius: 3px;
  padding: 7px 12px;
  color: #7a4a1a;
  line-height: 1.55;
}

/* MAIN LAYOUT */
.page-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
  display: grid;
  grid-template-columns: 1fr 270px;
  gap: 4rem;
  align-items: start;
}

/* SECTION HEADINGS */
h2.section-heading {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--text);
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--kyoto-red);
  margin-bottom: 1.4rem;
  display: inline-block;
}

/* NEWS */
.news-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin-bottom: 3rem;
}

.news-table tr { border-bottom: 1px solid var(--border-light); }
.news-table tr:first-child { border-top: 1px solid var(--border-light); }
.news-table td { padding: 0.7rem 0.4rem; vertical-align: top; }

.news-date {
  white-space: nowrap;
  color: var(--kyoto-red);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding-right: 1.2rem;
  width: 65px;
}

.news-text { color: var(--text-muted); line-height: 1.6; }
.news-text a { color: var(--link); }

/* RESEARCH */
.research-list { margin-bottom: 3rem; }

.research-item {
  display: flex;
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 14.5px;
  align-items: flex-start;
}

.research-item:first-child { border-top: 1px solid var(--border-light); }

.research-num {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--kyoto-red);
  background: #fdf0f0;
  border: 1px solid #e8cccc;
  border-radius: 3px;
  min-width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
  flex-shrink: 0;
}

.research-body { color: var(--text-muted); line-height: 1.65; }
.research-body strong { color: var(--text); font-weight: 600; }
.research-body a { color: var(--link); }

/* CAREER */
.career-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin-bottom: 3rem;
}

.career-table tr { border-bottom: 1px solid var(--border-light); }
.career-table tr:first-child { border-top: 1px solid var(--border-light); }
.career-table td { padding: 0.6rem 0.4rem; vertical-align: top; }

.career-year {
  white-space: nowrap;
  color: var(--text-light);
  font-size: 12.5px;
  width: 130px;
  padding-right: 1rem;
}

.career-role { color: var(--text); }
.career-place { color: var(--text-muted); font-size: 13px; }

/* SIDEBAR */
.sidebar-block {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.25rem;
  font-size: 13.5px;
}

.sidebar-heading {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 0.8rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-link-list { list-style: none; }

.sidebar-link-list li {
  padding: 3px 0;
  border-bottom: 1px solid var(--border-light);
  line-height: 1.5;
}

.sidebar-link-list li:last-child { border-bottom: none; }
.sidebar-link-list a { color: var(--link); font-size: 13px; }

.sidebar-text { color: var(--text-muted); line-height: 1.7; font-size: 13.5px; }

.sidebar-email {
  background: #f9f9f9;
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 7px 10px;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 0.7rem;
  font-family: 'Courier New', monospace;
  word-break: break-all;
}

/* FOOTER */
footer {
  background: var(--bg-nav);
  color: rgba(255,255,255,0.45);
  font-size: 12.5px;
  padding: 1.5rem 0;
  text-align: center;
}

footer a { color: rgba(255,255,255,0.55); text-decoration: none; }
footer a:hover { color: white; }

/* RESPONSIVE */
@media (max-width: 820px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-photo-block { order: -1; }
  .page-inner { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}

/* PAGE HEADER (research.html and other subpages) */
.page-header {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  padding: 2rem 0;
}

.page-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

.page-header h1 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.9rem;
  font-weight: 400;
  color: var(--text);
}

.breadcrumb {
  font-size: 12.5px;
  color: var(--text-light);
  margin-bottom: 0.4rem;
}

.breadcrumb a { color: var(--text-light); }
.breadcrumb a:hover { color: var(--link); }

/* RESEARCH PAGE LAYOUT */
.research-page-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
  display: grid;
  grid-template-columns: 1fr 270px;
  gap: 4rem;
  align-items: start;
}

.research-section {
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border-light);
}

.research-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.research-section h2 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--text);
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--kyoto-red);
  margin-bottom: 1.4rem;
  display: inline-block;
}

.research-section p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 1rem;
}

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

.research-figure {
  float: right;
  margin: 0 0 1.5rem 2rem;
  max-width: 320px;
}

.research-figure img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--border);
  border-radius: 3px;
}

.research-figure figcaption {
  font-size: 12px;
  color: var(--text-light);
  text-align: center;
  margin-top: 0.4rem;
  line-height: 1.5;
}

.clearfix::after {
  content: '';
  display: table;
  clear: both;
}

@media (max-width: 820px) {
  .research-page-inner { grid-template-columns: 1fr; }
  .research-figure {
    float: none;
    margin: 0 0 1.5rem 0;
    max-width: 100%;
  }
}

/* MEMBERS PAGE */
.members-group {
  margin-bottom: 2.5rem;
}

.members-group h2 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--text);
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--kyoto-red);
  margin-bottom: 1rem;
  display: inline-block;
}

.members-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}

.members-table tr { border-bottom: 1px solid var(--border-light); }
.members-table tr:first-child { border-top: 1px solid var(--border-light); }
.members-table td { padding: 0.65rem 0.4rem; vertical-align: top; }

.members-name { color: var(--text); font-weight: 600; width: 220px; }
.members-role { color: var(--text-muted); }
.members-note { color: var(--text-light); font-size: 13px; }

/* PUBLICATIONS PAGE */
.pub-year-heading {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--text);
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--kyoto-red);
  margin: 2.5rem 0 1rem;
  display: inline-block;
}

.pub-year-heading:first-child { margin-top: 0; }

.pub-list { list-style: none; margin-bottom: 0.5rem; }

.pub-item {
  display: flex;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 14px;
  line-height: 1.65;
  align-items: flex-start;
}

.pub-item:first-child { border-top: 1px solid var(--border-light); }

.pub-num {
  font-family: 'Courier New', monospace;
  font-size: 11.5px;
  color: var(--text-light);
  min-width: 28px;
  text-align: right;
  padding-top: 2px;
  flex-shrink: 0;
}

.pub-text { color: var(--text-muted); }
.pub-text a { color: var(--link); }
.pub-text em { font-style: italic; }
.pub-meta { font-size: 12.5px; color: var(--text-light); margin-top: 2px; }

/* TEACHING PAGE */
.teaching-list { list-style: none; margin-bottom: 3rem; }

.teaching-item {
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border-light);
}

.teaching-item:first-child { border-top: 1px solid var(--border-light); }

.teaching-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.teaching-meta { font-size: 13px; color: var(--text-muted); line-height: 1.7; }
.teaching-code { font-family: 'Courier New', monospace; font-size: 12px; color: var(--text-light); }

/* CONTACT PAGE */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

.contact-section h2 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 400;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--kyoto-red);
  margin-bottom: 1rem;
  display: inline-block;
}

.contact-section p {
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.8;
}

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