/* ===================== RESET & VARIABLES ===================== */
*, *::before, *::after {
  box-sizing: border-box;
}

:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --text: #1e293b;
  --text-secondary: #64748b;
  --bg: #ffffff;
  --bg-secondary: #fafafa;
  --border: #e5e7eb;
  --max-width: 860px;
  --radius: 8px;
  --transition: all 0.18s ease;
}

/* ===================== BASE ===================== */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

p {
  margin: 0 0 10px 0;
}

p:last-child {
  margin-bottom: 0;
}

strong {
  font-weight: 600;
}

/* ===================== NAVIGATION ===================== */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

nav::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: #e2e8f0;
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 13px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-name {
  font-size: 24px;
  font-weight: 500;
  font-family: 'Pacifico', cursive;
  letter-spacing: 0.1px;
  background: linear-gradient(90deg, #0f172a, #c41e3a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.type-cursor {
  display: inline-block;
  margin-left: 1px;
  color: var(--primary);
  font-weight: 300;
  animation: blink-cursor 0.65s step-end infinite;
}

@keyframes blink-cursor {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.nav-name:hover {
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 13.5px;
  color: var(--text-secondary);
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--primary);
  text-decoration: none;
}

/* ===================== MAIN CONTAINER ===================== */
.main-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px 60px;
}

/* ===================== SECTIONS ===================== */
.section {
  padding: 36px 0 12px;
}

.section + .section {
  border-top: 1px solid var(--border);
}

.section-heading {
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
  margin: 0 0 22px 0;
  padding-left: 14px;
  position: relative;
  line-height: 1.3;
}

.section-heading::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 2px;
  background: var(--primary);
}

/* ===================== BIO ===================== */
.bio-section {
  display: flex;
  gap: 44px;
  align-items: flex-start;
  padding: 36px 32px;
  margin: 20px -8px 0;
  background: transparent;
}

.bio-content {
  flex: 1;
}

.bio-name {
  font-size: 35px;
  font-weight: 700;
  letter-spacing: -0.5px;
  display: block;
  margin-bottom: 0px;
  line-height: 1.15;
  color: var(--text);
}

.bio-tagline {
  font-size: 14.7px;
  font-weight: 530;
  /* font-style: bold; */
  color: oklch(61.904% 0.00777 220.013);
  margin-top: 4px !important;
  margin-bottom: 0 !important;
  letter-spacing: -0.1px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
}

.tagline-static {
  white-space: nowrap;
}

.tagline-typewriter-line {
  white-space: nowrap;
  min-height: 1.65em;
}

#bio-typewriter {
  color: var(--primary);
  font-weight: 600;
}

.tagline-typewriter-line {
  display: block;
  min-height: 1.65em;
}

.bio-content p:not(.bio-tagline) {
  font-size: 15px;
  font-weight: 450;
  color: #1e293b;
  line-height: 1.6;
  letter-spacing: -0.1px;
  margin-top: 14px;
}

.bio-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 18px;
}

.bio-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  background: var(--bg);
  transition: var(--transition);
}

.bio-link-btn:hover {
  background: linear-gradient(135deg, #0f172a, #c41e3a);
  border-color: transparent;
  color: #ffffff;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(196, 30, 58, 0.4);
}

.bio-photo {
  width: 240px;
  flex-shrink: 0;
}

.bio-photo a {
  display: block;
}

.bio-photo img {
  width: 260px;
  height: 260px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
  transition: var(--transition);
  display: block;
}

/* .bio-photo img:hover {
  border-color: var(--primary);
  transform: scale(1.04);
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.2);
} */

/* ===================== NEWS ===================== */
.news-list {
  max-height: 256px;
  overflow-y: auto;
  padding-right: 4px;
}

.news-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
  line-height: 1.55;
}

.news-item:last-child {
  border-bottom: none;
}

.news-emoji {
  font-size: 13px;
  flex-shrink: 0;
  margin-top: 2px;
  line-height: 1;
}

.news-date {
  font-size: 10.5px;
  font-weight: 700;
  color: #ffffff;
  background: var(--primary);
  padding: 2px 7px;
  border-radius: 3px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 2px;
  letter-spacing: 0.2px;
}

.news-list::-webkit-scrollbar {
  width: 3px;
}

.news-list::-webkit-scrollbar-track {
  background: transparent;
}

.news-list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.news-venue {
  font-size: 12px;
  color: var(--text-secondary);
  font-style: italic;
  margin-top: 2px;
  display: inline-block;
}

.news-item strong.paper-name,
.news-item a.paper-name {
  font-style: normal;
  font-weight: 700;
  font-size: 15.2px;
  color: #0f172a;
  letter-spacing: -0.1px;
  text-decoration: none;
}

.news-item a.paper-name:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* ===================== EXPERIENCE ===================== */
.exp-item {
  display: flex;
  gap: 0;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}

.exp-item:last-child {
  border-bottom: none;
}

.exp-logo {
  width: 75px;
  flex-shrink: 0;
  padding-top: 3px;
  padding-right: 10px;
}

.exp-logo img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  display: block;
}

.incoming-badge {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 3px;
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
  letter-spacing: 0.3px;
  vertical-align: middle;
  margin-left: 6px;
}

.exp-content {
  flex: 1;
  font-size: 14px;
  line-height: 1.65;
}

.exp-content .exp-role {
  font-weight: 600;
  font-size: 14.5px;
}

.exp-content .exp-company a {
  font-weight: 600;
}

.exp-content .exp-desc {
  color: var(--text);
  margin-top: 2px;
}

.exp-content .exp-mentor {
  color: var(--text-secondary);
  font-size: 13px;
  margin-top: 3px;
}

