/* Later chapters keep their own rhythm: working notes, an index, a ledger and a letter. */
#now, .archive-section, #recognition, #about, #extras, #contact { position: relative; }
#now .section-heading, .archive-section .section-heading, #recognition .section-heading, #extras .section-heading { margin-bottom: 40px; }
#now .eyebrow, .archive-section .eyebrow, #recognition .eyebrow, #about > .eyebrow, #extras .section-heading .eyebrow { color: var(--blue); }
#now .section-heading > p, .archive-section .section-heading > p, #extras .section-heading > p { border-left: 1px solid #bec6df; padding-left: 21px; }

/* Current work is a set of open working pages, rather than another project grid. */
#now { background: #eceffa; border-top: 0; padding-top: 100px; padding-bottom: 64px; }
#now .now-grid { gap: 0; border-top: 0; align-items: stretch; }
#now .now-grid article { --chapter-accent: var(--blue); position: relative; display: flex; flex-direction: column; min-width: 0; padding: 35px 30px 27px; border-left: 1px solid #bdc5df; border-top: 4px solid var(--chapter-accent); background: #f8f9fd; }
#now .now-grid article:first-child { --chapter-accent: #ef956f; padding-left: 30px; border-left: 0; }
#now .now-grid article:nth-child(2) { --chapter-accent: var(--blue); background: #f0f3fd; }
#now .now-grid article:last-child { --chapter-accent: #bbc652; padding-right: 30px; background: #f7f8e9; }
#now .now-number { width: fit-content; margin-bottom: 40px; color: #5d6582; font-size: .75rem; border-bottom: 1px solid currentColor; padding-bottom: 4px; }
#now .now-grid h3 { font-size: clamp(2.1rem, 3.3vw, 3.25rem); letter-spacing: -.6px; margin-bottom: 17px; }
#now .now-grid .now-role { min-height: 50px; color: #36416b; font: .78rem/1.65 var(--mono); margin: 0 0 18px; }
#now .now-grid p:not(.now-role) { flex: 1; margin: 0 0 28px; line-height: 1.8; }
#now .now-project-open { width: 100%; margin-top: auto; border-color: #bdc5df; padding-top: 17px; }
#now .now-project-open span { display: grid; place-items: center; width: 30px; height: 30px; margin-top: -4px; border-radius: 50%; border: 1px solid #bdc5df; font-size: 1.5rem; }
#now .now-note { text-align: right; margin-top: 22px; }
#now .sese-course-link { width: fit-content; max-width: 100%; min-height: 44px; display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--blue); font-size: .88rem; }
#now .sese-course-note { display: block; margin: 0 0 22px; color: var(--muted); font-size: .76rem; line-height: 1.6; }

