:root {
  color-scheme: light;
  --bg: #f7f8f4;
  --ink: #17201d;
  --muted: #65706b;
  --line: #d9ded6;
  --panel: #ffffff;
  --soft: #edf3ef;
  --green: #1c7c54;
  --teal: #147c86;
  --gold: #d49b32;
  --coral: #d96b4d;
  --shadow: 0 18px 50px rgba(23, 32, 29, 0.12);
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 16px clamp(18px, 4vw, 44px);
  background: rgba(247, 248, 244, 0.9);
  border-bottom: 1px solid rgba(217, 222, 214, 0.75);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-grid;
  grid-template-columns: 46px minmax(0, auto);
  align-items: center;
  gap: 12px;
  max-width: max-content;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 0.98rem;
  line-height: 1.2;
}

.brand small {
  color: var(--muted);
  font-size: 0.78rem;
}

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

.site-nav a,
.filter-button {
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 9px 13px;
  color: var(--muted);
  font: inherit;
  font-size: 0.92rem;
  text-decoration: none;
  background: transparent;
  cursor: pointer;
}

.site-nav a:hover,
.site-nav a.is-active,
.filter-button:hover,
.filter-button.is-active {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--ink);
}

.page {
  display: none;
}

.page.is-active {
  display: block;
}

.hero-grid,
.page-shell,
.site-footer {
  width: min(var(--max), calc(100% - 36px));
  margin: 0 auto;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.98fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
  min-height: min(760px, calc(100svh - 112px));
  padding: clamp(34px, 6vw, 68px) 0;
}

.hero-copy h1,
.page-shell h1 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(2.25rem, 6vw, 4.45rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-lede {
  max-width: 680px;
  margin: 24px 0 0;
  color: #42504a;
  font-size: clamp(1.05rem, 2.2vw, 1.32rem);
}

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

.hero-visual {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  border: 1px solid rgba(217, 222, 214, 0.9);
  border-radius: 8px;
  background:
    radial-gradient(circle at 22% 22%, rgba(28, 124, 84, 0.22), transparent 30%),
    radial-gradient(circle at 82% 70%, rgba(217, 107, 77, 0.18), transparent 28%),
    linear-gradient(135deg, #fdfefe, #e6eee9);
  box-shadow: var(--shadow);
}

#networkCanvas {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 430px;
}

.visual-label {
  position: absolute;
  right: 18px;
  bottom: 18px;
  max-width: 280px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(14px);
}

.visual-label strong,
.visual-label span {
  display: block;
}

.visual-label span {
  color: var(--muted);
  font-size: 0.9rem;
}

.content-band {
  padding: clamp(42px, 7vw, 76px) max(18px, calc((100vw - var(--max)) / 2));
  border-top: 1px solid var(--line);
}

.content-band.muted {
  background: var(--soft);
}

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

.section-heading h2,
.section-heading h1 {
  margin: 0;
}

.section-heading h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.08;
}

.feature-grid,
.topic-grid,
.members-grid,
.course-grid {
  display: grid;
  gap: 18px;
}

.feature-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.feature-grid article,
.topic-grid article,
.profile-card,
.info-panel,
.publication-section,
.course-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.feature-grid article {
  min-height: 180px;
  padding: 22px;
}

.feature-grid h3,
.topic-grid h3,
.info-panel h2,
.publication-section h2,
.course-card h2 {
  margin: 0 0 10px;
  line-height: 1.18;
}

.feature-grid p,
.topic-grid p,
.info-panel p,
.profile-card p {
  margin: 0;
  color: var(--muted);
}

.topic-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.topic-grid article {
  min-height: 300px;
  padding: 26px;
}

.topic-number {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--coral);
  font-weight: 800;
}

ul,
ol {
  padding-left: 1.2rem;
}

li + li {
  margin-top: 10px;
}

.page-shell {
  min-height: calc(100svh - 155px);
  padding: clamp(42px, 8vw, 84px) 0;
}

.page-shell.wide {
  --max: 1280px;
}

.members-grid {
  grid-template-columns: 1.4fr 1fr;
  align-items: stretch;
}

.profile-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 22px;
  padding: 28px;
}

.principal {
  grid-row: span 2;
}

.avatar {
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--green), var(--teal));
  color: #fff;
  font-size: 1.45rem;
  font-weight: 800;
}

.profile-card h2 {
  margin: 0 0 10px;
  font-size: clamp(1.55rem, 4vw, 2.3rem);
}

.profile-card a {
  display: inline-block;
  margin-top: 12px;
  color: var(--teal);
  font-weight: 700;
}

.info-panel {
  padding: 26px;
}

.timeline-item {
  display: grid;
  gap: 8px;
  padding-left: 16px;
  border-left: 4px solid var(--gold);
}

.timeline-item span {
  color: var(--muted);
}

.split-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: end;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.publication-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.publication-section {
  padding: 24px;
}

