/* Custom styles for Xinyan Ye's academic homepage
   Glacial blue. Darks are one midnight-navy family, not the gray-green steel.

   Mountain light: #A6B5D2 mist, #B0CBE6 frost, #6BA3BE glacier
   Midnight navy:  #0C1A34 ink, #12284A navy, #1A4A78 steel
*/

:root {
  --navy: #12284A;
  --slate: #3D6294;
  --mist: #A6B5D2;
  --frost: #B0CBE6;

  --ink: #0C1A34;
  --fjord: #102444;
  --steel: #1A4A78;
  --glacier: #6BA3BE;

  --text-main: #13263C;
  --text-muted: #3A5672;

  --bg-card: #ffffff;
  --border-light: rgba(166, 181, 210, 0.5);
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Noto Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  color: var(--text-main);
  margin: 0;
  padding: 0;
  background-color: #FFFFFF;
  background-image:
    radial-gradient(900px 420px at 0% -12%, rgba(176, 203, 230, 0.09), transparent 72%),
    linear-gradient(180deg, #F8FBFD 0%, #FCFDFE 22%, #FFFFFF 58%);
  background-attachment: fixed;
}

::selection {
  background: var(--frost);
  color: var(--ink);
}

/* ==================== Top Navbar ==================== */
.top-nav {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 999;
  height: 56px;
  background-color: rgba(255, 255, 255, 0.84);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid var(--border-light);
  box-shadow: 0 8px 24px -14px rgba(12, 26, 52, 0.28);
  display: flex;
  align-items: center;
}

.top-nav .nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.top-nav .nav-brand {
  font-family: 'Google Sans', 'Noto Sans', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
  transition: color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.top-nav .nav-brand:hover {
  color: var(--steel);
}

.top-nav .nav-links {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.top-nav .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--slate);
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.top-nav .nav-link i {
  font-size: 0.82rem;
  color: var(--glacier);
  transition: color 0.2s ease;
}

.top-nav .nav-link:hover {
  color: var(--navy);
  background-color: rgba(176, 203, 230, 0.38);
}

.top-nav .nav-link:hover i {
  color: var(--navy);
}

@media screen and (max-width: 640px) {
  .top-nav {
    height: 48px;
  }
  .top-nav .nav-brand {
    font-size: 1rem;
  }
  .top-nav .nav-link {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    gap: 0.25rem;
  }
}

/* ==================== 2-Column Academic Grid ==================== */
.main-wrapper {
  max-width: 1140px;
  margin: 2rem auto;
  padding: 0 1.25rem;
}

.academic-layout {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 2.5rem;
}

.sidebar-column {
  width: 290px;
  min-width: 290px;
  flex-shrink: 0;
}

.content-column {
  flex-grow: 1;
  min-width: 0;
}

/* Desktop Sticky Sidebar */
@media screen and (min-width: 861px) {
  .sticky-sidebar {
    position: -webkit-sticky;
    position: sticky;
    top: 4.8rem;
  }
}

/* Mobile & Tablet Stacking */
@media screen and (max-width: 860px) {
  .academic-layout {
    flex-direction: column;
    gap: 1.5rem;
  }
  .sidebar-column {
    width: 100%;
    min-width: 100%;
  }
  .sticky-sidebar {
    position: static !important;
  }
}

/* ==================== Profile Card ==================== */
.profile-card {
  text-align: center;
  padding: 1.85rem 1.35rem;
  background: var(--bg-card);
  border-radius: 18px;
  box-shadow: 0 14px 34px -12px rgba(12, 26, 52, 0.18), 0 2px 6px -1px rgba(12, 26, 52, 0.05);
  border: 1px solid var(--border-light);
  transition: box-shadow 0.3s ease;
}

.profile-card:hover {
  box-shadow: 0 18px 40px -12px rgba(12, 26, 52, 0.28);
}

.profile-photo-wrapper {
  width: 150px;
  height: 150px;
  margin: 0 auto 1.15rem;
}

.profile-photo {
  width: 150px;
  height: 150px;
  max-width: 150px;
  max-height: 150px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 3.5px solid #ffffff;
  outline: 2px solid var(--frost);
  box-shadow: 0 10px 24px -8px rgba(12, 26, 52, 0.38);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), outline-color 0.3s ease;
}

.profile-card:hover .profile-photo {
  transform: scale(1.035);
  outline-color: var(--glacier);
}

.profile-name {
  font-family: 'Google Sans', 'Noto Sans', sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.3rem;
  letter-spacing: -0.01em;
}

.profile-name-zh {
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--slate);
  margin-left: 0.2rem;
}

