:root {
  color-scheme: light;
  --paper: #fff;
  --ink: #252c2b;
  --muted: #656b67;
  --link: #376357;
  --line: #dedfd8;
  --gold: #b4a078;
  --serif: Georgia, 'Times New Roman', 'Songti SC', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 36px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.75 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--link); text-decoration: none; text-underline-offset: 5px; text-decoration-thickness: 1px; }
a:hover { text-decoration: underline; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--link); outline-offset: 5px; }
::selection { background: #dee5dc; }
h1, h2, h3, p { margin: 0; }
.site-header, .hero-content { width: min(1000px, calc(100% - 96px)); margin-inline: auto; }
main { width: min(1040px, calc(100% - 96px)); margin: 0 auto; }
footer { width: min(900px, calc(100% - 96px)); margin-inline: auto; }

/* The original photograph gives the page its identity. */
.hero { position: relative; color: #fff; background: #17211f url('/img/banner_sky.jpg') center 46% / cover no-repeat; isolation: isolate; }
.hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(8,17,14,.56), rgba(8,17,14,.22) 48%, rgba(8,17,14,.04) 80%), linear-gradient(0deg, rgba(8,17,14,.48), transparent 60%); }
.site-header { display: flex; align-items: center; justify-content: flex-end; gap: 30px; min-height: 78px; }
nav { display: flex; gap: 30px; }
nav a { color: #eeeee8; font-size: 15px; padding-block: 12px; text-shadow: 0 1px 8px #13201b; }
.hero-content { padding: 112px 0 100px; text-shadow: 0 2px 16px #0005; }
h1 { font: 400 clamp(36px, 3.7vw, 48px)/1.2 var(--serif); letter-spacing: -.5px; }
h1 span { display: block; font: 400 21px/1.5 'Songti SC', 'SimSun', serif; letter-spacing: 4px; margin-top: 12px; color: #e0dfd3; }
.affiliation { color: #e7e9e2; margin-top: 24px; font-size: 16px; line-height: 1.8; }
.contact { display: flex; gap: 24px; margin-top: 24px; }
.contact a { color: #f7f4e9; font-size: 15px; text-decoration: underline; text-decoration-color: #b4a07890; text-underline-offset: 6px; }
.contact a:hover { text-decoration-color: #fff; }

/* Sections use typography and space; fine rules divide individual entries. */
.section { display: grid; grid-template-columns: 150px minmax(0, 1fr); column-gap: 50px; padding: 54px 0; }
.section + .section { border-top: 1px solid #d4dad4; }
.section-body { min-width: 0; }
.section > h2 { margin: 0; padding-top: 1px; font: 400 29px/1.3 var(--serif); letter-spacing: -.5px; color: #233b32; }
.about { padding-block: 52px; }
.biography { font-size: 17px; line-height: 1.9; }
.biography p + p { margin-top: 13px; }
.biography strong { font-weight: 600; }

/* Publication metadata stays together rather than becoming separate badges. */
.publication { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 24px; padding: 27px 0; border-bottom: 1px dotted #dce1db; }
.publication:first-child { padding-top: 0; }
.publication:last-child { border-bottom: 0; padding-bottom: 0; }
.publication h3, .authors { grid-column: 1 / -1; }
h3 { font-size: 17px; font-weight: 600; line-height: 1.55; }
.publication h3 { max-width: 850px; font-size: 19px; line-height: 1.5; font-weight: 600; letter-spacing: -.23px; }
.publication h3 a { color: var(--ink); }
.publication h3 a:hover { color: var(--link); }
.authors { margin-top: 7px; color: var(--muted); font-size: 15px; line-height: 1.8; }
.authors strong { color: var(--ink); font-weight: 500; }
.venue { margin-top: 8px; color: var(--muted); font-size: 14px; line-height: 1.7; align-self: baseline; }
.accepted .venue { color: var(--link); font-weight: 500; }
.paper-links { display: flex; flex-wrap: wrap; gap: 18px; align-self: baseline; margin-top: 8px; font-size: 14px; line-height: 1.7; }
.paper-links a { text-decoration: underline; text-decoration-color: #a7bab0; }
.paper-links a:hover { text-decoration-color: var(--link); }

.education-entry + .education-entry { margin-top: 26px; }
.entry-heading { display: flex; justify-content: space-between; gap: 20px; align-items: baseline; }
.entry-heading > span { color: var(--muted); font-size: 15px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.education-entry p { margin-top: 3px; }
.secondary { color: var(--muted); font-size: 15px; }
.ctf-intro { margin-bottom: 25px; }
.ctf-intro strong { font-weight: 600; }
.competition-group { border-top: 1px dotted #dce1db; }
.competition-group:last-child { border-bottom: 1px dotted #dce1db; }
.competition-group summary { display: flex; justify-content: space-between; align-items: center; gap: 24px; cursor: pointer; font-size: 16px; font-weight: 500; padding: 17px 0; list-style: none; }
.competition-group summary::-webkit-details-marker { display: none; }
.competition-group summary::after { content: ''; width: 8px; height: 8px; border-right: 1px solid var(--muted); border-bottom: 1px solid var(--muted); transform: rotate(45deg); margin-right: 5px; margin-top: -4px; flex-shrink: 0; }
.competition-group[open] summary::after { transform: rotate(225deg); margin-top: 4px; }
.competition-group summary:hover { color: var(--link); }
.awards, .writing { list-style: none; padding: 0; margin: 0; }
.awards { padding-left: 20px; }
.awards li, .writing li { display: flex; justify-content: space-between; gap: 24px; padding: 12px 0; border-bottom: 1px dotted #dce1db; }
.awards li:last-child { border-bottom: 0; }
.awards li > :last-child { flex-shrink: 0; font-weight: 400; color: var(--muted); }
.competition-more { padding: 3px 0 18px 20px; color: var(--muted); }
.writing li:first-child { padding-top: 0; }
.writing a { color: var(--ink); }
.writing time { color: var(--muted); font-size: 15px; font-variant-numeric: tabular-nums; }
.archive-link { display: inline-block; margin-top: 20px; font-size: 15px; }
footer { border-top: 1px solid var(--line); margin-top: 32px; padding: 24px 0 36px; color: var(--muted); font-size: 14px; }
.skip-link { position: fixed; top: -100px; left: 20px; background: var(--paper); padding: 12px; z-index: 2; }
.skip-link:focus { top: 12px; }
@media (min-width: 1600px) { .hero-content { padding-top: 125px; padding-bottom: 110px; } }
@media (max-width: 850px) {
  .site-header, .hero-content, footer { width: calc(100% - 64px); }
  main { width: calc(100% - 64px); }
  .section { grid-template-columns: 120px minmax(0, 1fr); column-gap: 30px; }
  nav { gap: 20px; }
  h1 span { font-size: 21px; }
  .hero-content { padding: 78px 0 65px; }
  .publication { display: block; }
  .entry-heading { flex-wrap: wrap; gap: 4px 20px; }
}
@media (max-width: 760px) {
  .site-header, .hero-content, footer { width: calc(100% - 40px); }
  .site-header { min-height: 0; padding: 22px 0 16px; }
  nav { width: 100%; justify-content: space-between; flex-wrap: wrap; gap: 4px 10px; }
  nav a { font-size: 14px; padding-block: 6px; }
  .hero { background-position: 57% center; }
  .hero-content { padding: 61px 0 55px; }
  h1 { font-size: clamp(32px, 9vw, 38px); }
  h1 span { font-size: 20px; }
  .affiliation { font-size: 16px; margin-top: 22px; }
  main { width: calc(100% - 40px); }
  .section { grid-template-columns: 1fr; gap: 24px; padding: 34px 0; }
  .about { padding-block: 34px; }
  .section > h2 { font-size: 28px; margin-bottom: 0; }
  .biography { font-size: 16px; line-height: 1.85; }
  .publication { display: block; padding-block: 22px; }
  .publication h3 { font-size: 18px; overflow-wrap: anywhere; }
  .paper-links { margin-top: 9px; }
  .entry-heading { display: block; }
  .entry-heading > span { display: block; margin-top: 3px; }
  .education-entry p { margin-top: 5px; }
  .awards { padding-left: 12px; }
  .awards li { flex-direction: column; gap: 2px; }
  .awards li > :last-child { flex-shrink: 1; }
  .writing a { min-width: 0; overflow-wrap: anywhere; }
  .writing time { flex-shrink: 0; }
  .competition-more { padding-left: 12px; }

}
@media (pointer: coarse) {
  nav a, .contact a, .paper-links a, .archive-link { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
  .writing a { display: flex; align-items: center; min-height: 44px; }
  .writing li { align-items: baseline; }
  .competition-group summary { min-height: 48px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
