:root {
  --primary: #205488;
  --primary-hover: #001f3f;
  --accent: #001f3f;
  --bg-page: #f0f2f5;
  --bg-paper: #fff;
  --bg-bio: #f8fafc;
  --text-main: #333;
  --text-sec: #666;
  --radius: 12px;
  --shadow-card: 0 4px 12px rgba(0, 0, 0, .05);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  padding: 40px 0;
  color: var(--text-main);
  background: var(--bg-page);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.6;
}
a { color: var(--primary); text-decoration: none; border-bottom: 1px dotted var(--primary); transition: all .2s ease; }
a:hover { color: var(--primary-hover); border-bottom-style: solid; background: rgba(32, 84, 136, .05); }
.container {
  /* Falcary uses a 900px content box plus 60px padding on each side. */
  max-width: 1022px;
  margin: 0 auto;
  padding: 50px 60px;
  background: var(--bg-paper);
  border: 1px solid #e1e4e8;
  border-radius: 8px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, .08);
  animation: fadeIn .8s ease-out;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
header { margin-bottom: 50px; }
.header-top { display: flex; justify-content: space-between; align-items: center; gap: 40px; margin-bottom: 30px; }
.header-info { flex: 1; }
.name-title { margin-bottom: 10px; color: var(--accent); font-size: 2.8rem; font-weight: normal; line-height: 1.1; letter-spacing: -.5px; }
.role-info { margin-bottom: 25px; color: var(--text-sec); font-size: 1.15rem; font-style: italic; line-height: 1.5; }
.divider { margin: 0 8px; color: #ddd; }
.avatar { display: block; width: 280px; height: auto; border: 4px solid #fff; border-radius: 12px; outline: 1px solid #e5e7eb; box-shadow: var(--shadow-card); transform: rotate(2deg); transition: all .4s cubic-bezier(.34, 1.56, .64, 1); }
.avatar:hover { z-index: 10; transform: rotate(0) scale(1.02); box-shadow: 0 10px 25px rgba(0, 0, 0, .15); }
.social-links { display: flex; flex-wrap: wrap; gap: 12px; }
.social-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; color: var(--text-main); background: #fff; border: 1px solid #dae1e7 !important; border-radius: 50px; font: 600 .9rem Inter, sans-serif; text-decoration: none !important; transition: all .2s cubic-bezier(.4, 0, .2, 1); }
.social-btn:hover { color: var(--primary); border-color: var(--primary) !important; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(32, 84, 136, .15); }
.social-links .social-btn img { display: block; width: 16px !important; height: 16px !important; max-width: 16px !important; max-height: 16px !important; flex: 0 0 16px; object-fit: contain; opacity: .9; }
.citation-count { display: inline-flex; align-items: center; gap: 1px; margin-left: 4px; color: var(--primary); font-weight: 600; }
.bio-text-box { width: 100%; margin-top: 10px; padding: 28px; background: var(--bg-bio); border: 1px solid #eef2f6; border-radius: var(--radius); font-size: 1.05rem; text-align: justify; transition: all .3s; }
.bio-text-box:hover { border-color: #dbeafe; box-shadow: 0 4px 12px rgba(0, 0, 0, .03); }
h2 { margin: 50px 0 25px; padding-bottom: 10px; color: var(--accent); border-bottom: 2px solid #f1f5f9; font-size: 1.5rem; font-weight: normal; }
.news-list { margin: 0; padding: 0; list-style: none; }
.news-item { display: flex; align-items: baseline; gap: 15px; margin-bottom: 12px; font-size: 1rem; transition: transform .2s; }
.news-item:hover { transform: translateX(4px); }
.news-date { min-width: 96px; padding: 2px 8px; color: #475569; background: #f1f5f9; border-radius: 4px; font: .85rem Inter, monospace; text-align: center; white-space: nowrap; }
.news-note { display: block; margin-top: 4px; color: var(--text-sec); font-size: .92rem; font-style: italic; }
.project-group { margin: 20px 0 24px; overflow: hidden; background: #fcfdff; border: 1px solid #e5e7eb; border-radius: 12px; transition: border-color .25s, box-shadow .25s, background .25s; }
.project-group:hover, .project-group.is-pinned { background: #fff; border-color: #cbd5e1; box-shadow: 0 10px 24px rgba(32, 84, 136, .08); }
.project-group summary { position: relative; display: block; padding: 14px 18px 16px; color: var(--accent); background: linear-gradient(180deg, #fff 0%, #f8fbff 100%); border-bottom: 1px solid transparent; font: 700 1.02rem Inter, sans-serif; cursor: pointer; list-style: none; user-select: none; }
.project-group summary::-webkit-details-marker { display: none; }
.project-group[open] summary { border-bottom-color: #e5e7eb; }
.project-group summary::after { content: "\25BE"; position: absolute; top: 19px; right: 18px; color: #64748b; font-size: .85rem; transition: transform .22s; }
.project-group[open] summary::after { transform: rotate(180deg); }
.summary-title { display: block; padding-right: 28px; letter-spacing: .1px; }
.project-state { display: inline-flex; margin-left: 8px; padding: 2px 7px; color: #64748b; background: #fff; border: 1px solid #dbe3ef; border-radius: 999px; font: 700 .68rem Inter, sans-serif; letter-spacing: .04em; text-transform: uppercase; vertical-align: middle; }
.project-group:not([open]) .project-state::before { content: "Show"; }
.project-group[open]:not(.is-pinned) .project-state::before { content: "Preview"; }
.project-group.is-pinned .project-state { color: #fff; background: var(--primary); border-color: var(--primary); }
.project-group.is-pinned .project-state::before { content: "Pinned"; }
.project-preview-inline { display: grid; grid-template-columns: 1fr; gap: 7px; margin-top: 10px; padding-right: 28px; }
.preview-item { display: block; overflow: hidden; padding: 6px 10px; color: #475569; background: #f3f7fc; border: 1px solid #e2e8f0; border-radius: 999px; font-size: .83rem; font-weight: 550; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.project-group[open] .project-preview-inline { display: none; }
.project-body { padding: 8px 16px 4px; animation: projectReveal .22s ease; }
@keyframes projectReveal { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
.paper-card { display: flex; align-items: stretch; gap: 24px; margin-bottom: 24px; padding: 24px; background: #fff; border: 1px solid #eaecf0; border-radius: var(--radius); transition: all .38s ease; }
.paper-card:hover { background: #fbfdff; border-color: rgba(32, 84, 136, .32); transform: translateY(-1px); box-shadow: 0 10px 22px -12px rgba(32, 84, 136, .24), 0 0 0 1px rgba(32, 84, 136, .05); }
.paper-content { position: relative; z-index: 2; display: flex; flex: 1; flex-direction: column; justify-content: space-between; min-width: 0; }
.paper-title { display: block; margin: 0 0 8px; color: #111; border-bottom: none !important; font-size: 1.15rem; font-weight: bold; }
.paper-card:hover .paper-title { color: var(--primary); }
.paper-authors { margin-bottom: 6px; color: var(--text-sec); font-size: .95rem; }
.paper-desc { margin-bottom: 12px; color: #b91c1c; font-size: .9rem; font-style: italic; }
.paper-img { width: 220px; height: 135px; flex-shrink: 0; object-fit: cover; background: #fff; border: 1px solid #f0f0f0; border-radius: 6px; }
.paper-video { display: block; }
.placeholder-image { display: grid; place-items: center; color: rgba(255, 255, 255, .9); background: linear-gradient(135deg, #8bb2d0, #315e86); font: 600 .72rem Inter, sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.placeholder-image.alt { background: linear-gradient(135deg, #aca1c7, #665c8d); }
.placeholder-image.green { background: linear-gradient(135deg, #9cc9bd, #477870); }
.tag-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.badge { padding: 4px 10px; border: none !important; border-radius: 6px; font: 600 .75rem Inter, sans-serif; }
.badge-venue { color: #fff; background: var(--accent); }
.badge-link { color: var(--primary); background: transparent; border: 1px solid var(--primary) !important; }
.badge-link:hover { color: #fff; background: var(--primary); transform: translateY(-1px); }
.activities { padding-left: 20px; color: var(--text-sec); }
.page-footer { margin-top: 52px; padding-top: 24px; color: #777; border-top: 1px solid #eef1f4; font: .9rem Inter, sans-serif; text-align: center; }
.footer-sub { margin-top: 8px; font-size: .82rem; }

@media (max-width: 768px) {
  body { padding: 0; }
  .container { margin: 10px; padding: 30px 20px; }
  .header-top { flex-direction: column-reverse; align-items: flex-start; gap: 20px; }
  .avatar { width: 100%; max-width: 100%; margin-bottom: 20px; }
  .paper-card { flex-direction: column-reverse; }
  .paper-img { width: 100%; height: 190px; }
  .news-item { align-items: flex-start; }
  .project-group summary { padding: 12px 14px; font-size: .96rem; }
  .project-group summary::after { top: 16px; right: 14px; }
  .project-body { padding: 8px 10px 2px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .paper-card:hover, .news-item:hover, .social-btn:hover { transform: none !important; }
}
