/* ========================================
   伊住研究室 - Website Stylesheet
   Color: Blue-based / Left sidebar navigation
   ======================================== */

:root {
  --primary: #1976d2;
  --primary-dark: #0d47a1;
  --primary-light: #e3f2fd;
  --accent: #1565c0;
  --text: #212121;
  --text-secondary: #546e7a;
  --border: #e0e0e0;
  --bg: #ffffff;
  --bg-alt: #f5f8fc;
  --shadow: 0 2px 8px rgba(13, 71, 161, 0.08);
  --sidebar-width: 260px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "BIZ UDPGothic", "Yu Gothic", "Meiryo", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

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

/* ========================================
   Layout: Sidebar + Main
   ======================================== */

.layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: linear-gradient(180deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: #fff;
  padding: 2.5rem 1.5rem;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
}

.sidebar__brand {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.sidebar__title {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #fff;
  margin-bottom: 0.4rem;
}

.sidebar__subtitle {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.8);
  letter-spacing: 0.1em;
}

.sidebar__nav {
  list-style: none;
}

.sidebar__nav li {
  margin-bottom: 0.3rem;
}

.sidebar__nav a {
  display: block;
  color: rgba(255, 255, 255, 0.9);
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  position: relative;
}

.sidebar__nav a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  text-decoration: none;
  padding-left: 1.3rem;
}

.sidebar__nav a.is-active {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-weight: 600;
}

.sidebar__nav a.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: #fff;
  border-radius: 2px;
}

.sidebar__footer {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.6;
}

/* Main content */
.main {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-height: 100vh;
}

.main__inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 4rem 3rem;
}

/* ========================================
   Typography
   ======================================== */

.page-title {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
  letter-spacing: 0.02em;
}

.page-title__sub {
  display: block;
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 400;
  letter-spacing: 0.15em;
  margin-top: 0.4rem;
}

.page-lead {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 3px solid var(--primary);
  max-width: 600px;
}

h2.section-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin: 3rem 0 1.5rem;
  padding-left: 0.8rem;
  border-left: 4px solid var(--primary);
  line-height: 1.4;
}

h3.subsection-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  margin: 2rem 0 0.8rem;
}

p {
  margin-bottom: 1rem;
}

ul, ol {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

li {
  margin-bottom: 0.4rem;
}

/* ========================================
   Components
   ======================================== */

/* Hero (top page) */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%), url("../images/hero-pattern.svg");
  background-image: url("../images/hero-pattern.svg"), linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  background-size: cover, cover;
  background-position: center, center;
  color: #fff;
  padding: 4rem 3rem;
  margin: -4rem -3rem 3rem;
  border-radius: 0 0 8px 8px;
  position: relative;
}

.hero__catch {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 1rem;
  letter-spacing: 0.02em;
}

.hero__desc {
  font-size: 1rem;
  opacity: 0.9;
  line-height: 1.8;
}

/* Profile card */
.profile-card {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2.5rem;
  align-items: start;
  padding: 2rem;
  background: var(--bg-alt);
  border-radius: 8px;
  margin-bottom: 3rem;
}

.profile-card__photo {
  width: 200px;
  height: 250px;
  object-fit: cover;
  border-radius: 6px;
  background: var(--primary-light);
  box-shadow: var(--shadow);
}

.profile-card__name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 0.2rem;
}

.profile-card__name-en {
  color: var(--text-secondary);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.profile-card__affiliation {
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 0.8rem;
}

.profile-card__degree {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Cards grid (for research keywords) */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0 2rem;
}

.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-top: 4px solid var(--primary);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(13, 71, 161, 0.15);
}

.card__icon {
  width: 60px;
  height: 60px;
  margin-bottom: 0.8rem;
  opacity: 0.9;
}

.card__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 0.3rem;
}

.card__title-en {
  font-size: 0.75rem;
  color: var(--text-secondary);
  letter-spacing: 0.1em;
  margin-bottom: 0.8rem;
}

.card__body {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.7;
}

/* News list */
.news-list {
  list-style: none;
  margin: 1rem 0 2rem;
}

.news-list li {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}

.news-list__date {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  font-family: "Roboto Mono", monospace;
}

.news-list__body {
  font-size: 0.95rem;
}

/* Timeline (history) */
.timeline {
  list-style: none;
  margin: 1rem 0 2rem;
  border-left: 2px solid var(--primary-light);
  padding-left: 1.5rem;
}

.timeline li {
  position: relative;
  padding: 0.6rem 0;
  margin: 0;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -1.65rem;
  top: 1rem;
  width: 10px;
  height: 10px;
  background: var(--primary);
  border-radius: 50%;
  border: 2px solid var(--bg);
}

