/* Dimensions, colors, and font stack follow qiayuanl.github.io; no web fonts are downloaded. */
:root {
  color-scheme: light;
  --ink: #150c21;
  --muted: #747e88;
  --inactive: #a0a8b0;
  --link: rgb(20, 110, 190);
}
* { box-sizing: border-box; }
body { margin: 0; background: #fff; color: var(--ink); font: 16px/1.5 'Asap', Roboto, sans-serif; }
a { color: var(--link); text-decoration: none; }
a:hover { border-bottom: 1px solid var(--link); }
.thumbnail:hover, .previews a:hover { border-bottom: 0; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--link); outline-offset: 5px; border-radius: 2px; }
[hidden] { display: none !important; }
#main { max-width: 864px; margin: 0 auto; padding: 12px 0 28px; }
.intro { display: flex; align-items: center; gap: 32px; }
.intro-text { flex: 1; min-width: 0; }
h1 { margin: 0; font-size: 38.4px; line-height: 3; font-weight: 500; }
h1 span { display: inline-block; font-size: 23px; white-space: nowrap; }
p { margin: 0 0 20px; }
/* Blank line between intro paragraphs, like the template's <br><br>. */
.intro-text p { margin-bottom: 24px; }
.portrait { display: block; flex: 0 0 30%; width: 30%; height: auto; margin-right: 40px; border-radius: 5px; }
.contact-links { display: flex; flex-wrap: wrap; gap: 20px; margin: 0; }
/* Flex items are blocks, so reserve the hover border to avoid a 1px jump. */
.contact-links a { border-bottom: 1px solid transparent; }
.contact-links a:hover { border-bottom-color: var(--link); }
.section-tabs { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 12px; }
.section-tabs button { padding: 0; border: 0; background: transparent; color: var(--inactive); font: inherit; font-size: 25.6px; line-height: 2.4; cursor: pointer; }
.section-tabs button[aria-selected="true"], .section-tabs button:hover { color: var(--ink); }
.panel { padding-top: 12px; }
.panel > section { margin-bottom: 30px; }
h2 { margin: 0 0 12px; font-size: 18px; line-height: 1.5; font-weight: 500; }
h3 { margin: 0; font-size: 16px; font-weight: 500; }
h3 a { color: var(--ink); }
h3 a:hover { color: var(--link); }
.muted { color: var(--muted); }
.entry { display: grid; grid-template-columns: 25% 1fr; gap: 2%; align-items: start; }
.entry p { margin: 4px 0 0; }
.thumbnail img, .thumbnail video { display: block; width: 100%; height: auto; border-radius: 5px; }
.education .thumbnail { display: flex; justify-content: center; padding: 4px; }
.education .thumbnail img { width: 100px; max-width: 100%; }
.note-links { display: flex; flex-wrap: wrap; gap: 10px 24px; }
/* Ready for real project images/videos when publication entries are added. */
.previews { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 24px; }
.previews img, .previews video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 5px; }
footer { margin-top: 48px; color: var(--muted); font-size: 13px; line-height: 1.8; }
@media (max-width: 920px) { #main { margin: 0 24px; } }
@media (max-width: 600px) {
  #main { margin: 0 20px; padding-top: 20px; }
  .intro { flex-direction: column-reverse; align-items: flex-start; gap: 0; }
  .portrait { flex: none; width: 150px; }
  h1 { margin: 22px 0 20px; font-size: 32px; line-height: 1.5; }
  h1 span { font-size: 21px; }
  .section-tabs { gap: 22px; }
  .section-tabs button { font-size: 22px; }
  .entry { grid-template-columns: 90px 1fr; gap: 16px; }
  .previews { grid-template-columns: 1fr; }
}
