/* ==========================================================================
   Academic Personal Homepage Stylesheet
   Inspired by Minimal Mistakes / AcademicPages / wd7ang / xinyuxu414
   Clean, Professional, Pure English Academic Design
   ========================================================================== */

:root {
  --primary-color: #2b6cb0;
  --primary-hover: #1a4971;
  --accent-color: #ca6f6f;
  --text-main: #2d3748;
  --text-muted: #718096;
  --text-light: #a0aec0;
  --bg-main: #ffffff;
  --bg-alt: #f8fafc;
  --bg-card: #ffffff;
  --border-color: #e2e8f0;
  --border-light: #edf2f7;
  --badge-bg: #edf2f7;
  --badge-text: #4a5568;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  color: var(--text-main);
  background-color: var(--bg-main);
  line-height: 1.65;
  padding-top: 65px;
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* ==========================================================================
   Header / Masthead
   ========================================================================== */
.masthead {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  display: flex;
  align-items: center;
}

.masthead__inner {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.masthead__brand {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.masthead__brand:hover {
  text-decoration: none;
  color: var(--primary-color);
}

.masthead__nav {
  display: flex;
  gap: 20px;
  list-style: none;
}

.masthead__nav a {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 6px 4px;
  position: relative;
  text-decoration: none;
}

.masthead__nav a:hover,
.masthead__nav a.active {
  color: var(--primary-color);
  text-decoration: none;
}

.masthead__nav a.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--primary-color);
  border-radius: 2px;
}

/* Mobile Nav Toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--text-main);
  cursor: pointer;
}

/* ==========================================================================
   Main Container & Two-Column Layout
   ========================================================================== */
.main-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px 80px;
  display: flex;
  gap: 48px;
  align-items: flex-start;
}

