:root {
  /* ---- Color Palette ---- */
  --ink: #18343c;        /* 主文字色 */
  --muted: #63757a;      /* 辅助文字色 */
  --paper: #f8f7f2;      /* 页面背景色 */
  --rule: #d8dfd9;       /* 分隔线颜色 */
  --accent: #b45637;     /* 强调色 */
  --soft: #e7eee9;       /* 页脚背景色 */
}

/* ============================================================
   Reset & Base
   ============================================================ */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "DM Sans", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.62;
}

/* Skip-to-content link (hidden until focused) */
.skip-link {
  position: absolute;
  top: -9999px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  padding: 8px 16px;
  z-index: 100;
  text-decoration: none;
  border-radius: 0 0 4px 4px;
}

.skip-link:focus {
  top: 0;
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ============================================================
   Layout
   ============================================================ */
.wrap {
  width: min(1080px, calc(100% - 48px));
  margin: 0 auto;
}

/* ============================================================
   Header / Hero
   ============================================================ */
.hero {
  background: var(--ink);
  color: #f7f4ec;
  border-bottom: 7px solid var(--accent);
}

.hero-grid {
  min-height: 350px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 40px;
  padding: 66px 0 52px;
}

/* ============================================================
   Typography Helpers
   ============================================================ */
.eyebrow,
.section-label,
.role,
.item-meta {
  font-family: "DM Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.eyebrow {
  color: #b7cec5;
  margin: 0 0 15px;
}

h1, h2, p {
  margin-top: 0;
}

h1 {
  font: 400 clamp(3.7rem, 10vw, 7rem) / 0.82 "Libre Baskerville",
    Georgia, serif;
  letter-spacing: -0.07em;
  margin: 0;
}

h1 em {
  color: #d9a86c;
}

.intro {
  max-width: 480px;
  color: #c5d2cc;
  font-size: 1.15rem;
  margin: 26px 0 0;
}

/* ============================================================
   Links
   ============================================================ */
a {
  color: inherit;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration: underline;
}

.contact {
  display: grid;
  gap: 6px;
  justify-items: end;
  padding-bottom: 4px;
  color: #c5d2cc;
  font-style: normal;
  font-size: 0.9rem;
}

.contact a {
  color: #f7f4ec;
}

/* Hero name row + circular avatar beside the name */
.hero-name {
  display: flex;
  align-items: center;
  gap: 34px;
}

.avatar {
  width: 200px;
  height: 200px;
  flex: none;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid rgba(247, 244, 236, 0.55);
  box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.6);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font: 500 0.76rem / 1 "DM Mono", monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 12px 18px;
  border-radius: 3px;
  transition: background 0.15s ease, color 0.15s ease,
    border-color 0.15s ease;
}

.btn-primary {
  background: #f7f4ec;
  color: var(--ink);
}

.btn-primary:hover {
  background: #ffffff;
  text-decoration: none;
}

.btn-ghost {
  border: 1px solid rgba(247, 244, 236, 0.45);
  color: #f7f4ec;
}

.btn-ghost:hover {
  border-color: #f7f4ec;
  background: rgba(247, 244, 236, 0.08);
  text-decoration: none;
}

/* ============================================================
   Main & Sections
   ============================================================ */
main {
  padding: 75px 0 30px;
}

section {
  border-top: 1px solid var(--rule);
  padding: 38px 0 48px;
}

/* Research focus statement */
.statement {
  border-top: 0;
  padding-top: 0;
  max-width: 850px;
}

.statement > p:last-child {
  font: 400 1.45rem / 1.55 "Libre Baskerville", Georgia, serif;
}

.section-label {
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 20px;
}

/* ============================================================
   Publications
   ============================================================ */
.publications {
  list-style: none;
  padding: 0;
  margin: 0;
}

.publications li {
  display: grid;
  grid-template-columns: 74px 1fr;
  padding: 17px 0;
  border-top: 1px solid var(--rule);
}

.publications li:last-child {
  border-bottom: 1px solid var(--rule);
}

.publications p {
  margin: 0;
}

.pub-year {
  color: var(--accent);
  font: 500 0.8rem "DM Mono", monospace;
  padding-top: 5px;
}

/* ============================================================
   Research Projects
   ============================================================ */
.items {
  border-top: 1px solid var(--rule);
}

.item {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 35px;
  padding: 27px 0 29px;
  border-bottom: 1px solid var(--rule);
}

