/* ============================================================
   Custom visual polish for Xiaoqian Shen's homepage
   Loaded last so it overrides the base Minimal Light theme.
   ============================================================ */

:root {
  --accent: #043361;
  --accent-soft: #1b6fb3;
  --hover: #ffb81c;
  --card-bg: #f8f9fb;
  --card-border: #eceef3;
}

/* --- Global feel --- */
html { scroll-behavior: smooth; }

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.62;
}

a { transition: color 0.2s ease; }

/* --- Profile avatar --- */
.image.avatar img {
  width: 80% !important;
  padding: 0 !important;
  box-shadow: 0 6px 22px rgba(4, 51, 97, 0.18);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.image.avatar img:hover {
  transform: scale(1.04);
  box-shadow: 0 10px 28px rgba(4, 51, 97, 0.28);
}

/* --- Header text --- */
header h1 {
  letter-spacing: 0.3px;
  margin-bottom: 8px;
}
header position { color: #555; }
header email   { color: #777; }

/* --- Social icons --- */
.social-icons a {
  border: 1px solid rgba(4, 51, 97, 0.15);
  line-height: 2.3rem !important;
  transition: all 0.25s ease;
}
.social-icons a:hover {
  background-color: var(--accent) !important;
  color: #fff !important;
  border-color: var(--accent);
  transform: translateY(-2px) scale(1.08);
}

/* --- News: soft card + date pills + fade-out hint --- */
.news-wrap { position: relative; margin-bottom: 20px; }

.news-list {
  list-style: none;
  margin: 0;
  padding: 8px 18px;
  height: 132px;            /* fallback before JS computes the 3-item height */
  overflow-y: hidden;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  transition: height 0.45s ease-in-out;
  box-sizing: border-box;
}

.news-list li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 7px 0;
  margin: 0;
  line-height: 1.5;
}

.news-date {
  flex: 0 0 auto;
  width: 70px;
  text-align: center;
  font-size: 0.70rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--accent);
  background: rgba(4, 51, 97, 0.08);
  border-radius: 6px;
  padding: 3px 6px;
  white-space: nowrap;
}

.news-body { flex: 1 1 auto; }

/* --- Research interests: paper chips --- */
.interest-list { padding-left: 20px; }
.interest-list li { margin-bottom: 12px; }

.paper-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 6px 6px 0 0;
  padding: 3px 5px 3px 11px;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  font-size: 0.86rem;
  line-height: 1.4;
  color: var(--accent) !important;
  background: #fff;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.paper-chip:hover {
  border-color: var(--accent-soft);
  background: var(--card-bg);
  transform: translateY(-1px);
}
.paper-chip .conf {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: #fff;
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 2px 7px;
}

/* --- Publications (compact) --- */
.publications { margin-top: 1rem; }

.publications ol.bibliography li {
  min-height: 0;
  padding: 8px 10px;
  margin-bottom: 0;
  border-radius: 12px;
  transition: background 0.25s ease, box-shadow 0.25s ease;
}
.publications ol.bibliography li:hover {
  background: var(--card-bg);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.07);
}

/* tighten the teaser + its column */
.publications ol.bibliography li .abbr { height: auto; margin-bottom: 0; }
.publications ol.bibliography li .teaser { height: 120px; margin: 0; }

/* tighter text rows */
.publications ol.bibliography li .periodical { margin-bottom: 2px; }
.publications ol.bibliography li .links { margin-top: 2px; }
.publications ol.bibliography li .teaser {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.publications ol.bibliography li:hover .teaser {
  transform: scale(1.02);
  box-shadow: 2px 2px 10px rgba(35, 35, 35, 0.22);
}

/* Badges */
.badge {
  border-radius: 6px !important;
  letter-spacing: 0.4px;
}

/* Link buttons */
.publications ol.bibliography li .links a.btn {
  border-radius: 6px;
  transition: all 0.2s ease;
}

/* ============================================================
   Dark mode adjustments
   ============================================================ */
@media (prefers-color-scheme: dark) {
  :root {
    --card-bg: #272935;
    --card-border: #343745;
  }

  .image.avatar img {
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45);
  }
  .image.avatar img:hover {
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.6);
  }

  header position { color: #b8bac4; }
  header email    { color: #9a9cab; }

  .social-icons a {
    border-color: rgba(62, 183, 240, 0.3);
  }
  .social-icons a:hover {
    background-color: #3eb7f0 !important;
    color: #20212b !important;
    border-color: #3eb7f0;
  }

  .publications ol.bibliography li:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
  }

  .news-date {
    color: #6fd0ff;
    background: rgba(62, 183, 240, 0.14);
  }

  .paper-chip {
    color: #cdd0da !important;
    background: transparent;
    border-color: #3a3d4c;
  }
  .paper-chip:hover {
    border-color: #3eb7f0;
    background: var(--card-bg);
  }
  .paper-chip .conf {
    color: #20212b;
    background: #3eb7f0;
  }
}
