/* Minimal academic homepage: avatar, bio, publication tables */
:root {
  --text: #171717;
  --muted: #525252;
  --link: #0b57d0;
  --link-hover: #0842a0;
  --border: #e5e5e5;
  --bg: #fafafa;
  --card: #fff;
  --accent: #8b0000;
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-serif: "Source Serif 4", "Noto Serif SC", "Source Han Serif SC",
    Georgia, "Times New Roman", serif;
  --font-bio: "Merriweather", Georgia, "Noto Serif SC", "Source Han Serif SC",
    serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.011em;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

.wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

/* Profile — name & affiliation left, photo right */
.profile-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.profile-ident {
  flex: 1;
  min-width: 0;
  padding-top: 0.15rem;
}

.profile-name {
  margin: 0 0 0.35rem;
  font-family: var(--font-serif);
  font-size: 1.875rem;
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.03em;
  text-rendering: optimizeLegibility;
}

.profile-title {
  margin: 0 0 0.55rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.4;
  letter-spacing: -0.015em;
}

.profile-affil {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.58;
  color: var(--muted);
  letter-spacing: -0.01em;
}

.profile-header .bio {
  margin: 1.1rem 0 0;
  padding: 0;
  font-family: var(--font-bio);
  font-size: 0.875rem;
  line-height: 1.68;
  letter-spacing: 0.006em;
  color: var(--text);
}

.profile-header .bio p:last-child {
  margin-bottom: 0;
}

.profile-figure {
  margin: 0;
  flex-shrink: 0;
}

.profile-photo {
  width: 100%;
  max-width: 200px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: #eee;
  display: block;
}

@media (max-width: 640px) {
  .profile-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .profile-ident {
    padding-top: 0;
  }

  .profile-header .bio p {
    text-align: left;
  }
}

section {
  margin-bottom: 2rem;
}

section h2 {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

section h2 .works-scope {
  font-weight: 500;
  font-size: 0.92em;
  color: var(--muted);
  letter-spacing: 0;
}

.bio p {
  margin: 0 0 0.9rem;
  text-align: justify;
  hyphens: auto;
}

.profile-header .bio p {
  line-height: 1.68;
}

.pub-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.pub-table tr:not(:last-child) td {
  border-bottom: 1px solid var(--border);
}

.pub-table td {
  padding: 1.15rem 1.25rem;
  vertical-align: top;
}

.pub-table .thumb {
  width: 228px;
  min-width: 180px;
  padding-right: 0.35rem;
}

.pub-table td:not(.thumb) {
  padding-left: 0.65rem;
}

.pub-table .thumb img {
  width: 200px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
  display: block;
  background: #f0f0f0;
}

.pub-table .thumb .thumb-ph {
  width: 200px;
  max-width: 100%;
  min-height: 90px;
  border-radius: 6px;
  border: 1px dashed #ccc;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  color: #999;
  text-align: center;
  line-height: 1.25;
  padding: 0.35rem;
  box-sizing: border-box;
}

.pub-title {
  font-weight: 600;
  font-size: 1.015rem;
  line-height: 1.4;
  margin-bottom: 0.35rem;
  letter-spacing: -0.015em;
}

.pub-authors {
  font-size: 0.895rem;
  color: var(--muted);
  margin-bottom: 0.25rem;
  line-height: 1.5;
}

.pub-venue {
  display: inline;
  font-size: 0.875rem;
  font-style: italic;
  margin-right: 0.45em;
}

.pub-links {
  display: inline;
  font-size: 0.875rem;
  font-weight: 500;
}

.pub-abs {
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 0.35rem;
  line-height: 1.58;
  letter-spacing: -0.006em;
}

.pub-abs::before {
  content: "▸";
  display: inline-block;
  margin-right: 0.42em;
  color: var(--accent);
  font-size: 1.05em;
  opacity: 0.88;
  transform: translateY(-0.02em);
}

@media (max-width: 720px) {
  .pub-table tr:not(:last-child) td {
    border-bottom: none;
  }

  .pub-table tr:not(:last-child) td:last-child {
    border-bottom: 1px solid var(--border);
  }

  .pub-table tr {
    display: flex;
    flex-direction: column;
  }

  .pub-table td {
    display: block;
    width: 100%;
    padding: 0.85rem 1rem;
  }

  .pub-table .thumb {
    width: 100%;
    min-width: 0;
    padding-bottom: 0;
    text-align: center;
  }

  .pub-table .thumb img,
  .pub-table .thumb .thumb-ph {
    width: min(260px, 100%);
    margin-left: auto;
    margin-right: auto;
  }

  .pub-table td:not(.thumb) {
    padding-left: 1rem;
    padding-top: 0.35rem;
  }
}
