/* Ink-blue academic variant: warm details with a calm dark hero. */
:root {
  --academic-ink: #203746;
  --academic-muted: #63747b;
  --academic-link: #2b5c70;
  --academic-line: #dce3e5;
  --academic-paper: #ffffff;
  --academic-warm: #f7f7f4;
  --academic-accent: #b58d63;
}

body {
  background: var(--academic-paper);
  color: var(--academic-ink);
  font-family: "Aptos", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

h1, h2, h3 {
  font-family: "Iowan Old Style", "Baskerville", "Noto Serif CJK SC", "Songti SC", Georgia, serif;
  letter-spacing: -0.018em;
}

a {
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--academic-link);
}

#about {
  background:
    radial-gradient(circle at 82% 18%, rgba(111, 151, 164, 0.27), transparent 38%),
    linear-gradient(135deg, #102733 0%, #1d3c4c 55%, #17313f 100%) !important;
  color: #eef3f2;
  border-bottom: 1px solid #305061;
}

#about h1,
#about h2,
#about h3,
#about p,
#about li {
  color: #f0f4f3 !important;
}

#about img {
  border: 4px solid rgba(247, 245, 239, 0.94);
  box-shadow: 0 18px 42px rgba(5, 20, 30, 0.32);
}

#about a {
  color: #d8e7e9;
}

#about a:hover {
  color: #fff;
}

#about a[href*="resume.pdf"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.45rem;
  background: #d6b88d;
  color: #193444 !important;
  border: 1px solid #d6b88d;
  padding: 0.7rem 1.15rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(5, 20, 30, 0.2);
  transition: background-color 160ms ease, box-shadow 160ms ease;
}

#about a[href*="resume.pdf"]:hover {
  background: #e3c99f;
  box-shadow: 0 8px 22px rgba(5, 20, 30, 0.27);
}

#about a svg {
  width: 1.2rem;
  height: 1.2rem;
  color: #d8e7e9;
}

#about a[href*="resume.pdf"] svg {
  color: #193444;
}

:is(#research, #publications, #working-papers, #grants, #teaching) {
  scroll-margin-top: 5.5rem;
  padding-block: clamp(3.25rem, 5vw, 5rem);
}

:is(#research, #working-papers, #teaching) {
  background: var(--academic-warm) !important;
}

:is(#publications, #grants) {
  background: var(--academic-paper) !important;
}

:is(#research, #publications, #working-papers, #grants, #teaching) h2 {
  color: var(--academic-ink);
  font-size: clamp(1.8rem, 2.3vw, 2.45rem);
  line-height: 1.2;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

#research h2::before,
#publications h2::before,
#working-papers h2::before,
#grants h2::before,
#teaching h2::before {
  display: inline-block;
  margin-right: 0.8rem;
  color: var(--academic-accent);
  font-family: "Aptos", "Segoe UI", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  vertical-align: middle;
}

#research h2::before { content: "01"; }
#publications h2::before { content: "02"; }
#working-papers h2::before { content: "03"; }
#grants h2::before { content: "04"; }
#teaching h2::before { content: "05"; }

:is(#research, #publications, #working-papers, #grants, #teaching) p,
:is(#research, #publications, #working-papers, #grants, #teaching) li {
  color: var(--academic-ink);
  line-height: 1.72;
}

:is(#publications, #working-papers, #grants, #teaching) ul {
  list-style: none;
  padding-left: 0;
  max-width: 82ch;
}

:is(#publications, #working-papers, #grants, #teaching) li {
  position: relative;
  margin: 0 !important;
  padding: 1.05rem 0 1.05rem 1.35rem;
  border-bottom: 1px solid var(--academic-line);
}

:is(#publications, #working-papers, #grants, #teaching) li:last-child {
  border-bottom: 0;
}

:is(#publications, #working-papers, #grants, #teaching) li::before {
  content: "";
  position: absolute;
  top: 1.72rem;
  left: 0.1rem;
  width: 0.34rem;
  height: 0.34rem;
  border-radius: 50%;
  background: var(--academic-accent);
}

:is(#publications, #working-papers, #grants, #teaching) li strong {
  color: var(--academic-ink);
  font-weight: 650;
}

#grants h3 {
  color: var(--academic-link);
  font-size: 1.28rem;
  font-weight: 600;
  margin-top: 2rem;
}

#research strong {
  color: var(--academic-link);
}

footer {
  border-top: 1px solid var(--academic-line);
  background: var(--academic-warm);
  color: var(--academic-muted);
}

@media (max-width: 640px) {
  :is(#research, #publications, #working-papers, #grants, #teaching) {
    padding-block: 2.8rem;
  }

  :is(#publications, #working-papers, #grants, #teaching) li {
    padding: 0.9rem 0 0.9rem 1rem;
  }

  :is(#publications, #working-papers, #grants, #teaching) li::before {
    top: 1.52rem;
    left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  #about a[href*="resume.pdf"] {
    transition: none;
  }
}