.item-meta {
  color: var(--muted);
  display: grid;
  align-content: start;
  gap: 4px;
}

.item h2,
.education h2 {
  font: 700 1.08rem / 1.35 "DM Sans", sans-serif;
  margin-bottom: 3px;
}

.role {
  color: var(--muted);
  margin-bottom: 15px;
}

/* Project detail grid (label-value pairs) */
.project-details {
  display: grid;
  grid-template-columns: 135px 1fr;
  gap: 9px 18px;
  margin: 0;
}

.project-details dt {
  color: var(--accent);
  font: 500 0.69rem / 1.65 "DM Mono", monospace;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.project-details dd {
  margin: 0;
}

.detail-list,
.item ul {
  padding-left: 20px;
  margin: 0;
}

.detail-list li,
.item li {
  margin: 3px 0;
}

/* Key figure placed below the project text (published work) */
.paper-figure {
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px dashed var(--rule);
}

.paper-figure-link {
  display: block;
  line-height: 0;
  border: 1px solid var(--rule);
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}

.paper-figure-link img {
  display: block;
  width: 100%;
  height: auto;
}

.paper-figure-link:hover img {
  opacity: 0.92;
}

.paper-figure figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

.paper-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin: 15px 0 0;
  padding-top: 11px;
  border-top: 1px dashed var(--rule);
}

.paper-links a {
  color: var(--accent);
  font: 500 0.72rem / 1 "DM Mono", monospace;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
}

.paper-links a:hover {
  text-decoration: underline;
}

/* ============================================================
   Two-column Layout (Education / Skills / Work / etc.)
   ============================================================ */
.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 78px;
}

/* Education */
.education {
  padding: 0 0 24px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--rule);
}

.education p {
  margin: 3px 0;
  color: var(--muted);
}

.education p:first-of-type {
  color: var(--ink);
}

.education span {
  white-space: nowrap;
}

.education a {
  color: var(--accent);
}

.education a:hover {
  text-decoration: underline;
}

/* Technical Skills */
.skills {
  margin: 0;
}

.skills dt {
  color: var(--accent);
  font: 500 0.75rem "DM Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-top: 14px;
}

.skills dt:first-child {
  margin-top: 0;
}

.skills dd {
  margin: 3px 0 0;
}

/* ============================================================
   Work Experience & Honors
   ============================================================ */
.lower p {
  margin-bottom: 22px;
}

.plain-list {
  padding-left: 19px;
  margin: 0;
}

.plain-list li {
  margin-bottom: 11px;
}

.muted {
  color: var(--muted);
  font-size: 0.92rem;
}

/* ============================================================
   Footer
   ============================================================ */
footer {
  background: var(--soft);
  color: var(--muted);
  font: 400 0.75rem "DM Mono", monospace;
  padding: 22px 0;
}

/* ============================================================
   Responsive (Mobile)
   ============================================================ */
@media (max-width: 700px) {
  .wrap {
    width: min(100% - 32px, 1080px);
  }

  .hero-grid,
  .two-column {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    padding: 50px 0 38px;
    min-height: unset;
    gap: 38px;
  }

  .contact {
    justify-items: start;
  }

  .hero-name {
    gap: 16px;
  }

  .avatar {
    width: 110px;
    height: 110px;
    border-width: 2px;
  }

  .item {
    grid-template-columns: 1fr;
    gap: 11px;
  }

  .item-meta {
    grid-template-columns: auto auto;
    justify-content: space-between;
  }

  .project-details {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .project-details dt {
    margin-top: 9px;
  }

  .project-details dt:first-child {
    margin-top: 0;
  }

  .two-column {
    gap: 15px;
  }

  .statement > p:last-child {
    font-size: 1.2rem;
  }

  main {
    padding-top: 52px;
  }
}

/* ============================================================
   Print Styles
   ============================================================ */
@media print {
  body {
    font-size: 11pt;
  }

  .hero {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .hero-grid {
    min-height: 240px;
    padding: 42px 0 32px;
  }

  main {
    padding-top: 35px;
  }

  section {
    padding: 22px 0;
    break-inside: avoid;
  }

  .item {
    padding: 16px 0;
  }

  .paper-figure {
    break-inside: avoid;
  }

  .hero-actions {
    display: none;
  }

  .avatar {
    width: 140px;
    height: 140px;
  }

  /* Hide skip-link in print */
  .skip-link {
    display: none;
  }
}