/* Archive: a contents page with the original objects tucked inside. */
.archive-section { border-top: 0; }
.archive-section .archive-list { border-top: 1px solid #b8c1dd; }
.archive-section .archive-list details { border-top: 0; border-bottom: 1px solid #b8c1dd; }
.archive-section .archive-list summary { grid-template-columns: 48px minmax(0,1fr) auto; gap: 28px; padding: 28px 20px; font-size: clamp(1.5rem, 2.25vw, 2.15rem); }
.archive-section .archive-index { display: grid; place-items: center; width: 43px; height: 49px; font: 1.4rem/1 var(--serif); border: 1px solid #b8c1dd; background: white; }
.archive-section .archive-kind { padding: 7px 37px 7px 13px; border: 1px solid #cbd2e4; border-radius: 3px; font-size: .65rem; line-height: 1.6; white-space: nowrap; }
.archive-section .archive-kind::after { right: 11px; top: 50%; transform: translateY(-50%); line-height: 1; }
.archive-section details[open] { background: white; box-shadow: 5px 6px 0 #e4e8f4; }
.archive-section details[open] summary { color: var(--blue); }
.archive-section details[open] .archive-index { background: var(--lime); border-color: #c4cb6d; color: var(--ink); }
.archive-section .archive-detail { max-width: 960px; padding: 0 35px 36px 96px; line-height: 1.8; }
.archive-section .archive-photo { padding: 9px 9px 0; border: 1px solid var(--line); background: var(--paper); }
.archive-section .archive-photo img { border-radius: 1px; }
.archive-section .archive-photo figcaption { padding: 4px 6px 12px; }
.archive-section .book-gallery { gap: 22px; }
.archive-section .book-gallery .story-photo a { padding: 9px; border-radius: 1px; background: #eef1fa; }
.archive-section .book-gallery .story-photo img { max-height: 420px; }
.archive-section .research-entry h4 { font-size: 1.6rem; line-height: 1.35; }
.archive-section .book-audio { border-radius: 2px; box-shadow: 4px 4px 0 #dce2f3; }
.archive-section .story-resource { min-height: 44px; }

/* Recognition reads like a compact printed ledger. */
#recognition { background: #f0f2fb; border-top: 0; }
#recognition .section-heading { align-items: start; }
#recognition .honors-list { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0; border-top: 1px solid #bac3de; }
#recognition .honors-list > div { min-width: 0; padding: 28px 34px 28px 0; border-top: 0; border-bottom: 1px solid #c5cde3; }
#recognition .honors-list > div:nth-child(even) { border-left: 1px solid #c5cde3; padding-left: 34px; padding-right: 0; }
#recognition .honor-field { color: #596483; font-size: .65rem; letter-spacing: 1.2px; margin-bottom: 15px; }
#recognition .honors-list h3 { font-size: clamp(1.6rem, 2.4vw, 2.25rem); line-height: 1.15; max-width: 460px; margin-bottom: 14px; }
#recognition .honors-list > div:nth-child(-n+2) h3 { color: var(--blue); font-size: clamp(2rem, 3.4vw, 3.2rem); }
#recognition .honors-list p { font-size: .8rem; line-height: 1.7; }
#recognition .honors-list a { min-height: 38px; padding-top: 6px; }

/* A portrait with an actual paper border gives the biography some breathing room. */
#about { padding-top: 102px; padding-bottom: 104px; border-top: 0; }
#about .about-grid { grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr); gap: clamp(40px,7vw,100px); align-items: center; }
#about .about-person { position: relative; min-width: 0; }
#about .about-person h2 { position: relative; z-index: 1; }
#about .about-person img { max-width: 400px; width: calc(100% - 17px); margin: 36px 0 0 8px; padding: 11px 11px 29px; border: 1px solid #c0c8df; border-radius: 1px; background: white; aspect-ratio: 4 / 5; box-shadow: 8px 10px 0 #e2e7f4, 0 12px 35px #1b2c5512; transform: rotate(-2deg); }
#about .about-grid > div:last-child { min-width: 0; padding-top: 25px; }
#about .about-grid .about-lead { font-size: clamp(1.1rem,1.8vw,1.35rem); line-height: 1.8; margin-bottom: 25px; }
#about .about-grid p { line-height: 1.85; }
#about .skill-notes { margin-top: 30px; padding-top: 24px; border-color: #bec7df; gap: 26px; }
#about .skill-notes span { font-size: .65rem; color: var(--blue); letter-spacing: .75px; }
#about .skill-notes p { font-size: .8rem; }
#about .about-links { border-top: 1px solid #bec7df; padding-top: 17px; gap: 17px 25px; }
#about .about-links a { display: inline-flex; align-items: center; min-height: 44px; font-size: .83rem; color: var(--blue); }

/* The detour feels like a game table beside a page of notes. */
#extras { border-top: 1px solid #c5cde3; }
#extras .extras-grid { gap: 28px; align-items: stretch; }
#extras .game-card, #extras .ask-card { min-width: 0; border-radius: 2px; padding: 35px 32px; }
#extras .game-card { border-color: #b9c3de; background: #e9eefb; box-shadow: 5px 5px 0 #d6def2; }
#extras .ask-card { border-color: #bdc6df; background: white; border-top: 4px solid var(--blue); }
#extras .game-card > .eyebrow, #extras .ask-card > .eyebrow { color: var(--blue); font-size: .65rem; letter-spacing: .9px; }
#extras .extras-grid h3 { font-size: clamp(2.2rem,3vw,2.85rem); line-height: 1.1; margin-bottom: 21px; }
#extras .extras-grid > article > p:not(.eyebrow) { font-size: .9rem; line-height: 1.8; }
#extras .game-numbers { gap: 13px; margin: 32px 0 29px; }
#extras .game-numbers span { min-width: 0; padding: 18px 2px; font-size: 3.5rem; border-radius: 2px; box-shadow: 2px 5px 0 #abb74f; }
#extras .game-numbers span:nth-child(even) { background: #f4f7b5; }
#extras input { border-radius: 2px; border-color: #adb9d9; min-height: 48px; }
#extras .button { border-radius: 2px; min-height: 48px; }
#extras .game-result { font-size: .9rem; min-height: 46px; }
#extras .game-tools { gap: 4px 22px; }
#extras .suggested-questions { gap: 8px; margin-top: 26px; }
#extras .suggested-questions button { background: #f2f4fb; border-radius: 3px; text-align: left; font-size: .8rem; padding: 10px 14px; }
#extras .ask-answer { background: #eef1fb; border-radius: 1px; font-size: .95rem; }
#extras .field-photo { margin-top: 45px; grid-template-columns: minmax(0,1.3fr) minmax(0,1fr); border-radius: 2px; border: 1px solid #202b4a; background: #202b4a; }
#extras .field-photo img { max-height: 470px; min-height: 350px; }
#extras .field-photo figcaption { padding: 42px; }
#extras .field-photo .eyebrow { color: #cdd4ef; font-size: .65rem; letter-spacing: 1px; }
#extras .field-photo h3 { font-size: clamp(2.4rem,3.5vw,3.5rem); line-height: 1.05; }
#extras .field-photo h3 em { color: var(--lime); }
#extras .field-photo p:not(.eyebrow) { font-size: .9rem; }
#extras .field-photo .text-button { min-height: 44px; }

/* A bright closing spread, with a quiet paper form. */
#contact { background: var(--blue); border-color: var(--blue); color: white; padding-top: 84px; padding-bottom: 48px; }
#contact > .eyebrow { color: #dce2ff; letter-spacing: 1.25px; margin-bottom: 24px; }
#contact h2 { font-size: clamp(3.1rem,6.25vw,6rem); line-height: 1.04; letter-spacing: -1.3px; max-width: 1110px; }
#contact h2 em { color: var(--lime); }
#contact .message-layout { grid-template-columns: minmax(0,.7fr) minmax(0,1.3fr); gap: 55px; margin-top: 56px; align-items: start; }
#contact .message-aside { color: #e1e6ff; padding-top: 15px; max-width: 320px; }
#contact .message-aside p:first-child { color: white; font: 1.55rem/1.4 var(--serif); margin-top: 0; }
#contact .message-aside p { font-size: .9rem; line-height: 1.85; }
#contact .message-aside a { color: var(--lime); }
#contact .message-form { background: #f7f8fd; color: var(--ink); padding: 31px; border-radius: 2px; border: 1px solid #d4dcff; box-shadow: 8px 9px 0 #1636c8; min-width: 0; }
#contact .message-form label { font-size: .78rem; }
#contact .message-form input, #contact .message-form textarea { background: white; border-color: #b8c2dc; border-radius: 2px; font-size: .95rem; }
#contact .message-form label input, #contact .message-form label textarea { margin-top: 7px; margin-bottom: 23px; }
#contact .message-form textarea { min-height: 160px; }
#contact .message-form .form-row { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
#contact .message-form .button { border-radius: 2px; min-height: 47px; }
#contact .message-form .form-note { font-size: .75rem; }
#contact .message-status:empty { margin: 0; }
#contact .contact-bottom { margin-top: 43px; padding-top: 24px; border-top: 1px solid #ffffff40; }
#contact .email-link { color: white; font-size: clamp(1.05rem,2.2vw,1.8rem); text-underline-offset: 7px; }
#contact .contact-bottom > a:not(.email-link) { font-size: .85rem; color: var(--lime); min-height: 44px; display: inline-flex; align-items: center; text-underline-offset: 6px; }
#contact .wechat-contact { flex-basis: 100%; padding-top: 12px; min-width: 0; }
#contact .wechat-contact-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; }
#contact .wechat-label { font-size: .85rem; color: var(--lime); }
#contact #wechat-id { font: .95rem/1.5 var(--mono); color: white; user-select: text; }
#contact #wechat-copy { border: 1px solid #ffffff66; border-radius: 24px; background: transparent; color: white; padding: 8px 16px; min-height: 44px; font: .8rem var(--sans); cursor: pointer; }
#contact #wechat-copy:hover { background: #ffffff12; border-color: var(--lime); }
#contact #wechat-copy:focus-visible { outline: 2px solid var(--lime); outline-offset: 4px; }
#contact .wechat-help, #contact #wechat-status { font-size: .78rem; color: #d6dcff; margin: 8px 0 0; }
#contact #wechat-status:empty { display: none; }
#contact > a:focus-visible, #contact .contact-bottom a:focus-visible, #contact .message-aside a:focus-visible { outline-color: var(--lime); }
.site-footer { padding-top: 30px; padding-bottom: 30px; border-top: 0; font-size: .68rem; letter-spacing: .25px; align-items: center; }
.site-footer > span:first-child { color: var(--blue); }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; border-bottom: 1px solid #bdc7df; }

html[lang="zh-CN"] #contact h2 { font-size: clamp(2.25rem,4.8vw,4.6rem); line-height: 1.35; letter-spacing: 0; }
html[lang="zh-CN"] #recognition .honors-list h3, html[lang="zh-CN"] #now .now-grid h3 { line-height: 1.45; }

@media (hover:hover) and (prefers-reduced-motion:no-preference) {
  .motion-enabled #now .now-project-open span { transition: background .2s, transform .25s; }
  .motion-enabled #now .now-project-open:hover span { transform: rotate(90deg); background: var(--lime); }
  .motion-enabled .archive-section .archive-list summary { transition: color .2s, background .2s; }
  .motion-enabled .archive-section .archive-list summary:hover { background: #edf1fb; color: var(--blue); }
  .motion-enabled #about .about-person img { transition: transform .4s ease; }
  .motion-enabled #about .about-person:hover img { transform: rotate(0deg); }
}
@media (max-width:1000px) {
  #now .now-grid article, #now .now-grid article:first-child, #now .now-grid article:last-child { padding-left: 23px; padding-right: 23px; }
  #contact .message-layout { gap: 32px; }
  #contact .message-form { padding: 26px; }
  #extras .field-photo figcaption { padding: 30px; }
}
@media (max-width:900px) {
  #extras .extras-grid { grid-template-columns: 1fr; }
  #contact .message-layout { grid-template-columns: 1fr; gap: 20px; }
  #contact .message-aside { max-width: 600px; padding: 0; }
}
@media (max-width:760px) {
  #now { padding-top: 64px; padding-bottom: 48px; }
  #now .section-heading, .archive-section .section-heading, #recognition .section-heading, #extras .section-heading { margin-bottom: 30px; }
  #now .section-heading > p, .archive-section .section-heading > p, #extras .section-heading > p { padding-left: 14px; font-size: .85rem; }
  #now .now-grid { grid-template-columns: 1fr; gap: 16px; }
  #now .now-grid article, #now .now-grid article:first-child, #now .now-grid article:last-child { padding: 27px 23px 24px; border-left: 0; border-bottom: 1px solid #bdc5df; }
  #now .now-number { margin-bottom: 22px; }
  #now .now-grid h3 { font-size: 2.5rem; }
  #now .now-grid .now-role { min-height: 0; margin-bottom: 18px; }
  #now .now-grid p:not(.now-role) { margin-bottom: 25px; }
  #now .now-note { font-size: .68rem; }
  .archive-section .archive-list summary { grid-template-columns: 33px minmax(0,1fr); gap: 9px 15px; padding: 25px 5px; font-size: 1.55rem; }
  .archive-section .archive-index { width: 32px; height: 39px; font-size: 1.25rem; grid-row: 1 / 3; align-self: start; }
  .archive-section .archive-kind { grid-column: 2; width: fit-content; white-space: normal; font-size: .6rem; margin: 0; }
  .archive-section .archive-detail { padding: 0 17px 27px; font-size: .9rem; }
  .archive-section .book-gallery { gap: 14px; }
  .archive-section .book-gallery .story-photo a { padding: 5px; }
  .archive-section .book-gallery .story-photo figcaption { font-size: .7rem; }
  .archive-section .research-entry h4 { font-size: 1.4rem; }
  #recognition .honors-list { grid-template-columns: 1fr; }
  #recognition .honors-list > div, #recognition .honors-list > div:nth-child(even) { padding: 25px 0; border-left: 0; }
  #recognition .honors-list h3 { font-size: 1.8rem; }
  #recognition .honors-list > div:nth-child(-n+2) h3 { font-size: 2.4rem; }
  #about { padding-top: 64px; padding-bottom: 64px; }
  #about .about-grid { grid-template-columns: 1fr; gap: 36px; }
  #about .about-person img { width: calc(100% - 22px); max-width: 390px; margin: 29px auto 0; }
  #about .about-grid > div:last-child { padding-top: 0; }
  #about .skill-notes { grid-template-columns: 1fr 1fr; gap: 18px; }
  #about .about-links { gap: 6px 22px; }
  #extras .game-card, #extras .ask-card { padding: 27px 21px; }
  #extras .game-numbers { gap: 9px; margin: 26px 0; }
  #extras .game-numbers span { padding: 15px 2px; font-size: 2.8rem; }
  #extras .field-photo { grid-template-columns: 1fr; margin-top: 32px; }
  #extras .field-photo img { height: auto; min-height: 0; max-height: 340px; aspect-ratio: 4 / 3; }
  #extras .field-photo figcaption { padding: 28px 24px; }
  #contact { padding-top: 59px; padding-bottom: 35px; }
  #contact h2 { font-size: clamp(2.6rem,10vw,4rem); letter-spacing: -.5px; }
  html[lang="zh-CN"] #contact h2 { font-size: clamp(2rem,8vw,3rem); }
  #contact .message-layout { margin-top: 32px; }
  #contact .message-aside p:first-child { font-size: 1.4rem; }
  #contact .message-form { padding: 23px 20px; box-shadow: 5px 6px 0 #1636c8; }
  #contact .message-form .form-row { grid-template-columns: 1fr; gap: 0; }
  #contact .message-form .form-submit { flex-direction: column; align-items: start; gap: 3px; }
  #contact .contact-bottom { margin-top: 31px; gap: 10px; }
  #contact .email-link { font-size: 1.1rem; }
  .site-footer { gap: 7px 24px; padding-top: 24px; padding-bottom: 24px; font-size: .65rem; }
  .site-footer > span:first-child { width: 100%; }
  .site-footer a { margin-left: auto; }
}
@media (max-width:390px) {
  #about .skill-notes { grid-template-columns: 1fr; gap: 0; }
  #extras .extras-grid h3 { font-size: 2.1rem; }
}
@media print {
  #now, #recognition, #contact { background: white; color: var(--ink); }
  #now .now-grid article { background: white; }
  #about .about-person img { transform: none; box-shadow: none; }
  #now, #about { padding: 25px; }
  .archive-section details[open], #extras .game-card { box-shadow: none; }
}