.publication-section.is-hidden {
  display: none;
}

.publication-section ol {
  margin: 0;
}

.publication-section li {
  color: #36413d;
}

.course-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.course-card {
  min-height: 210px;
  padding: 26px;
  display: grid;
  align-content: space-between;
}

.course-link {
  color: inherit;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.course-link:hover {
  border-color: rgba(28, 124, 84, 0.45);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.course-card span {
  width: max-content;
  border-radius: 8px;
  padding: 6px 10px;
  background: var(--soft);
  color: var(--green);
  font-weight: 800;
}

.course-card h2 {
  font-size: clamp(1.35rem, 3vw, 2.1rem);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px 0 38px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.site-footer p {
  margin: 0;
}

.course-header {
  grid-template-columns: minmax(0, 1fr) auto;
}

.course-page {
  overflow: hidden;
}

.course-hero,
.course-section {
  width: min(var(--max), calc(100% - 36px));
  margin: 0 auto;
}

.course-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: end;
  padding: clamp(52px, 8vw, 96px) 0 clamp(34px, 6vw, 70px);
}

.course-hero-copy h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(2.55rem, 6.8vw, 5rem);
  line-height: 0.95;
}

.course-hero-copy p:last-child {
  max-width: 680px;
  margin: 24px 0 0;
  color: #42504a;
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
}

.course-meta-grid,
.course-description-grid,
.resource-grid,
.schedule-grid,
.evaluation-grid {
  display: grid;
  gap: 18px;
}

.course-meta-grid {
  grid-template-columns: 1fr;
}

.course-meta-grid article,
.resource-grid article,
.schedule-grid article,
.evaluation-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.course-meta-grid article {
  padding: 22px;
}

.course-meta-grid span,
.schedule-grid span,
.evaluation-grid span {
  display: block;
  color: var(--muted);
}

.course-meta-grid strong {
  display: block;
  margin-top: 4px;
  font-size: 1.15rem;
}

.course-section {
  padding: clamp(42px, 7vw, 78px) 0;
  border-top: 1px solid var(--line);
}

.course-section.muted {
  width: 100%;
  max-width: none;
  padding-right: max(18px, calc((100vw - var(--max)) / 2));
  padding-left: max(18px, calc((100vw - var(--max)) / 2));
  background: var(--soft);
}

.course-description-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.course-description-grid p {
  margin: 0;
  color: #42504a;
  font-size: 1.08rem;
}

.resource-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.resource-grid article {
  padding: 24px;
}

.resource-grid h3 {
  margin: 0 0 12px;
  line-height: 1.18;
}

.resource-grid a {
  color: var(--teal);
  font-weight: 700;
}

.schedule-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.schedule-grid article {
  min-height: 150px;
  padding: 20px;
}

.schedule-grid span {
  width: max-content;
  margin-bottom: 18px;
  border-radius: 8px;
  padding: 5px 9px;
  background: var(--soft);
  color: var(--green);
  font-weight: 800;
}

.schedule-grid p {
  margin: 0;
}

.evaluation-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.evaluation-grid.single {
  grid-template-columns: minmax(0, 1fr);
}

.evaluation-grid article {
  min-height: 180px;
  padding: 22px;
}

.evaluation-grid strong {
  display: block;
  margin-bottom: 18px;
  color: var(--coral);
  font-size: 2.2rem;
  line-height: 1;
}

@media (max-width: 920px) {
  .site-header {
    grid-template-columns: minmax(0, 1fr) 44px;
  }

  .course-header {
    grid-template-columns: 1fr;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    grid-column: 1 / -1;
    display: none;
    justify-content: stretch;
  }

  .site-nav.is-open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .course-nav {
    display: flex;
    grid-column: 1;
    justify-content: flex-start;
  }

  .site-nav a {
    text-align: center;
  }

  .hero-grid,
  .members-grid,
  .split-heading,
  .course-hero {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    min-height: 0;
  }

  .hero-visual,
  #networkCanvas {
    min-height: 330px;
  }

  .feature-grid,
  .publication-grid,
  .resource-grid,
  .schedule-grid,
  .evaluation-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-group {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .brand {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .brand-mark {
    width: 40px;
    height: 40px;
  }

  .brand small {
    display: none;
  }

  .hero-grid,
  .page-shell,
  .site-footer {
    width: min(100% - 28px, var(--max));
  }

  .hero-copy h1,
  .page-shell h1 {
    font-size: clamp(2.05rem, 12vw, 3.35rem);
  }

  .feature-grid,
  .topic-grid,
  .publication-grid,
  .course-grid,
  .course-description-grid,
  .resource-grid,
  .schedule-grid,
  .evaluation-grid,
  .site-nav.is-open {
    grid-template-columns: 1fr;
  }

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

  .publication-section {
    padding: 20px;
  }

  .site-footer {
    display: grid;
  }
}
