:root {
  --ink: #444;
  --heading: #3d3d3d;
  --muted: #737373;
  --link: #2f5f8f;
  --line: #e8e8e8;
  --blue: #0753a6;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.55;
}

a { color: var(--link); text-underline-offset: 2px; }
a:hover { color: #123f70; text-decoration: underline; }
img { display: block; max-width: 100%; }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: .55rem .8rem;
  color: white;
  background: #222;
}

.skip-link:focus { top: 1rem; }

.topbar {
  min-height: 50px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .96);
}

.topbar nav {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 28px;
  overflow-x: auto;
  scrollbar-width: none;
  white-space: nowrap;
}

.topbar nav::-webkit-scrollbar { display: none; }

.topbar a {
  padding: 16px 0 14px;
  color: #686868;
  font-size: 13px;
  text-decoration: none;
}

.topbar a:hover,
.topbar a.active { color: #333; }
.topbar a.active { font-weight: 650; }

.page-shell {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 38px 0 70px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 42px;
}

.profile {
  align-self: start;
  position: sticky;
  top: 24px;
}

.profile-photo {
  width: 190px;
  height: 190px;
  margin: 0 auto 20px;
  object-fit: cover;
  object-position: center;
  border: 4px solid #f0f0f0;
  border-radius: 50%;
}

.profile h1 {
  margin: 0;
  color: var(--heading);
  font-size: 20px;
  line-height: 1.2;
}

.profile h1 span { font-size: 17px; font-weight: 600; }
.profile-role { margin: 10px 0 18px; color: #666; }

.profile-links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.profile-links li {
  margin: 10px 0;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 2px;
  align-items: start;
}

.profile-links a { color: var(--ink); text-decoration: none; }
.profile-links a:hover { color: var(--link); }

.research-tags {
  margin-top: 24px;
  padding-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border-top: 1px solid var(--line);
}

.research-tags span {
  padding: 3px 7px;
  color: #5d5d5d;
  background: #f4f6f8;
  border: 1px solid #e4e8ec;
  border-radius: 3px;
  font-size: 11px;
}

.content { min-width: 0; }
.content section { margin-bottom: 28px; scroll-margin-top: 16px; }

.section-title {
  margin: 0 0 10px;
  padding: 0 0 8px;
  color: var(--heading);
  border-bottom: 1px solid var(--line);
  font-size: 19px;
  line-height: 1.25;
  font-weight: 650;
}

.section-title span { margin-right: 4px; font-size: 18px; }
.content p { margin: 8px 0; }
.content strong { color: #333; }

.news-list,
.awards-list { margin: 8px 0 0; padding-left: 24px; }
.news-list li,
.awards-list li { margin: 6px 0; }

.news-list em,
.awards-list em {
  color: #666;
  font-family: Georgia, "Times New Roman", serif;
}

.subsection-title {
  margin: 16px 0 2px;
  padding: 0 4px 10px;
  color: #444;
  border-bottom: 1px solid #f0f0f0;
  font-size: 15px;
}

.subsection-title span { margin-right: 5px; }
.publication-list { margin-top: 6px; }

.publication {
  padding: 27px 4px;
  display: grid;
  grid-template-columns: minmax(280px, 43%) minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.publication-visual {
  min-height: 0;
  position: relative;
  display: block;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, .12);
}

.publication-visual img,
.publication-video {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
}

.publication-video { aspect-ratio: 16 / 9; background: #111; }

.venue-badge {
  position: absolute;
  z-index: 2;
  top: 11px;
  left: 11px;
  min-width: 0;
  padding: 5px 11px;
  color: white;
  background: var(--blue);
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
  font-size: 10px;
  line-height: 1.2;
  font-weight: 750;
  letter-spacing: .055em;
  text-transform: uppercase;
  text-align: center;
  backdrop-filter: blur(8px);
}

.venue-review { background: linear-gradient(135deg, #a66b12, #d18d1f); }
.venue-conference { background: linear-gradient(135deg, #2457a8, #477bc9); }
.venue-journal { background: linear-gradient(135deg, #2f7255, #4f9670); }

.publication-details h4 {
  margin: 0 0 6px;
  color: var(--link);
  font-size: 14px;
  line-height: 1.45;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.authors { margin: 0 0 7px !important; font-size: 13px; }
.publication-details ul { margin: 7px 0; padding-left: 22px; }
.publication-details li { margin: 4px 0; }
.paper-links { margin-top: 9px !important; }
.paper-links a { margin-right: 10px; font-weight: 600; text-decoration: none; }

.compact-paper {
  padding: 14px 4px;
  display: grid;
  grid-template-columns: 165px minmax(0, 1fr);
  gap: 20px;
  border-bottom: 1px solid var(--line);
}

.compact-venue { color: var(--blue); font-size: 12px; font-weight: 650; }
.compact-paper > div > a { font-weight: 500; }
.compact-paper p { margin: 4px 0 0; color: #666; font-size: 13px; }

.champion-feature {
  padding: 18px 4px 8px;
  display: grid;
  grid-template-columns: 43% minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.champion-feature > img {
  width: 100%;
  border: 1px solid #ddd;
  box-shadow: 0 2px 5px rgba(0, 0, 0, .11);
}

.inline-badge { position: static; display: inline-block; margin-bottom: 8px; }
.champion-feature h3 { margin: 3px 0 8px; color: var(--heading); font-size: 16px; }
.official-link { display: inline-block; margin-top: 4px; font-weight: 650; text-decoration: none; }

.competition-video-grid {
  margin: 20px 4px 8px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.competition-video-grid figure {
  margin: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e3e3e3;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, .1);
}

.competition-video-grid video {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  background: #111;
}

.competition-video-grid .is-portrait { order: 1; }
.competition-video-grid .is-portrait video { aspect-ratio: 9 / 16; }

.competition-video-grid .is-landscape {
  order: 2;
  grid-column: 1 / -1;
  width: min(100%, 720px);
  justify-self: center;
}

.competition-video-grid .is-landscape video { aspect-ratio: 16 / 9; }

.competition-video-grid figcaption {
  padding: 7px 10px 8px;
  color: #555;
  font-size: 12px;
  font-weight: 650;
}

.credential-row {
  padding: 13px 4px;
  display: grid;
  grid-template-columns: 92px 150px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.institution-logo {
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.institution-logo img { width: 100%; height: 100%; object-fit: contain; }
.company-logo { padding: 10px 2px; }
.vivo-logo { padding: 15px 4px; }
.seal-logo { padding: 1px 20px; }
.school-wordmark { padding: 11px 0; }

.credential-row time { color: #666; font-style: italic; }
.credential-row h3 { margin: 0 0 2px; color: #3f3f3f; font-size: 15px; }
.credential-row strong { font-size: 13px; font-weight: 500; }

footer {
  margin-top: 38px;
  padding-top: 14px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: #888;
  border-top: 1px solid var(--line);
  font-size: 12px;
}

footer p { margin: 0 !important; }

.footer-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-count {
  display: inline-flex;
  line-height: 0;
}

.footer-count img {
  width: 160px;
  height: auto;
}

@media (max-width: 820px) {
  .page-shell { grid-template-columns: 1fr; gap: 28px; padding-top: 28px; }
  .profile {
    position: static;
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    column-gap: 22px;
  }
  .profile-photo { width: 120px; height: 120px; grid-row: 1 / 5; margin: 0; }
  .profile h1 { align-self: end; }
  .profile-role { margin: 5px 0 7px; }
  .profile-links { display: flex; flex-wrap: wrap; gap: 4px 16px; }
  .profile-links li { margin: 2px 0; }
  .research-tags { display: none; }
}

@media (max-width: 650px) {
  body { font-size: 13px; }
  .topbar nav,
  .page-shell { width: min(100% - 24px, 1200px); }
  .topbar nav { gap: 20px; }
  .profile { grid-template-columns: 92px minmax(0, 1fr); column-gap: 16px; }
  .profile-photo { width: 92px; height: 92px; }
  .profile h1 { font-size: 18px; }
  .profile-role { font-size: 12px; }
  .publication,
  .champion-feature { grid-template-columns: 1fr; gap: 16px; }
  .publication { padding-block: 22px; }
  .competition-video-grid { grid-template-columns: 1fr; }
  .competition-video-grid .is-portrait { width: min(100%, 320px); justify-self: center; }
  .competition-video-grid .is-landscape { grid-column: auto; width: 100%; }
  .compact-paper { grid-template-columns: 1fr; gap: 4px; }
  .credential-row { grid-template-columns: 72px minmax(0, 1fr); gap: 8px 14px; }
  .credential-row time { grid-column: 2; grid-row: 1; align-self: end; }
  .credential-row > div:last-child { grid-column: 2; grid-row: 2; }
  .institution-logo { grid-row: 1 / 3; height: 46px; }
  footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