.profile-badge-container {
  margin-bottom: 0.8rem;
}

.profile-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: linear-gradient(135deg, rgba(176, 203, 230, 0.45) 0%, rgba(166, 181, 210, 0.32) 100%);
  color: var(--navy);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.22rem 0.8rem;
  border-radius: 20px;
  border: 1px solid rgba(107, 163, 190, 0.55);
  letter-spacing: 0.01em;
}

.profile-affil {
  font-size: 0.88rem;
  color: var(--slate);
  line-height: 1.45;
  margin-bottom: 1.15rem;
}

.profile-affil .dept {
  color: var(--steel);
  font-weight: 500;
}

.profile-affil .univ a {
  color: var(--navy);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s ease;
}

.profile-affil .univ a:hover {
  color: var(--steel);
  text-decoration: underline;
}

/* Social Quick Icon Bar */
.social-icon-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1.15rem;
  border-bottom: 1px solid var(--border-light);
}

.social-icon-btn {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(176, 203, 230, 0.28);
  color: var(--steel);
  border: 1px solid rgba(166, 181, 210, 0.55);
  font-size: 0.9rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.social-icon-btn:hover {
  background: linear-gradient(145deg, var(--navy) 0%, var(--steel) 100%);
  color: #ffffff;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(12, 26, 52, 0.28);
}

/* Supervisors Box */
.profile-supervisors-box {
  background: linear-gradient(180deg, rgba(176, 203, 230, 0.36) 0%, rgba(166, 181, 210, 0.16) 100%);
  border: 1px solid var(--border-light);
  border-left: 3.5px solid var(--glacier);
  border-radius: 12px;
  padding: 0.8rem 0.95rem;
  margin-bottom: 1.15rem;
  text-align: left;
}

.supervisor-label {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--steel);
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.supervisor-label i {
  color: var(--navy);
}

.supervisor-item {
  margin-bottom: 0.3rem;
}

.supervisor-item:last-child {
  margin-bottom: 0;
}

.supervisor-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--navy);
  text-decoration: none;
  padding: 0.2rem 0.35rem;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.supervisor-link i {
  font-size: 0.68rem;
  color: var(--glacier);
  transition: all 0.15s ease;
}

.supervisor-link:hover {
  color: var(--steel);
  background-color: rgba(255, 255, 255, 0.55);
}

.supervisor-link:hover i {
  color: var(--navy);
  transform: translate(2px, -2px);
}

/* Sidebar Details List */
.sidebar-details-list {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
}

.sidebar-details-list li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.32rem 0;
  font-size: 0.85rem;
  color: var(--slate);
}

.sidebar-details-list .detail-icon {
  width: 18px;
  color: var(--glacier);
  text-align: center;
  flex-shrink: 0;
  font-size: 0.85rem;
}

.sidebar-details-list .detail-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-details-list .detail-text a {
  color: var(--navy);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
}

.sidebar-details-list .detail-text a:hover {
  color: var(--steel);
  text-decoration: underline;
}

/* ==================== Right Content Column ==================== */
.section-title {
  font-family: 'Google Sans', 'Noto Sans', sans-serif;
  font-weight: 700;
  font-size: 1.45rem;
  padding-bottom: 6px;
  margin-top: 0;
  margin-bottom: 1.25rem;
  position: relative;
  display: inline-block;
  color: var(--ink);
}

.section-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--navy) 0%, var(--steel) 36%, var(--glacier) 72%, var(--frost) 100%);
  border-radius: 2px;
}

.content-block {
  margin-bottom: 2.75rem;
  scroll-margin-top: 5.5rem;
}

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

.content strong {
  color: var(--navy);
}

/* ---- About Section ---- */
.about-content {
  font-size: 1.02rem;
  line-height: 1.8;
  color: var(--text-main);
}

.about-content a {
  color: var(--steel);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s ease;
}

.about-content a:hover {
  color: var(--navy);
  text-decoration: underline;
  text-decoration-color: var(--glacier);
}

/* ---- Research Interest Tags ---- */
.research-tag {
  display: inline-block;
  background: linear-gradient(168deg, var(--ink) 0%, var(--navy) 46%, #1C5284 100%);
  color: #ffffff;
  padding: 5px 14px;
  border-radius: 20px;
  margin: 3px 4px 3px 0;
  font-size: 0.84rem;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(12, 26, 52, 0.18);
  border: 1px solid rgba(176, 203, 230, 0.28);
  transition: all 0.25s ease;
}

.research-tag:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(12, 26, 52, 0.24);
  background: linear-gradient(168deg, #16325C 0%, #1C5284 100%);
}

/* ---- News Section ---- */
.news-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}

