:root {
  color-scheme: light;
  --paper: #f7f6f1;
  --surface: #ffffff;
  --ink: #1f292b;
  --muted: #62706b;
  --line: #dedbd0;
  --accent: #28575c;
  --accent-soft: #dfe9e5;
  --gold: #9b7a38;
  --shadow: 0 12px 34px rgba(34, 45, 45, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 18px clamp(20px, 5vw, 72px);
  border-bottom: 1px solid rgba(222, 219, 208, 0.84);
  background: rgba(247, 245, 239, 0.9);
  backdrop-filter: blur(18px);
}

.brand {
  display: grid;
  text-decoration: none;
}

.brand span {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.site-nav nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-nav nav a {
  border-radius: 4px;
  padding: 8px 11px;
  color: #3c4748;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.site-nav nav a:hover,
.site-nav nav a.active {
  background: var(--accent-soft);
  color: var(--accent);
}

main {
  width: min(1120px, calc(100vw - 40px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(330px, 0.7fr);
  gap: 36px;
  min-height: 620px;
  align-items: center;
  padding: 64px 0 54px;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow,
.section-label {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.12;
  letter-spacing: 0;
}

.hero h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(52px, 8vw, 94px);
  font-weight: 700;
}

.hero h1 span {
  color: var(--accent);
}

.lead {
  max-width: 760px;
  margin: 22px 0 0;
  color: #465251;
  font-size: 19px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.hero-actions a,
.text-link,
.inline-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 8px 14px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.hero-actions a:hover,
.text-link:hover,
.inline-links a:hover {
  background: var(--accent);
  color: #fff;
}

.identity-panel {
  display: grid;
  gap: 18px;
  align-self: stretch;
  align-content: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
}

.identity-panel img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 6px;
}

.identity-panel strong,
.identity-panel span {
  display: block;
}

.identity-panel span {
  color: var(--muted);
  font-size: 14px;
}

.identity-panel dl,
.metric-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0;
}

.identity-panel dl div,
.metric-row div {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

dt,
.metric-row small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

dd,
.metric-row span {
  display: block;
  margin: 2px 0 0;
  font-size: 18px;
  font-weight: 900;
}

.section {
  padding: 42px 0;
  border-top: 1px solid var(--line);
}

.section h2 {
  margin-bottom: 20px;
  font-size: clamp(30px, 4vw, 44px);
  font-family: Georgia, "Times New Roman", serif;
}

.focus-section {
  display: grid;
  gap: 40px;
}

.focus-intro {
  max-width: 760px;
}

.focus-papers {
  padding-top: 34px;
  border-top: 1px solid var(--line);
}

.focus-papers .section-heading-row {
  margin-bottom: 20px;
}

.focus-papers .section-heading-row h2 {
  margin-bottom: 0;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 44px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-list span,
.post-card span {
  border: 1px solid #ccd4cf;
  border-radius: 4px;
  padding: 6px 9px;
  background: rgba(255, 255, 255, 0.62);
  color: #42514d;
  font-size: 13px;
  font-weight: 700;
}

.paper-list {
  display: grid;
  gap: 16px;
}

.paper-list.compact {
  gap: 12px;
}

.paper-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.84);
}

.paper-year {
  color: var(--accent);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 900;
}

.paper-status {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.paper-card h3 {
  margin-bottom: 8px;
  font-size: 20px;
  line-height: 1.35;
}

.paper-card:hover {
  border-color: #b6c1ba;
}

.paper-card p {
  margin: 8px 0 0;
}

.muted {
  color: var(--muted);
  font-size: 14px;
}

.inline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.section-heading-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.post-card a {
  display: flex;
  min-height: 250px;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--surface);
  text-decoration: none;
}

.post-card a:hover {
  border-color: #aebbb5;
  box-shadow: var(--shadow);
}

.post-card time {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.post-card h3 {
  margin: 10px 0 12px;
  font-size: 20px;
}

.post-card p {
  flex: 1;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
}

.post-card div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.page-hero {
  padding: 80px 0 48px;
}

.page-hero h1 {
  max-width: 900px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(44px, 7vw, 78px);
}

.academic-hero {
  border-bottom: 1px solid var(--line);
}

.timeline {
  display: grid;
  gap: 18px;
  border-left: 2px solid #cfd8d2;
  padding-left: 22px;
}

.timeline article {
  position: relative;
}

.timeline article:before {
  content: "";
  position: absolute;
  top: 7px;
  left: -29px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: var(--paper);
}

.timeline time {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.timeline h3 {
  margin: 4px 0 6px;
  font-size: 20px;
}

.timeline p {
  margin: 0;
  color: var(--muted);
}

.clean-list,
.contact-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.clean-list.two-column {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.clean-list li,
.contact-list li {
  border-top: 1px solid var(--line);
  padding: 12px 0 0;
}

.contact-list li {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 14px;
}

.contact-list span {
  color: var(--muted);
  font-weight: 800;
}

.archive-tools {
  display: grid;
  gap: 18px;
}

.archive-tools label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.archive-tools input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 14px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.tag-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-filter button {
  border: 1px solid #ccd4cf;
  border-radius: 4px;
  padding: 7px 10px;
  background: #fff;
  color: #42514d;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
}

.tag-filter button.active,
.tag-filter button:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.archive-year {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 24px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
}

.archive-year:first-child {
  border-top: 0;
  padding-top: 0;
}

.archive-year h2 {
  position: sticky;
  top: 92px;
  margin: 0;
  color: var(--accent);
}

.archive-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.post-page {
  width: min(820px, 100%);
  margin: 0 auto;
  padding: 62px 0;
}

.post-page header {
  margin: 26px 0 34px;
}

.post-page h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(38px, 6vw, 64px);
}

.markdown-body {
  color: #2b3434;
  font-size: 17px;
}

.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
  margin: 42px 0 14px;
}

.markdown-body p,
.markdown-body ul,
.markdown-body ol {
  margin: 18px 0;
}

.markdown-body .math-display {
  overflow-x: auto;
  margin: 24px 0;
  padding: 4px 0;
  text-align: center;
}

.markdown-body mjx-container[display="true"] {
  margin: 0 !important;
}

.markdown-body pre {
  overflow: auto;
  border-radius: 8px;
  padding: 18px;
  background: #1f292b;
  color: #ecf1ee;
}

.markdown-body code {
  border-radius: 4px;
  padding: 2px 5px;
  background: #e9ece6;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.markdown-body pre code {
  padding: 0;
  background: transparent;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 18px;
  padding: 42px 20px 54px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 900px) {
  .hero,
  .split,
  .post-grid,
  .archive-items {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 0;
    padding-top: 48px;
  }

  .identity-panel {
    align-content: start;
  }
}

@media (max-width: 700px) {
  .site-nav {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .site-nav nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  main {
    width: min(100vw - 28px, 1120px);
  }

  .paper-card,
  .archive-year,
  .contact-list li,
  .clean-list.two-column {
    grid-template-columns: 1fr;
  }

  .archive-year h2 {
    position: static;
  }

  .identity-panel dl,
  .metric-row {
    grid-template-columns: 1fr;
  }
}
