:root {
  --bg: #ffffff;
  --text: #4e555d;
  --heading: #39424a;
  --muted: #6f7782;
  --line: #e5e8eb;
  --accent: #b33a2b;
  --panel: #ffffff;
  --max-width: 1120px;
  --sidebar-width: 245px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, "Noto Sans SC", sans-serif;
  font-size: 18px;
  line-height: 1.55;
}

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

a:hover,
a:focus {
  text-decoration: underline;
}

.site-shell {
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto;
  padding-bottom: 3rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 0.9rem 0 1rem;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.brand-block {
  min-width: 0;
}

.site-title {
  color: #5c7391;
  font-size: 1.08rem;
  font-weight: 700;
}

.site-title:hover {
  text-decoration: none;
}

.site-tagline {
  margin: 0.15rem 0 0;
  color: #73839a;
  font-size: 0.92rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  justify-content: flex-end;
  font-size: 0.95rem;
}

.site-nav a {
  color: #5c7391;
}

.site-nav a.current {
  color: var(--heading);
  font-weight: 700;
}

.content-wrap {
  padding-top: 2.2rem;
}

.home-layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  gap: 3.2rem;
  align-items: start;
}

.profile-sidebar {
  position: sticky;
  top: 5.7rem;
}

.profile-photo {
  display: block;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  object-fit: cover;
  border: 6px solid var(--panel);
  box-shadow: 0 0 0 1px var(--line);
  margin-bottom: 0.9rem;
}

.profile-name {
  margin: 0 0 0.25rem;
  color: var(--heading);
  font-size: 1.9rem;
  line-height: 1.15;
}

.profile-role,
.profile-affiliation,
.profile-meta {
  margin: 0 0 0.55rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.profile-meta {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.meta-icon {
  width: 1.05rem;
  min-width: 1.05rem;
  height: 1.05rem;
  color: #5c7391;
}

.profile-links {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.profile-links li {
  margin-bottom: 0.65rem;
}

.profile-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text);
  font-size: 0.95rem;
}

.profile-links a:hover {
  color: var(--accent);
  text-decoration: none;
}

.link-icon {
  display: inline-grid;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #5c7391;
  font-size: 0.75rem;
  font-weight: 700;
}

.markdown-body,
.page-body {
  min-width: 0;
}

.markdown-body h2,
.page-header h1 {
  color: var(--heading);
}

.markdown-body h2 {
  margin: 0 0 0.9rem;
  font-size: 2rem;
  line-height: 1.2;
}

.markdown-body h2:not(:first-child) {
  margin-top: 2.2rem;
}

.markdown-body p,
.markdown-body ul,
.markdown-body ol {
  margin: 0 0 1rem;
  max-width: 47rem;
}

.markdown-body ul,
.markdown-body ol {
  padding-left: 1.35rem;
}

.markdown-body li {
  margin-bottom: 0.6rem;
}

.markdown-body strong,
.markdown-body b {
  color: var(--heading);
}

.page-header {
  margin-bottom: 1.8rem;
}

.section-kicker {
  margin: 0 0 0.45rem;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lead {
  margin: 0;
  max-width: 45rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.content-card {
  max-width: 860px;
}

.pub-list li {
  margin-bottom: 0.9rem;
}

.site-footer {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 900px) {
  .site-header,
  .home-layout {
    display: grid;
    grid-template-columns: 1fr;
  }

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

  .profile-sidebar {
    position: static;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 17px;
  }

  .site-shell {
    width: min(calc(100% - 1.2rem), var(--max-width));
  }

  .site-nav {
    gap: 0.85rem 1rem;
  }

  .profile-photo {
    width: 150px;
    height: 150px;
  }

  .markdown-body h2 {
    font-size: 1.7rem;
  }
}