.news-date {
  font-weight: 700;
  color: var(--steel);
  min-width: 95px;
  font-size: 0.88rem;
  letter-spacing: 0.01em;
}

#toggle-news-btn {
  background: rgba(176, 203, 230, 0.35);
  color: var(--navy);
  border: 1px solid rgba(107, 163, 190, 0.65);
  font-weight: 600;
  transition: all 0.2s ease;
}

#toggle-news-btn:hover {
  background: linear-gradient(145deg, var(--navy) 0%, var(--steel) 100%);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(12, 26, 52, 0.22);
}

/* ---- Publication Cards ---- */
.publication-entry {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 20px 22px;
  margin-bottom: 18px;
  box-shadow: 0 8px 22px -14px rgba(12, 26, 52, 0.28);
  transition: all 0.25s ease;
  border-left: 4px solid var(--glacier);
  border-top: 1px solid var(--border-light);
  border-right: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.publication-entry:hover {
  box-shadow: 0 14px 28px -12px rgba(12, 26, 52, 0.28);
  border-left-color: var(--navy);
  transform: translateY(-2px);
}

.pub-title {
  font-family: 'Google Sans', 'Noto Sans', sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink);
  margin-bottom: 6px;
  line-height: 1.42;
}

.pub-authors {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.pub-authors a {
  color: var(--steel);
  text-decoration: none;
}

.pub-authors a:hover {
  color: var(--navy);
  text-decoration: underline;
}

.pub-authors .me {
  font-weight: 700;
  color: var(--navy);
  text-decoration: underline;
  text-decoration-color: var(--glacier);
  text-underline-offset: 3px;
}

.pub-venue {
  font-size: 0.86rem;
  color: var(--slate);
  margin-bottom: 9px;
}

.pub-venue .venue-badge {
  display: inline-block;
  background: linear-gradient(168deg, var(--ink) 0%, var(--navy) 58%, #1C5284 100%);
  color: #ffffff;
  padding: 2.5px 9px;
  border-radius: 5px;
  font-style: normal;
  font-weight: 600;
  font-size: 0.76rem;
  letter-spacing: 0.02em;
  margin-right: 6px;
  border: 1px solid rgba(176, 203, 230, 0.28);
}

.pub-abstract {
  color: var(--text-muted);
  margin-bottom: 12px;
}

.pub-buttons .button.is-dark {
  margin-right: 6px;
  margin-bottom: 6px;
  background: linear-gradient(180deg, #18345C 0%, var(--ink) 100%);
  color: #ffffff;
  border: 1px solid var(--ink);
  transition: all 0.2s ease;
}

.pub-buttons .button.is-dark:hover {
  background: linear-gradient(145deg, var(--steel) 0%, var(--slate) 100%);
  border-color: transparent;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(12, 26, 52, 0.24);
}

/* ---- Experience Timeline ---- */
.experience-entry {
  position: relative;
  padding-left: 24px;
  padding-bottom: 20px;
  border-left: 2px solid rgba(166, 181, 210, 0.85);
}

.experience-entry::before {
  content: '';
  position: absolute;
  left: -6.5px;
  top: 6px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--navy);
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 2.5px var(--frost);
}

.exp-title {
  font-family: 'Google Sans', 'Noto Sans', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
}

.exp-org {
  font-size: 0.9rem;
  color: var(--steel);
  font-weight: 600;
}

.exp-date {
  font-size: 0.82rem;
  color: var(--slate);
}

.exp-detail {
  color: var(--text-muted);
  margin-top: 4px;
}

/* ---- Footer ---- */
.footer {
  background-color: #FBFCFD;
  border-top: 1px solid var(--border-light);
  padding: 2rem 1.5rem;
  margin-top: 3.5rem;
}

.footer-note {
  color: var(--slate);
  font-size: 0.85rem;
}

.footer a {
  color: var(--navy);
  text-decoration: none;
}

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

/* Google Sans fallback */
@font-face {
  font-family: 'Google Sans';
  src: local('Google Sans'), local('ProductSans-Regular');
  font-weight: 400;
}

@font-face {
  font-family: 'Google Sans';
  src: local('Google Sans Bold'), local('ProductSans-Bold');
  font-weight: 700;
}
