html {
  min-height: 100%;
  background: #eef0f1;
}

:root {
  --accent: #31577f;
  --accent-strong: #17366d;
  --accent-line: #9aa7bd;
  --font-sans: "Crimson Text", "Noto Sans SC", serif;
}

body {
  box-sizing: border-box;
  max-width: 1120px;
  margin: 32px auto;
  padding: 24px 36px 40px;
  color: #262a2c;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  font-family: var(--font-sans);
  font-size: 14.5px;
  line-height: 1.5;
}

a,
a:link,
a:visited {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--accent-strong);
}

h1,
h2,
h3,
h4,
h5,
h6,
strong,
b {
  font-weight: 400;
}

.page-shell {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 36px;
}

.profile {
  position: sticky;
  top: 8px;
  align-self: start;
}

.profile h1 {
  white-space: nowrap;
  color: var(--accent-strong);
  font-family: var(--font-sans);
  font-size: 29px;
  font-weight: 400;
  letter-spacing: 0;
}

.name-zh {
  margin-top: -1em;
  font-family: "Kaiti SC", KaiTi, STKaiti, "BiauKai", serif;
  font-size: 19px;
}

.profile-photo {
  display: block;
  width: 150px;
  height: auto;
  margin-top: 1em;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.profile-photo:hover {
  transform: scale(1.02);
  box-shadow: 0 7px 20px rgba(0, 0, 0, 0.16);
}

.content {
  min-width: 0;
}

.intro {
  font-size: 1.07em;
  line-height: 1.55;
}

.content > h3 {
  font-weight: 600;
  font-size: 19px;
  line-height: 1.25;
  color: var(--accent-strong);
  border-bottom: 2px solid var(--accent-line);
  padding-bottom: 4px;
  margin-top: 1.3em;
  margin-bottom: 0.8em;
}

.publication {
  margin-bottom: 1.15em;
}

.publication > div:first-child {
  line-height: 1.45;
  color: var(--accent-strong);
  font-weight: 600;
}

.venue-abbr {
  font-weight: 600;
}

.authors summary {
  cursor: pointer;
}

.authors,
.publication > div:last-child {
  font-size: 0.88em;
  line-height: 1.45;
}

.publication-meta {
  font-weight: 400;
}

.authors > div {
  margin-left: 1.25em;
}

.author-toggle {
  text-decoration: underline;
}

.author-toggle::after {
  content: "Show all authors";
}

.authors[open] .author-toggle::after {
  content: "Hide authors";
}

.authors[open] .author-preview {
  display: none;
}

.me {
  font-weight: 600;
}

.experience {
  margin: 1em 0;
}

.experience summary {
  cursor: pointer;
}

.experience summary strong {
  color: var(--accent-strong);
  font-weight: 600;
}

.experience > div {
  margin: 0.25em 0 0 1.25em;
}

.experience-toggle {
  text-decoration: underline;
}

.experience-toggle::after {
  content: "Show details";
}

.experience[open] .experience-toggle::after {
  content: "Hide details";
}

.education-item > strong {
  color: var(--accent-strong);
  font-weight: 600;
}

/* Minimal structural rules for the writing pages. */
.blog-nav {
  margin-bottom: 1em;
}

.post-list {
  padding: 0;
  list-style: none;
}

.post-item {
  margin-bottom: 1em;
}

.post-item__title,
.post-item__date,
.post-item__summary {
  display: block;
}

.post-item__date {
  font-size: small;
}

.prose img {
  max-width: 100%;
  height: auto;
}

.prose pre {
  overflow-x: auto;
}

footer {
  margin-top: 2em;
  font-size: small;
}

@media (max-width: 720px) {
  html {
    background: #ffffff;
  }

  body {
    margin: 0;
    padding: 16px;
    border-radius: 0;
    box-shadow: none;
  }

  .page-shell {
    display: block;
  }

  .profile {
    position: static;
  }

  .content {
    margin-top: 2em;
  }
}
