/* Version 3: burgundy venue labels and blue-gray publication buttons. */
/* Edit these values to change the whole site's appearance. */
/* Palette: red-led headings and labels, navy navigation, gray body text. */
:root {
  --navy: #253b53;
  --accent: #963b46;
  --text: #343d47;
  --muted: #66717e;
  --border: #dfe3e8;
  --surface: #f4f6f8;
  --accent-soft: #f5e9eb;
  --navy-soft: #edf1f5;
  --width: 770px;
}
* { box-sizing: border-box; }
body { margin: 0; background: #f7f8fa; color: var(--text); font: 300 16px/1.5 Roboto, "Helvetica Neue", Arial, sans-serif; }
.container { width: min(var(--width), calc(100% - 40px)); margin-inline: auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.site-header { border-bottom: 1px solid var(--border); background: #fff; }
.site-header nav { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; padding-block: 12px; }
.nav-links { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; }
.site-header .brand { display: inline-flex; align-items: center; gap: 7px; color: var(--accent); font-size: 23px; font-weight: 300; letter-spacing: .02em; line-height: 30px; text-decoration: none; }
.brand svg { flex: none; }
.site-header a { color: var(--navy); }
.site-header a[aria-current] { color: var(--accent); }
main { padding-top: 42px; padding-bottom: 60px; }
h1 { margin: 0 0 14px; font-size: 40px; line-height: 1.2; font-weight: 300; }
strong, b { font-weight: 500; }
h1 strong { font-weight: 700; }
.name-note { margin: -10px 0 18px; color: var(--muted); font-size: 15px; }
.bio a.hl { color: inherit; font-weight: 400; text-decoration: underline; text-decoration-color: #c9d3de; text-underline-offset: 3px; }
.bio a.hl:hover { color: var(--accent); text-decoration-color: currentColor; }
.bio .name-note a.hl { text-decoration: none; }
h2 { font-size: 30px; line-height: 1.25; font-weight: 300; margin: 18px 0 14px; }
h2 a { color: inherit; }
.accent { color: var(--accent); }
p { margin: 0 0 16px; }
.bio { display: flow-root; }
.portrait { float: right; width: 35%; height: auto; margin: 4px 0 18px 26px; border-radius: 3px; box-shadow: 0 4px 18px rgba(37, 59, 83, 0.12); }
.bio p:last-child { text-align: justify; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; vertical-align: top; padding: 7px 4px 13px; }
th { width: 20%; font-weight: 500; }
.paper { display: grid; grid-template-columns: 115px minmax(0, 1fr); gap: 15px; margin: 28px 0; }
.badge { display: inline-block; background: var(--accent-soft); color: var(--accent); border: 1px solid #ead1d6; border-radius: 3px; padding: 3px 10px; font-size: 13px; font-weight: 500; }
h3 { font-size: 16px; font-weight: 500; margin: 0 0 3px; }
.authors, .venue { margin-bottom: 4px; }
.venue { font-style: italic; }
.paper-links { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.button, summary { display: inline-block; border: 1px solid var(--border); border-radius: 3px; padding: 3px 12px; font-size: 12px; font-weight: 400; color: var(--navy); cursor: pointer; }
summary { list-style: none; }
summary::-webkit-details-marker { display: none; }
summary:hover, .button:hover, details[open] summary { color: var(--accent); border-color: var(--accent); }
details[open] { flex-basis: 100%; }
details p, pre { padding: 14px; margin: 8px 0 0; background: var(--surface); border-left: 2px solid var(--accent); }
pre { white-space: pre-wrap; overflow-wrap: anywhere; font: 13px/1.6 monospace; }
.social { display: flex; justify-content: center; flex-wrap: wrap; gap: 22px; padding-top: 22px; }
footer { background: var(--navy); color: #e3e8ee; font-size: 12px; padding: 8px 0; }
/* Footer pinned to the bottom of the window, as in al-folio; body padding keeps it from covering the last lines. */
footer { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)); }
body { padding-bottom: 40px; }
/* Contact links on the right of the footer bar. */
footer .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.footer-links a { display: inline-flex; align-items: center; gap: 5px; color: #e3e8ee; text-decoration: none; }
.footer-links a:hover { color: #fff; text-decoration: underline; }
.footer-links svg { width: 14px; height: 14px; flex: none; }
@media (max-width: 600px) { body { padding-bottom: 64px; } footer .container { justify-content: center; } }

@media (max-width: 600px) {
  .site-header nav { gap: 12px; }
  .nav-links { width: 100%; gap: 9px 17px; }
  main { padding-top: 28px; }
  h1 { font-size: 32px; }
  h2 { font-size: 26px; }
  .portrait {
  box-shadow: none;
}
  .bio p:last-child { text-align: left; }
  .paper { grid-template-columns: 1fr; gap: 8px; }
  th { width: 24%; }
}
@media print { .site-header, footer { display: none; } main { padding-top: 0; } }
/* Shared layouts for the standalone subpages. */
.site-header .brand-name { font-size: 19px; color: var(--navy); letter-spacing: 0; }
.post-header { margin-bottom: 28px; }
h4 { font-size: 20px; font-weight: 400; margin: 28px 0 10px; }
h6 { font-size: 16px; font-weight: 500; margin: 0 0 6px; }
main img { max-width: 100%; height: auto; }
figure { margin: 0 0 18px; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin-bottom: 32px; }
.grid-item .card { height: 100%; border: 1px solid var(--border); border-radius: 3px; overflow: hidden; box-shadow: 0 2px 5px #0001; }
.grid-item > a { display: block; height: 100%; color: inherit; }
.grid-item figure { margin: 0; }
.grid-item img { width: 100%; height: 145px; object-fit: cover; display: block; }
.card-body { padding: 15px; }
.card-body h2 { font-size: 22px; margin: 0 0 8px; }
.card-body p { margin: 0; }
.category { border-bottom: 1px solid var(--border); padding-bottom: 10px; }
.page-people article { display: flow-root; margin-bottom: 32px; }
.page-people .profile { float: right; width: 26%; margin: 0 0 18px 28px; }
.rounded-circle { border-radius: 50%; }
.cv > .card { border: 1px solid var(--border); border-radius: 4px; padding: 22px; margin-bottom: 24px; }
.cv .card-title { font-size: 24px; font-weight: 300; margin-bottom: 20px; }
.cv .list-group { list-style: none; margin: 0; padding: 0; }
.cv .list-group-item { padding: 14px 0; border-top: 1px solid var(--border); }
.cv .row { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 16px; }
.cv td { padding: 3px 6px; }
.cv .items { padding-left: 20px; margin: 5px 0; }
.page-project .row { display: flex; gap: 18px; flex-wrap: wrap; }
.page-project .row > div { flex: 1 1 200px; min-width: 0; }
.caption { color: var(--muted); font-size: 14px; text-align: center; margin-bottom: 25px; }
@media (max-width: 760px) { .site-header .brand-name { font-size: 17px; } .nav-links { gap: 12px; } }
@media (max-width: 600px) {
 .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
 .cv > .card { padding: 15px; }
 .cv .row { grid-template-columns: 1fr; gap: 6px; }
}
@media (max-width: 380px) { .grid { grid-template-columns: 1fr; } }

.brand img { display: block; width: 38px; height: 38px; object-fit: contain; }
/* Brand as a ket |Eddy⟩: name in light text, bracket marks in soft rose. */
.site-header .brand-ket { gap: 1px; color: var(--navy); font-size: 22px; line-height: 38px; }
.site-header .brand-ket span { color: var(--accent); }
.site-header .brand-ket:hover { text-decoration: none; }

/* Projects: linked image at left, short research summary at right. */
.project-list { margin-bottom: 38px; }
.project-row { display: grid; grid-template-columns: 30% minmax(0, 1fr); gap: 26px; align-items: center; padding: 24px 0; border-bottom: 1px solid var(--border); }
.project-row:last-child { border-bottom: 0; }
.project-image { display: flex; align-items: center; justify-content: center; border-radius: 4px; overflow: hidden; }
.project-image img { display: block; width: 100%; height: 145px; object-fit: contain; transition: opacity .15s; }
.project-image:hover img { opacity: .8; }
.project-summary h3 { font-size: 22px; line-height: 1.3; font-weight: 400; margin: 0 0 10px; }
.project-summary h3 a { color: var(--accent); }
.project-summary h3 a:hover { color: var(--navy); }
.project-summary p { margin: 0; line-height: 1.6; }
@media (max-width: 600px) {
 .project-row { gap: 16px; align-items: start; padding: 22px 0; }
 .project-image img { height: auto; max-height: 125px; }
 .project-summary h3 { font-size: 20px; }
}

/* Color hierarchy shared by all pages. */
h1, h2, h3, h4, h5, h6 { color: var(--navy); }
h2, h4, .cv .card-title { color: var(--accent); }
h2.accent { color: var(--accent); }
.authors, .venue, .post-header > p { color: var(--muted); }
th { color: var(--navy); }
.social a { color: var(--accent); }
.social a:hover { color: var(--accent); }
.site-header .nav-links a:hover { color: var(--accent); }
.button:hover, summary:hover, details[open] summary { background: var(--accent-soft); }

/* Publication controls: cool blue complements the warm venue labels. */
.paper h3 { color: var(--navy); }
.paper .button, .paper summary { color: var(--navy); background: var(--navy-soft); border-color: #d6dee7; }
.paper .button:hover, .paper summary:hover, .paper details[open] summary { color: var(--accent); background: var(--accent-soft); border-color: #dfbac2; }

.bio p {
  text-align: justify;
  text-align-last: left;
  hyphens: none;
}

.bio p:last-child {
  text-align: left;
}



.eddy-logo {
  width:48px;
  height: 48px;
  object-fit: contain;
}

/* 页面背景：白色 */
body {
  background-color: #fff;
}

/* 顶部：白色，底部一条浅灰分隔线 */
header {
  background-color: #fff;
  border-bottom: 1px solid var(--border);
}

/* 照片：柔和的蓝灰阴影 */
img.portrait,
.portrait img {
  box-shadow: 0 5px 20px rgba(37, 59, 83, 0.20) !important;
}

.social {
  background: transparent;
  border: none;
  border-top: 1px solid #dce3eb;
  border-bottom: 1px solid #dce3eb;
  border-radius: 0;
  box-shadow: none;

  padding: 15px 0;
  margin: 26px 0 32px;
  gap: 14px 28px;
}

.social a {
  color: #52667c;
  font-weight: 400;
  font-size: 0.95em;
}

.social svg {
  width: 19px;
  height: 19px;
}

.social a:hover {
  color: #963b46;
}

/* 两个板块统一的标题 */
.home-section-title {
  color: #963b46;
  font-size: 1.75rem;
  font-weight: 400;
  line-height: 1.3;
  margin: 36px 0 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid #dce3eb;
}

/* 如果之前加过动态卡片，取消它的底色和装饰 */
.recent-activities {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  margin: 0;
}

.recent-activities > .home-section-title {
  margin-top: 36px;
  margin-bottom: 20px;
}

span.badge.venue-badge {
  color: #ffffff !important;
  background: #b3263e !important;
  border: 1px solid #b3263e !important;
  font-weight: 600;
}

.bio {
  display: flow-root;
}

.profile-panel {
  float: right;
  width: 35%;
  margin: 0 0 24px 28px;
}

.bio .profile-panel > img.portrait {
  display: block;
  float: none;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0;
}

.profile-panel .social {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 10px;
}

.profile-panel .social a {
  white-space: nowrap;
  font-size: 12px;
  gap: 4px;
}

.profile-panel .social svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.profile-panel .social {
  border-top: none !important;
  border-bottom: none !important;
}

.profile-panel .social {
  margin-top: 8px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.bio .research-statement {
  clear: both;
}

.home-section-title {
  border-bottom: none !important;
  padding-bottom: 0;
}
/* Home hero: name on top, photo floated right beside the first paragraph,
   second paragraph runs full width underneath. */
.bio.hero .profile-panel { float: right; width: 30%; margin: 4px 0 8px 26px; }
.bio.hero .profile-panel .social { margin-bottom: 0; flex-wrap: wrap; gap: 2px 10px; }
.bio.hero + * { clear: both; }
h1 + .bio.hero { margin-top: 0; }
.bio.hero .name-note { margin: 0 0 16px; font-size: 16px; }
.bio.hero p { text-align: justify; text-align-last: left; hyphens: none; line-height: 1.5; }
/* Keyword highlights: navy semibold for the key points, navy italics for ideas and tool names. */
.bio.hero .kw { color: var(--navy); font-weight: 500; }
.bio.hero em { color: var(--navy); font-style: italic; }
.bio.hero .kw-i, .bio.hero a.kw-i { color: var(--navy); font-weight: 500; }
.bio.hero a.kw:hover { color: var(--accent); }
/* Square portrait, as on the original al-folio homepage. */
.bio.hero .profile-panel > img.portrait { aspect-ratio: 1 / 1; object-fit: cover; object-position: center 30%; }
.bio.hero p.bio-wide { clear: both; padding-top: 6px; }
.bio.hero .name-note { text-align: left; }
@media (max-width: 600px) {
  .bio.hero { display: flex; flex-direction: column; }
  .bio.hero .name-note { order: -1; }
  .bio.hero .profile-panel { float: none; width: min(240px, 100%); margin: 0 auto 20px; }
  .bio.hero p.bio-wide { text-align: left; }
}

/* Contact links under the photo: white pills, wine-red icons, navy labels. */
.bio.hero .profile-panel .social { gap: 3px; margin-top: 12px !important; flex-wrap: nowrap; }
.bio.hero .profile-panel .social a {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 6px; border-radius: 999px;
  font-size: 10.5px; font-weight: 500; text-decoration: none; white-space: nowrap;
  border: 1px solid transparent;
}
.bio.hero .profile-panel .social a { color: var(--navy); background: #eef3f8; border-color: #c9d6e4; }
.bio.hero .profile-panel .social a svg { color: #6b8fb5; }
.bio.hero .profile-panel .social a:hover { border-color: var(--navy); background: #e2eaf3; color: var(--navy); text-decoration: none; }
.bio.hero .profile-panel .social a:hover svg { color: var(--navy); }
@media (max-width: 600px) {
  .bio.hero .profile-panel { width: min(280px, 100%); }
  .bio.hero .profile-panel .social { flex-wrap: wrap; }
}

/* Phones: lay the six nav links out as a tidy 3 x 2 grid instead of leaving one orphan. */
@media (max-width: 600px) {
  .site-header .nav-links { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 6px 24px; }
}
@media (max-width: 600px) {
  /* Justified text leaves wide gaps in a narrow column. */
  .bio.hero p, .bio.hero p.bio-wide { text-align: left; }
}

/* Hiring note under the bio: a quiet callout with an accent rule. */
.bio.hero p.hiring {
  clear: both;
  margin: 6px 0 0;
  padding: 12px 16px;
  background: #f6f7f9;
  border-left: 3px solid var(--accent);
  border-radius: 0 4px 4px 0;
  text-align: left;
}
.bio.hero p.hiring strong { color: var(--accent); font-weight: 500; }
