:root {
  --bg: #ffffff;
  --text: #1f2933;
  --muted: #637083;
  --border: #e5e8ee;
  --surface: #f7f9fc;
  --surface-strong: #eef5fb;
  --accent: #245a8d;
  --accent-dark: #183f66;
  --max-width: 1120px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #f8fbff 0, #ffffff 260px);
  line-height: 1.65;
}

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

a:hover {
  text-decoration: underline;
}

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

.site-main img:not(.member-photo):not(.profile-photo):not(.home-cover-photo):not(.home-profile-photo) {
  display: block;
  max-width: min(100%, 760px);
  height: auto;
  margin: 18px auto;
  border-radius: 12px;
}

.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0;
}

.site-title {
  display: flex;
  flex-direction: column;
  color: var(--text);
  font-weight: 700;
  line-height: 1.25;
}

.site-title small {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.82rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: flex-end;
}

.site-nav a {
  color: var(--text);
  font-size: 0.95rem;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}

.site-nav a.active,
.site-nav a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
  text-decoration: none;
}

.site-main {
  padding: 36px 0 54px;
}

.page-header h1,
.hero h1,
.home-sidebar h1 {
  margin: 0 0 12px;
  line-height: 1.2;
}

.home-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 34px;
  align-items: start;
}

.home-sidebar {
  position: fixed;
  top: auto;
  width: 280px;
  z-index: 1;
  text-align: center;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 30px rgba(31, 41, 51, 0.06);
}

.home-main {
  grid-column: 2;
}

.home-profile-photo {
  width: 190px;
  height: 220px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #fff;
  margin: 0 auto 18px;
}

.home-main section {
  margin-bottom: 34px;
}

.home-main h2 {
  margin: 0 0 14px;
}

.home-top-photo {
  margin-bottom: 24px;
}

.home-photo-carousel {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  border-radius: 24px;
  padding-bottom: 6px;
}

.home-photo-carousel::-webkit-scrollbar {
  height: 8px;
}

.home-photo-carousel::-webkit-scrollbar-track {
  background: #edf3f9;
  border-radius: 999px;
}

.home-photo-carousel::-webkit-scrollbar-thumb {
  background: #b8cde0;
  border-radius: 999px;
}

.home-top-photo .home-cover-photo {
  flex: 0 0 100%;
  width: 100%;
  height: 360px;
  object-fit: cover;
  display: block;
  scroll-snap-align: start;
  border-radius: 24px;
  border: 1px solid var(--border);
  box-shadow: 0 18px 42px rgba(31, 41, 51, 0.10);
}

.carousel-hint {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  text-align: right;
}

.home-intro-card {
  margin-bottom: 36px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: linear-gradient(135deg, #ffffff 0%, var(--surface-strong) 100%);
}

.home-intro-card h2,
.section-heading h2,
.home-news-block h2,
.home-join h2 {
  margin-top: 0;
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 15px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}

.button-link:hover {
  color: #fff;
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  text-decoration: none;
}

.button-link.secondary {
  background: #fff;
  color: var(--accent-dark);
  border-color: var(--border);
}

.button-link.secondary:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--surface);
}

.section-heading {
  margin-bottom: 16px;
}

.research-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 36px;
}

.research-card {
  min-height: 170px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(31, 41, 51, 0.05);
}

.research-card h3 {
  margin: 0 0 8px;
  color: var(--accent-dark);
}

.research-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.research-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.research-tag {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: #e9f1fa;
  color: var(--accent-dark);
  font-size: 0.9rem;
  font-weight: 600;
}

.home-news-block {
  margin-bottom: 34px;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(31, 41, 51, 0.06);
}

.news-section {
  border-top: 1px solid var(--border);
}

.news-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}

.news-date {
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 0.9rem;
}

.news-text {
  color: var(--text);
}

.view-more {
  margin-bottom: 0;
}

.home-join {
  background: linear-gradient(135deg, var(--surface) 0%, #ffffff 100%);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
  gap: 30px;
  align-items: center;
  margin-bottom: 36px;
}

.hero-card,
.card,
.notice {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 14px;
  padding: 22px;
}

.hero-card {
  min-height: 230px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-card .label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
}

.profile-hero {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 24px;
  align-items: center;
  padding: 22px;
  margin-bottom: 30px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.profile-photo {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
}

.profile-title {
  color: var(--muted);
  font-size: 1.05rem;
  margin-top: 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
}

.card h3 {
  margin-top: 0;
  margin-bottom: 6px;
}

.member-card {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 14px;
  align-items: start;
}

.member-photo {
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
}

.avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
}

.compact-list {
  margin: 10px 0;
  padding-left: 18px;
  font-size: 0.92rem;
}

.meta {
  color: var(--muted);
  font-size: 0.95rem;
}

.list-item {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

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

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e9f1fa;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 600;
  margin: 2px 2px 2px 0;
}

.news-nav,
.news-page-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.news-nav > div:last-child,
.news-page-nav > div:nth-child(2) {
  text-align: right;
}

.news-page-nav > p {
  grid-column: 1 / -1;
  margin: 8px 0 0;
}

.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 0;
}

@media (max-width: 780px) {
  .header-inner,
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .home-layout,
  .hero,
  .two-column,
  .profile-hero,
  .news-nav,
  .news-page-nav,
  .news-row {
    grid-template-columns: 1fr;
  }

  .home-sidebar {
    position: static;
    width: auto;
    text-align: left;
  }

  .home-main {
    grid-column: 1;
  }

  .home-profile-photo {
    margin-left: 0;
  }

  .home-top-photo .home-cover-photo {
    height: 260px;
  }

  .carousel-hint {
    text-align: left;
  }

  .member-card {
    grid-template-columns: 1fr;
  }

  .news-nav > div:last-child,
  .news-page-nav > div:nth-child(2) {
    text-align: left;
  }
}