.timeline__year {
  font-weight: 700;
  color: var(--primary-dark);
  font-size: 0.95rem;
  margin-right: 1rem;
}

.timeline__body {
  color: var(--text);
  font-size: 0.95rem;
}

/* Publications */
.pub-list {
  list-style: none;
  margin: 1rem 0 2rem;
}

.pub-list li {
  padding: 1rem 0 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  position: relative;
  font-size: 0.95rem;
}

.pub-list li::before {
  content: "▶";
  position: absolute;
  left: 0;
  top: 1rem;
  color: var(--primary);
  font-size: 0.7rem;
}

.pub-list__year {
  display: inline-block;
  font-weight: 700;
  color: var(--primary);
  font-size: 0.85rem;
  margin-right: 0.5rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  background: var(--primary);
  color: #fff !important;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.2s ease;
  text-decoration: none;
}

.btn:hover {
  background: var(--primary-dark);
  text-decoration: none;
  color: #fff !important;
}

.btn--outline {
  background: transparent;
  color: var(--primary) !important;
  border: 2px solid var(--primary);
}

.btn--outline:hover {
  background: var(--primary);
  color: #fff !important;
}

/* Info box */
.info-box {
  background: var(--primary-light);
  border-radius: 6px;
  padding: 1.2rem 1.5rem;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

.info-box strong {
  color: var(--primary-dark);
}

/* Contact list */
.contact-list {
  list-style: none;
  margin: 1rem 0 2rem;
}

.contact-list li {
  padding: 0.6rem 0;
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1rem;
  align-items: start;
  font-size: 0.95rem;
}

.contact-list__label {
  font-weight: 600;
  color: var(--primary-dark);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 200;
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 0.7rem 0.9rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1.2rem;
  box-shadow: var(--shadow);
}

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

@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .main {
    margin-left: 0;
  }

  .main__inner {
    padding: 4rem 1.5rem 2rem;
  }

  .menu-toggle {
    display: block;
  }

  .hero {
    margin: -4rem -1.5rem 2rem;
    padding: 3rem 1.5rem;
  }

  .hero__catch {
    font-size: 1.4rem;
  }

  .profile-card {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .profile-card__photo {
    width: 180px;
    height: 220px;
    margin: 0 auto;
  }

  .news-list li {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .contact-list li {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .page-title {
    font-size: 1.7rem;
  }
}

/* Publications section jump nav */
.pub-nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 2rem auto 2.5rem;
  max-width: 680px;
}

.pub-nav__btn,
.pub-nav a.pub-nav__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #fff !important;
  text-decoration: none;
  padding: 0.8rem 1rem;
  border: 2px solid var(--primary-dark);
  border-radius: 6px;
  font-weight: 700;
  font-size: 1.4rem;
  text-align: center;
  letter-spacing: 0.05em;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 2px 6px rgba(13, 71, 161, 0.2);
}

.pub-nav__btn:hover,
.pub-nav a.pub-nav__btn:hover {
  background: var(--primary-dark);
  color: #fff !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(13, 71, 161, 0.3);
}

@media (max-width: 600px) {
  .pub-nav {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }
  .pub-nav__btn,
  .pub-nav a.pub-nav__btn {
    padding: 1.2rem 1rem;
    font-size: 1.2rem;
  }
}

/* Smooth scroll & anchor offset */
html {
  scroll-behavior: smooth;
}
[id^="sec-"] {
  scroll-margin-top: 1rem;
}

/* Book cards */
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.8rem;
  margin: 1.5rem 0 2rem;
}

.book-card {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.book-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(13, 71, 161, 0.15);
}

.book-card__cover-link {
  display: block;
  margin: 0 auto 0.8rem;
  text-align: center;
}

.book-card__cover {
  width: 100%;
  max-width: 160px;
  height: 220px;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  background: linear-gradient(135deg, #e3f2fd, #bbdefb);
}

.book-card__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 0.3rem;
  line-height: 1.4;
}

.book-card__meta {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.8rem;
  line-height: 1.5;
  flex-grow: 1;
}

.book-card__link {
  display: inline-block;
  text-align: center;
  padding: 0.5rem 0.8rem;
  font-size: 0.85rem;
  background: var(--primary);
  color: #fff;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.2s;
}

.book-card__link:hover {
  background: var(--primary-dark);
}

/* Print */
@media print {
  .sidebar, .menu-toggle {
    display: none;
  }
  .main {
    margin-left: 0;
  }
}