.exp-content .exp-mentor a {
  color: var(--text-secondary);
}

.exp-content .exp-mentor a:hover {
  color: var(--primary);
}

.exp-date {
  font-size: 12.5px;
  color: var(--text-secondary);
  white-space: nowrap;
  width: 158px;
  flex-shrink: 0;
  text-align: right;
  padding-top: 3px;
  padding-left: 16px;
}

/* ===================== PAPERS ===================== */
.papers-list {
  display: flex;
  flex-direction: column;
}

.paper-item {
  display: flex;
  gap: 20px;
  padding: 20px 12px;
  border-radius: var(--radius);
  transition: background 0.15s ease;
  margin: 0 -12px;
}

.paper-item:hover {
  background: var(--bg-secondary);
}

.paper-thumb {
  width: 156px;
  flex-shrink: 0;
  padding-top: 2px;
}

.paper-thumb img {
  width: 156px;
  height: auto;
  display: block;
}

.paper-content {
  flex: 1;
}

.paper-title {
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.45;
  margin-bottom: 5px;
  letter-spacing: -0.1px;
}

.paper-title a {
  color: var(--text);
}

.paper-title a:hover {
  color: var(--primary);
  text-decoration: none;
}

.paper-authors {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  line-height: 1.5;
}

.paper-authors strong {
  color: var(--text);
  font-weight: 600;
}

.paper-authors a {
  color: var(--text-secondary);
}

.paper-authors a:hover {
  color: var(--primary);
  text-decoration: none;
}

.venue-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.venue-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.2px;
}

.venue-cvpr {
  background: linear-gradient(135deg, #fef9c3, #fde68a);
  color: #713f12;
  border: 1px solid #fbbf24;
}

.paper-links {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.paper-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  background: var(--bg);
  transition: var(--transition);
}

.paper-link-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  text-decoration: none;
}

.paper-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 8px 0 0;
  line-height: 1.6;
}

/* ===================== AWARDS ===================== */
.awards-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.awards-list li {
  position: relative;
  padding: 3px 0 3px 20px;
  font-size: 14px;
  line-height: 1.5;
  display: block;
}

.awards-list li::before {
  content: "▸";
  position: absolute;
  left: 0;
  top: 5px;
  color: var(--primary);
  font-size: 11px;
}

.awards-list li strong {
  font-weight: 800;
}

/* ===================== REVIEWER ===================== */
.reviewer-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.reviewer-list li {
  padding: 3px 0;
  font-size: 14px;
  line-height: 1.55;
}

/* ===================== FOOTER ===================== */
.visitor-map {
  text-align: center;
  padding: 24px 0 16px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

.footer {
  text-align: right;
  padding: 12px 0 0;
  font-size: 12px;
  color: var(--text-secondary);
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 640px) {
  .bio-section {
    flex-direction: column-reverse;
    align-items: center;
    gap: 20px;
    padding-top: 28px;
  }

  .bio-name {
    text-align: center;
  }

  .bio-tagline {
    justify-content: center;
  }

  .bio-links {
    justify-content: center;
  }

  .nav-links {
    gap: 16px;
  }

  .nav-links a {
    font-size: 12.5px;
  }

  .paper-item {
    flex-direction: column;
    gap: 12px;
  }

  .paper-thumb {
    width: 100%;
  }

  .paper-thumb img {
    width: 100%;
    height: 180px;
  }

  .exp-date {
    display: none;
  }

  .main-container {
    padding: 0 16px 40px;
  }
}

/* ===================== LEGACY COMPAT (kept for hover scripts) ===================== */
.one {
  width: 160px;
  height: 160px;
  position: relative;
}

.two {
  width: 160px;
  height: 160px;
  position: absolute;
  transition: opacity .2s ease-in-out;
  -moz-transition: opacity .2s ease-in-out;
  -webkit-transition: opacity .2s ease-in-out;
}

.fade {
  transition: opacity .2s ease-in-out;
  -moz-transition: opacity .2s ease-in-out;
  -webkit-transition: opacity .2s ease-in-out;
}
/* Avatar: keep gray border, add glass-shine hover effect */
.bio-photo a {
  position: relative;
  display: block;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  overflow: hidden;
}

.bio-photo img {
  width: 260px;
  height: 260px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
  display: block;
  transform: none !important;
  box-shadow: none !important;
}

/* the light streak */
.bio-photo a::after {
  content: "";
  position: absolute;
  top: -40%;
  left: -90%;
  width: 45%;
  height: 180%;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(255, 255, 255, 0.15) 35%,
    rgba(255, 255, 255, 0.65) 50%,
    rgba(255, 255, 255, 0.15) 65%,
    transparent 100%
  );
  transform: rotate(22deg);
  pointer-events: none;
}

/* hover: only shine passes through */
.bio-photo a:hover::after {
  animation: avatar-shine 0.85s ease;
}

@keyframes avatar-shine {
  from {
    left: -90%;
  }
  to {
    left: 140%;
  }
}
/* Avatar hover: glass shine + slightly bigger + soft shadow */
.bio-photo a {
  transition: transform 0.25s ease, box-shadow 0.25s ease !important;
}

.bio-photo a:hover {
  transform: scale(1.04) !important;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.18) !important;
}

/* Dark mode: slightly stronger but soft shadow */
body[data-theme="dark"] .bio-photo a:hover {
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.42) !important;
}
/* Avatar hover border color */
body:not([data-theme="dark"]) .bio-photo a:hover img {
  border-color: #3a78ff !important;
}

body[data-theme="dark"] .bio-photo a:hover img {
  border-color: var(--accent-orange) !important;
}