/* ============================================================
   YUCHI WANG – Personal Homepage
   Accent: #3D70B2  |  Base: 17px  |  Name: Palatino
   Max-width: 1120px
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 17px; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: #1f2937; background: #fff; line-height: 1.8;
}
a { color: #3D70B2; text-decoration: none; transition: color 0.2s; }
a:hover { color: #2558A0; }
p { margin-bottom: 0.9em; }
p:last-child { margin-bottom: 0; }

/* ── Shared container ──────────────────────── */
.hero-content, .page-content {
  max-width: 1120px; margin: 0 auto;
  padding-left: 48px; padding-right: 48px; width: 100%;
}

/* ── Navbar ────────────────────────────────── */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(5,9,20,0.72); backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background 0.3s, box-shadow 0.3s;
}
#navbar.scrolled {
  background: rgba(4,8,18,0.96);
  box-shadow: 0 2px 28px rgba(0,0,0,0.35);
}
.nav-inner {
  max-width: 1120px; margin: 0 auto;
  padding: 0 48px; height: 54px;
  display: flex; align-items: center; gap: 20px;
}
.nav-brand {
  font-size: 1rem; font-weight: 600;
  color: rgba(255,255,255,0.92) !important;
  white-space: nowrap; flex-shrink: 0; letter-spacing: 0.01em;
}
.nav-brand:hover { color: #90C4F8 !important; }
.nav-links { display: flex; list-style: none; gap: 2px; margin-left: auto; }
.nav-links a {
  display: block; padding: 5px 10px;
  font-size: 0.9rem; font-weight: 500;
  color: rgba(255,255,255,0.65); border-radius: 5px;
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover, .nav-links a.active {
  color: #90C4F8; background: rgba(100,170,255,0.1);
}
.nav-toggle {
  display: none; margin-left: auto; background: none; border: none;
  color: rgba(255,255,255,0.75); font-size: 1.15rem; cursor: pointer; padding: 6px;
}

/* ── Hero / Starry sky ─────────────────────── */
.hero-section {
  position: relative; min-height: 310px;
  display: flex; align-items: center;
  padding: 96px 0 62px; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 25% 55%, rgba(40,85,170,0.35) 0%, transparent 52%),
    radial-gradient(ellipse at 78% 18%, rgba(20,55,130,0.28) 0%, transparent 48%),
    radial-gradient(ellipse at 60% 80%, rgba(10,35,90,0.2) 0%, transparent 45%),
    #04080F;
  z-index: 0; overflow: hidden;
}
@keyframes twinkle { to { opacity: 0.03; transform: scale(0.6); } }

.hero-content {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 46px;
}
.hero-photo { flex-shrink: 0; }
.hero-photo img {
  width: 196px; height: 196px; object-fit: cover;
  border-radius: 12px; border: 2px solid rgba(144,196,248,0.28);
  box-shadow: 0 10px 40px rgba(0,0,0,0.55);
}
.hero-info { color: #fff; flex: 1; min-width: 0; }
.hero-name {
  font-family: 'Palatino Linotype', Palatino, Georgia, 'Times New Roman', serif;
  font-size: 2.1rem; font-weight: 700; line-height: 1.2;
  margin-bottom: 6px; color: #fff; letter-spacing: 0.01em;
}
.hero-name-zh {
  font-size: 1.25rem; font-weight: 400;
  color: rgba(255,255,255,0.52); margin-left: 10px;
}
.hero-title {
  font-size: 0.82rem; font-weight: 700; color: #90C4F8;
  letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 6px;
}
.hero-affil, .hero-advisor {
  font-size: 0.97rem; color: rgba(255,255,255,0.78); margin-bottom: 3px;
}
.hero-affil a, .hero-advisor a {
  color: rgba(255,255,255,0.86);
  border-bottom: 1px solid rgba(144,196,248,0.28);
}
.hero-affil a:hover, .hero-advisor a:hover {
  color: #90C4F8; border-bottom-color: #90C4F8;
}
.hero-email {
  font-size: 0.88rem; font-family: 'Courier New', monospace;
  color: rgba(255,255,255,0.42); margin: 10px 0 15px;
}
.hero-email i { color: #90C4F8; }
.hero-links { display: flex; gap: 7px; flex-wrap: wrap; }
.hero-links a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 13px; border-radius: 7px;
  font-size: 0.85rem; font-weight: 600;
  color: rgba(255,255,255,0.8);
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}
.hero-links a:hover {
  background: rgba(100,170,255,0.18);
  border-color: rgba(144,196,248,0.45);
  color: #90C4F8; transform: translateY(-2px);
}

/* ── Page content ──────────────────────────── */
.page-content { padding-top: 0; padding-bottom: 72px; }

/* ── Section headings ──────────────────────── */
section { padding-top: 56px; }
.section-heading {
  position: relative; display: flex; align-items: baseline; gap: 16px;
  width: 100%; margin-bottom: 24px; padding-bottom: 14px;
  color: #1B3A6B; font-size: 1.52rem; font-weight: 700;
  letter-spacing: 0.005em; transform-origin: left center;
  transition: transform 0.24s, letter-spacing 0.28s, text-shadow 0.28s;
}
.section-heading::before {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 56px; height: 3px; border-radius: 999px;
  background: linear-gradient(90deg, #3D70B2 0%, #90C4F8 100%);
  box-shadow: 0 4px 12px rgba(61,112,178,0.25);
  transition: width 0.32s ease, box-shadow 0.3s;
}
.section-heading::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 1px;
  height: 1px; border-radius: 999px;
  background: linear-gradient(90deg,
    rgba(61,112,178,0.18) 0%, rgba(61,112,178,0.05) 45%, transparent 100%);
}
.section-heading:hover, .section-heading.section-focus {
  transform: translateX(2px); text-shadow: 0 4px 14px rgba(61,112,178,0.1);
}
.section-heading:hover::before, .section-heading.section-focus::before {
  width: 130px; box-shadow: 0 5px 16px rgba(61,112,178,0.2);
}
.fulllist-link {
  font-size: 0.87rem; font-weight: 500;
  color: rgba(61,112,178,0.6);
  border-bottom: 1px dashed rgba(61,112,178,0.3);
  align-self: flex-end; padding-bottom: 1px;
  margin-left: auto; white-space: nowrap;
}
.fulllist-link:hover { color: #3D70B2; border-bottom-style: solid; }

/* ── News ──────────────────────────────────── */
.news-box {
  height: 228px; overflow-y: auto; padding-right: 6px;
  scrollbar-width: thin; scrollbar-color: rgba(61,112,178,0.28) transparent;
}
.news-box::-webkit-scrollbar { width: 4px; }
.news-box::-webkit-scrollbar-thumb {
  background: rgba(61,112,178,0.28); border-radius: 999px;
}
.news-box ul { list-style: none; padding: 0; }
.news-box li {
  padding: 8px 0; border-bottom: 1px solid #f0f1f4;
  font-size: 0.97rem; line-height: 1.6;
}
.news-box li:last-child { border-bottom: none; }
.news-date {
  font-weight: 700; color: #3D70B2;
  margin-right: 7px; font-variant-numeric: tabular-nums;
}

/* ── Publications (flat) ───────────────────── */
.pub-category-divider {
  display: flex; align-items: center; gap: 14px;
  margin: 30px 0 4px;
  font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; color: #3D70B2;
}
.pub-category-divider::before, .pub-category-divider::after {
  content: ""; flex: 1; height: 1px; border-radius: 999px;
  background: rgba(61,112,178,0.22);
}

.pub-item {
  display: flex; gap: 28px; padding: 26px 0;
  border-bottom: 1px solid #e8eaf0; align-items: flex-start;
}
.pub-item:last-of-type { border-bottom: none; }

.pub-img { flex-shrink: 0; width: 320px; }
.pub-img img {
  width: 100%; height: auto; min-height: 140px; max-height: 210px;
  object-fit: cover; border-radius: 7px;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 4px 18px rgba(0,0,0,0.13);
  background: #e4e8f0; display: block;
  cursor: zoom-in; transition: box-shadow 0.2s, transform 0.2s;
}
.pub-img img:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.2); transform: scale(1.01);
}

.pub-info {
  display: flex; flex-direction: column;
  gap: 7px; justify-content: flex-start;
  flex: 1; min-width: 0; padding-top: 2px;
}
.pub-title {
  font-size: 1.06rem; font-weight: 700;
  color: #0d1929; line-height: 1.45;
}
.pub-authors { font-size: 0.9rem; color: #596070; line-height: 1.6; }
.pub-authors strong { color: #111827; font-weight: 700; }

.pub-venue { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }

/* ── Venue badges — small rounded rect ─────── */
.venue-badge {
  display: inline-block; padding: 2px 8px;
  border-radius: 4px; font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.03em; border: 1px solid transparent;
}
.badge-cvpr    { background: #eef4ff; border-color: #c5d8fb; color: #1e4db7; }
.badge-iccv    { background: #f0fdf4; border-color: #bbf7d0; color: #14694d; }
.badge-eccv    { background: #fefce8; border-color: #fde68a; color: #854d0e; }
.badge-neurips { background: #fdf4ff; border-color: #e9d5ff; color: #6b21a8; }
.badge-acl     { background: #fff7ed; border-color: #fed7aa; color: #c2410c; }
.badge-emnlp   { background: #ecfeff; border-color: #99f6e4; color: #0e7490; }
.badge-aaai    { background: #f0f9ff; border-color: #bae6fd; color: #0369a1; }
.badge-iclr    { background: #fdf4ff; border-color: #d8b4fe; color: #7c3aed; }
.badge-naacl   { background: #fff7ed; border-color: #fdba74; color: #b45309; }
.badge-acmm    { background: #fdf2f8; border-color: #f0abfc; color: #a21caf; }
.badge-coling  { background: #f0fdf4; border-color: #86efac; color: #166534; }
.badge-arxiv   { background: #f8f9fb; border-color: #dde1ea; color: #64748b; }
.badge-report  { background: #f1f5f9; border-color: #cbd5e1; color: #475569; }
.badge-highlight { background: rgba(251,191,36,0.1); border-color: rgba(251,191,36,0.4); color: #a16207; }
.badge-oral    { background: rgba(239,68,68,0.08); border-color: rgba(239,68,68,0.3); color: #b91c1c; }

.pub-links { display: flex; gap: 14px; flex-wrap: wrap; }
.pub-links a {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.86rem; font-weight: 600; color: #3D70B2;
  border-bottom: 1px solid rgba(61,112,178,0.25);
  transition: color 0.2s, border-color 0.2s;
}
.pub-links a:hover { color: #2558A0; border-bottom-color: #2558A0; }
.pub-links a i { font-size: 0.8rem; }

/* ── Education & Internship (flat) ─────────── */
.exp-item {
  display: flex; align-items: flex-start; gap: 28px;
  padding: 24px 0; border-bottom: 1px solid #e8eaf0;
}
.exp-item:last-of-type { border-bottom: none; }
.exp-logo {
  flex-shrink: 0; width: 204px; padding-top: 4px;
  display: flex; align-items: flex-start; justify-content: flex-start;
}
.exp-logo img {
  max-width: 204px; max-height: 96px;
  width: auto; height: auto; object-fit: contain;
}
.exp-logo-fallback {
  font-size: 0.88rem; font-weight: 700; color: #94a3b8; letter-spacing: 0.06em;
}
.exp-logo img + .exp-logo-fallback { display: none; }
.exp-info { flex: 1; }
.exp-org { font-size: 1rem; font-weight: 700; color: #0d1929; margin-bottom: 2px; line-height: 1.3; }
.exp-degree { font-size: 0.93rem; font-weight: 600; color: #2d4a6e; }
.exp-time { font-size: 0.86rem; color: #94a3b8; margin: 3px 0; }
.exp-detail { font-size: 0.9rem; color: #4a5568; }
.exp-detail em, .exp-info > em { font-style: italic; font-size: 0.9rem; color: #6b7280; }

/* ── Awards ────────────────────────────────── */
.awards-list { list-style: none; padding: 0; }
.awards-list li {
  padding: 7px 0 7px 14px;
  border-left: 2px solid rgba(61,112,178,0.22);
  margin-bottom: 6px; font-size: 0.97rem; color: #333;
  transition: border-color 0.2s;
}
.awards-list li:hover { border-left-color: #3D70B2; }
.award-year { font-weight: 700; color: #3D70B2; margin-right: 10px; }

/* ── Academic Service ──────────────────────── */
.service-block { margin-bottom: 28px; }
.service-role {
  font-weight: 700; font-size: 0.88rem; color: #1B3A6B;
  text-transform: uppercase; letter-spacing: 0.07em; margin: 22px 0 10px;
}
.service-block .service-role:first-child { margin-top: 0; }
.service-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.stag {
  display: inline-block; padding: 4px 11px;
  border-radius: 4px; font-size: 0.83rem; font-weight: 600;
  border: 1px solid transparent; cursor: default;
  transition: transform 0.18s, box-shadow 0.18s;
}
.stag:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.08); }
.tag-cvpr    { background: #eef4ff; border-color: #c5d8fb; color: #1e4db7; }
.tag-iccv    { background: #f0fdf4; border-color: #bbf7d0; color: #14694d; }
.tag-eccv    { background: #fefce8; border-color: #fde68a; color: #854d0e; }
.tag-neurips { background: #fdf4ff; border-color: #e9d5ff; color: #6b21a8; }
.tag-acl     { background: #fff7ed; border-color: #fed7aa; color: #c2410c; }
.tag-emnlp   { background: #ecfeff; border-color: #99f6e4; color: #0e7490; }
.tag-aaai    { background: #f0f9ff; border-color: #bae6fd; color: #0369a1; }
.tag-iclr    { background: #fdf4ff; border-color: #d8b4fe; color: #7c3aed; }

/* TA list */
.ta-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.ta-list li {
  font-size: 0.93rem; color: #374151; padding: 7px 0;
  border-bottom: 1px solid #f0f1f4;
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px;
}
.ta-list li:last-child { border-bottom: none; }
.ta-course { font-weight: 600; color: #1a2c4a; }
.ta-meta   { font-size: 0.84rem; color: #94a3b8; }

/* ── Lightbox ──────────────────────────────── */
.lb-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.88); z-index: 9999;
  cursor: zoom-out; place-items: center;
}
.lb-overlay.open { display: grid; }
.lb-overlay img {
  max-width: 90vw; max-height: 88vh;
  border-radius: 10px;
  box-shadow: 0 24px 72px rgba(0,0,0,0.65);
  cursor: default; animation: lbIn 0.18s ease;
}
@keyframes lbIn { from { opacity: 0; transform: scale(0.94); } to { opacity: 1; transform: scale(1); } }
.lb-close {
  position: fixed; top: 20px; right: 28px;
  color: rgba(255,255,255,0.75); font-size: 1.8rem;
  cursor: pointer; line-height: 1; z-index: 10000;
  transition: color 0.2s;
}
.lb-close:hover { color: #fff; }

/* ── Footer ────────────────────────────────── */
footer {
  margin-top: 64px; padding: 24px 48px;
  text-align: center; font-size: 0.83rem; color: #aaa;
  border-top: 1px solid #e8eaf0; background: #fafbfd;
}
footer a { color: #c0c8d8; }
footer a:hover { color: #3D70B2; }

/* ── Responsive ────────────────────────────── */
@media (max-width: 820px) {
  html { font-size: 15px; }
  .hero-content, .page-content, .nav-inner { padding-left: 20px; padding-right: 20px; }
  footer { padding-left: 20px; padding-right: 20px; }
  .nav-links {
    display: none; flex-direction: column;
    position: absolute; top: 54px; left: 0; right: 0;
    background: rgba(4,8,18,0.97); padding: 10px 14px; gap: 2px;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .hero-content { flex-direction: column; align-items: flex-start; gap: 18px; }
  .hero-photo img { width: 144px; height: 144px; }
  .hero-name { font-size: 1.55rem; }
  .pub-item { flex-direction: column; }
  .pub-img { width: 100%; }
  .pub-img img { max-height: 220px; min-height: unset; }
  .exp-item { flex-direction: column; gap: 12px; }
  .exp-logo { width: auto; }
  .exp-logo img { max-height: 60px; }
  .section-heading { font-size: 1.3rem; }
  .section-heading::before { width: 42px; }
  .section-heading:hover::before { width: 90px; }
}
