/* No external font CDN — this stack uses only fonts already present on the
   viewer's OS, so the page renders identically with or without internet. */
:root {
  --bg: #FDFCF9;
  --surface: #FFFFFF;
  --text-primary: #1E2233;
  --text-secondary: #545E70;
  --text-muted: #8A93A3;
  --accent: #2E4B8F;
  --accent-hover: #3E6BC0;
  --accent-soft: #EAF1FC;
  --gold: #C6912E;
  --gold-soft: #FBF1DE;
  --border: #E5E2D9;
  --serif: Georgia, 'Times New Roman', 'Noto Serif', serif;
  --sans: -apple-system, 'Segoe UI', 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
  --mono: 'SF Mono', 'Consolas', 'Liberation Mono', monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
}

a { color: var(--accent); text-decoration: none; border-bottom: 1px solid transparent; }
a:hover { color: var(--accent-hover); border-bottom-color: var(--accent-hover); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent-hover); outline-offset: 2px; }

/* Links within the page content get a visible underline so they clearly read as clickable */
main a {
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-underline-offset: 2px;
  border-bottom: none;
}

.layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  max-width: 1440px;
  margin: 0 auto;
  min-height: 100vh;
}

/* ---------- Sidebar ---------- */
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 40px 32px;
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-photo {
  width: 148px;
  height: 148px;
  border-radius: 6px;
  object-fit: cover;
  object-position: center 8%;
  display: block;
  margin-bottom: 20px;
  border: 1px solid var(--border);
}

.sidebar h1 {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 4px;
  line-height: 1.25;
}

.sidebar .role {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin: 0 0 2px;
}

.sidebar .chair {
  font-size: 13.5px;
  color: var(--gold);
  font-weight: 600;
  margin: 0 0 18px;
}

/* Chain-link divider — small motif tying to blockchain/network research */
.chain-divider {
  border: none;
  height: 10px;
  margin: 18px 0;
  background-image: radial-gradient(circle at 5px 5px, var(--border) 2.5px, transparent 2.6px);
  background-size: 16px 10px;
  background-repeat: repeat-x;
  background-position: left center;
}
.chain-divider::before { content: none; }

nav.side-nav { margin-top: 4px; }
nav.side-nav ul { list-style: none; margin: 0; padding: 0; }
nav.side-nav li { margin-bottom: 2px; }
nav.side-nav a {
  display: block;
  padding: 7px 10px;
  border-radius: 5px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-primary);
  border-bottom: none;
}
nav.side-nav a:hover { background: var(--accent-soft); color: var(--accent); }
nav.side-nav a.active { background: var(--accent); color: #fff; }

.side-links {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.side-links a {
  font-size: 13.5px;
  color: var(--text-secondary);
  border-bottom: none;
}
.side-links a:hover { color: var(--accent-hover); }
.side-links .icon { font-family: var(--mono); margin-right: 7px; color: var(--accent); }

/* ---------- Main content ---------- */
main {
  padding: 48px 56px 80px;
  max-width: 1000px;
}

main h2 {
  font-family: var(--serif);
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-weight: 600;
  margin: 40px 0 14px;
}
main h2:first-of-type { margin-top: 0; }

main p { margin: 0 0 14px; color: var(--text-primary); }

.intro {
  font-size: 17px;
  line-height: 1.75;
}

.news-list, .research-list, .pub-list, .student-list, .course-list {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
}
.news-list li, .pub-item, .course-item {
  position: relative;
  padding: 10px 0 10px 22px;
  border-bottom: 1px solid var(--border);
  font-size: 14.5px;
  color: var(--text-secondary);
}
.news-list li::before, .pub-item::before, .course-item::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 18px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}
.news-list li:last-child, .pub-item:last-child, .course-item:last-child { border-bottom: none; }

.research-block { margin-bottom: 22px; }
.research-block h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 4px;
  color: var(--text-primary);
}
.research-block .paper-detail {
  font-size: 13.5px;
  color: var(--text-muted);
  font-family: var(--mono);
  line-height: 1.6;
}
.paper-detail a {
  color: var(--accent);
  font-weight: 600;
  text-decoration-color: var(--accent);
}
.paper-detail a:hover { color: var(--accent-hover); text-decoration-color: var(--accent-hover); }

/* ---------- Collapsible research categories ---------- */
.research-category {
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 14px;
  padding: 0 18px;
  background: var(--surface);
}
.research-category summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.research-category summary::-webkit-details-marker { display: none; }
.research-category summary::after {
  content: '+';
  flex: none;
  font-size: 20px;
  line-height: 1;
  color: var(--accent);
}
.research-category[open] summary::after { content: '\2212'; }
.research-category summary:hover .cat-title { color: var(--accent); }
.research-category .cat-title {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
}
.research-category .count {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 13px;
  color: var(--text-muted);
  margin-left: 6px;
}
.research-category .research-block:first-of-type { margin-top: 6px; }
.research-category .research-block:last-of-type { padding-bottom: 18px; margin-bottom: 0; }
.research-category .news-list { margin-top: 2px; padding-bottom: 4px; }

.section-group { margin-bottom: 30px; }
.section-group h3 {
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  font-weight: 500;
  color: var(--accent);
  margin: 0 0 10px;
}

.student-list li {
  padding: 6px 0;
  font-size: 14.5px;
  color: var(--text-secondary);
  border-bottom: 1px dashed var(--border);
}
.student-list li:last-child { border-bottom: none; }

footer.page-footer {
  margin-top: 50px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--text-muted);
}

@media (max-width: 820px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; border-right: none; border-bottom: 1px solid var(--border); }
  main { padding: 32px 24px 60px; max-width: 100%; }
}