/* Sidebar */
.sidebar {
  width: 280px;
  flex-shrink: 0;
  position: sticky;
  top: 85px;
  background-color: var(--bg-card);
  padding: 24px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.sidebar__avatar {
  width: 190px;
  height: 190px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 16px;
  border: 3px solid #fff;
  box-shadow: 0 0 0 1px var(--border-color), 0 4px 12px rgba(0, 0, 0, 0.09);
  display: block;
}

.sidebar__name {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

.sidebar__bio {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.45;
}

.sidebar__divider {
  height: 1px;
  background-color: var(--border-color);
  margin: 16px 0;
}

.sidebar__links {
  list-style: none;
  text-align: left;
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sidebar__links li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  word-break: break-all;
}

.sidebar__links li i {
  width: 18px;
  color: var(--primary-color);
  text-align: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.sidebar__links a {
  color: var(--text-main);
  text-decoration: none;
}

.sidebar__links a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

/* Content Area */
.content {
  flex: 1;
  min-width: 0;
}

/* Sections */
.section {
  margin-bottom: 48px;
  scroll-margin-top: 80px;
}

.section__title {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 1.5px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

.section__title::after {
  content: "";
  position: absolute;
  bottom: -1.5px;
  left: 0;
  width: 36px;
  height: 2.5px;
  background: var(--primary-color);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.section:hover .section__title::after {
  width: 64px;
}

.section__title-icon {
  font-size: 1.25rem;
  display: inline-block;
}

.waving-hand {
  display: inline-block;
  transform-origin: 70% 70%;
  animation: wave-hand 2.5s infinite;
}

@keyframes wave-hand {
  0% {
    transform: rotate(0deg);
  }

  10% {
    transform: rotate(14deg);
  }

  20% {
    transform: rotate(-8deg);
  }

  30% {
    transform: rotate(14deg);
  }

  40% {
    transform: rotate(-4deg);
  }

  50% {
    transform: rotate(10deg);
  }

  60% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(0deg);
  }
}

/* ==========================================================================
   About Section & Headline Animation
   ========================================================================== */
.hero-headline {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.45;
  margin-bottom: 16px;
}

.gradient-headline {
  background: linear-gradient(135deg, #1a365d 0%, #2b6cb0 50%, #319795 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline;
  animation: shimmerGradient 6s ease infinite, subtleFadeSlide 0.8s ease-out;
}

@keyframes shimmerGradient {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

@keyframes subtleFadeSlide {
  0% {
    opacity: 0;
    transform: translateY(6px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.about-text {
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--text-main);
}

.about-text p {
  margin-bottom: 14px;
}

/* Interest Tags */
.interest-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 20px;
}

.interest-tag {
  background-color: var(--bg-alt);
  color: var(--primary-color);
  border: 1px solid #bee3f8;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.88rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.interest-tag:hover {
  background-color: #ebf8ff;
  border-color: #90cdf4;
  transform: translateY(-1px);
}

.focus-callout {
  background-color: var(--bg-alt);
  border-left: 4px solid var(--primary-color);
  padding: 14px 18px;
  border-radius: 0 8px 8px 0;
  margin: 20px 0 10px;
  font-size: 0.95rem;
  color: var(--text-main);
}

.focus-callout strong {
  color: var(--primary-color);
}

/* ==========================================================================
   News Box (Scrollable)
   ========================================================================== */
.news-box {
  max-height: 230px;
  overflow-y: auto;
  background-color: var(--bg-alt);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 16px 20px;
}

.news-box::-webkit-scrollbar {
  width: 6px;
}

.news-box::-webkit-scrollbar-thumb {
  background-color: var(--border-color);
  border-radius: 3px;
}

.news-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.news-item {
  font-size: 0.93rem;
  line-height: 1.5;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.news-emojis {
  font-size: 1rem;
  flex-shrink: 0;
}

.news-date {
  font-weight: 700;
  color: var(--accent-color);
  font-size: 0.88rem;
  min-width: 78px;
  flex-shrink: 0;
}

.news-text {
  color: var(--text-main);
}

/* ==========================================================================
   Education & Experience List
   ========================================================================== */
.education-list {
  list-style-type: disc;
  padding-left: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.education-item {
  font-size: 0.96rem;
  line-height: 1.65;
  color: var(--text-main);
}

.education-date {
  font-style: italic;
  font-weight: 500;
  color: var(--text-main);
  margin-right: 6px;
}

.education-text {
  color: var(--text-main);
}

/* ==========================================================================
   Publication Card with Framework Diagram
   ========================================================================== */
.publication-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.publication-card {
  display: flex;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 18px;
  gap: 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.publication-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e0;
}

.publication-img-wrap {
  width: 250px;
  max-height: 155px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.publication-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.publication-card:hover .publication-img {
  transform: scale(1.02);
}

.publication-details {
  flex: 1;
}

.publication-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.4;
  margin-bottom: 8px;
}

.publication-title a {
  color: var(--text-main);
  text-decoration: none;
}

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

.publication-authors {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  line-height: 1.45;
}

.publication-authors strong {
  color: var(--text-main);
  text-decoration: underline;
}

.publication-venue {
  font-size: 0.9rem;
  color: var(--text-main);
  margin-bottom: 10px;
  font-style: italic;
}

.publication-venue-badge {
  display: inline-block;
  background-color: #ebf8ff;
  color: #2b6cb0;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 4px;
  margin-right: 6px;
  font-style: normal;
  border: 1px solid #bee3f8;
}

.publication-tier-badge {
  display: inline-block;
  background-color: #fff7ed;
  color: #9a3412;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 4px;
  margin-right: 6px;
  font-style: normal;
  border: 1px solid #ffedd5;
}

.publication-ccf-badge {
  display: inline-block;
  background-color: #fef3c7;
  color: #92400e;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 4px;
  margin-right: 6px;
  font-style: normal;
  border: 1px solid #fde68a;
}

.publication-ccf-badge.ccf-a {
  background-color: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}

.publication-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pub-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--bg-alt);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.pub-btn:hover {
  background-color: #edf2f7;
  color: var(--primary-color);
  border-color: #cbd5e0;
  text-decoration: none;
}

.pub-btn i {
  font-size: 0.85rem;
}

/* ==========================================================================
   Honors & Awards
   ========================================================================== */
.honors-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.honor-item {
  display: flex;
  align-items: baseline;
  padding: 12px 16px;
  background-color: var(--bg-alt);
  border-radius: 8px;
  border-left: 3px solid var(--primary-color);
  font-size: 0.95rem;
  gap: 14px;
}

.honor-year {
  font-weight: 700;
  color: var(--accent-color);
  min-width: 85px;
  flex-shrink: 0;
}

.honor-title {
  font-weight: 600;
  color: var(--text-main);
}

.honor-sub {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  border-top: 1px solid var(--border-color);
  padding: 30px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
  background-color: var(--bg-alt);
}

.footer a {
  color: var(--text-muted);
  text-decoration: underline;
}

.footer a:hover {
  color: var(--primary-color);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 900px) {
  .main-container {
    flex-direction: column;
    gap: 32px;
  }

  .sidebar {
    width: 100%;
    position: static;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .sidebar__links {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
  }

  .masthead__nav {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: #ffffff;
    flex-direction: column;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
  }

  .masthead__nav.is-open {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }
}

@media (max-width: 680px) {
  .publication-card {
    flex-direction: column;
  }

  .publication-img-wrap {
    width: 100%;
    max-height: 200px;
  }

  .experience-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .experience-date {
    margin-top: 2px;
  }

  .honor-item {
    flex-direction: column;
    gap: 4px;
  }
}