/* ============================================================
   CUSTOM STYLES — Clean Academic Theme for Zexuan Liu
   ============================================================ */

/* --- Base --- */
html {
  scroll-behavior: smooth;
  font-size: 15px;
}

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

/* --- Tighten all headings --- */
h1 { font-size: 1.5rem; font-weight: 700; }
h2 { font-size: 1.2rem; font-weight: 600; }
h3 { font-size: 1.05rem; font-weight: 600; }
h4, h5, h6 { font-size: 0.95rem; font-weight: 600; }

/* --- Masthead --- */
.masthead {
  background: #fff !important;
  border-bottom: 1px solid #e5e7eb;
  box-shadow: none;
}

html[data-theme="dark"] .masthead {
  background: #1a1f2e !important;
  border-bottom-color: #2d3548;
}

.masthead::after { display: none !important; }

.greedy-nav a.site-title {
  font-weight: 700 !important;
  font-size: 1.05rem !important;
  color: #1e3a5f !important;
}

.greedy-nav .visible-links a {
  font-weight: 500;
  font-size: 0.85rem;
  padding: 0.4rem 0.6rem;
  transition: color 0.2s ease;
}

.greedy-nav .visible-links a:hover {
  color: #0d7377 !important;
}

/* --- Author Sidebar --- */
.author__avatar img {
  border-radius: 50% !important;
  border: 2px solid #0d7377 !important;
  padding: 2px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.author__name {
  font-weight: 700 !important;
  font-size: 1rem !important;
}

.author__pronouns {
  font-size: 0.8rem !important;
  color: #0d7377 !important;
  font-weight: 500 !important;
  font-style: normal !important;
}

.author__bio {
  font-size: 0.82rem !important;
  line-height: 1.5;
  color: var(--global-text-color-light);
}

.author__urls-wrapper .btn--inverse { display: none; }

.author__urls.social-icons a {
  font-size: 0.8rem;
  padding: 0.2rem 0;
  color: var(--global-text-color) !important;
  text-decoration: none !important;
}

.author__urls.social-icons a:hover {
  color: #0d7377 !important;
}

.author__urls.social-icons .icon-pad-right {
  margin-right: 0.3em;
  color: #0d7377;
}

/* --- Page Content --- */
.page__content {
  font-size: 0.92rem;
  line-height: 1.7;
}

.page__content p {
  margin-bottom: 0.8rem;
}

.page__content a {
  color: #0d7377;
  text-decoration: none;
  transition: color 0.2s ease;
}

.page__content a:hover {
  text-decoration: underline;
}

/* --- Section headings --- */
.page__content h2 {
  color: #1e3a5f;
  font-size: 1.15rem;
  font-weight: 700;
  margin-top: 1.8rem;
  margin-bottom: 0.6rem;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid #0d7377;
}

.page__content h3 {
  color: #1e3a5f;
  font-size: 0.98rem;
  font-weight: 600;
  margin-top: 1.2rem;
  margin-bottom: 0.4rem;
}

/* --- Section divider --- */
.section-divider {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 1.6rem 0;
}

html[data-theme="dark"] .section-divider {
  border-top-color: #2d3548;
}

/* --- Publication list (numbered like [8], [7]...) --- */
.pub-list {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: pub-counter;
}

.pub-list li {
  position: relative;
  padding: 0.5rem 0 0.5rem 2.2rem;
  border-bottom: 1px solid #f0f0f0;
  counter-increment: pub-counter;
  line-height: 1.55;
  font-size: 0.9rem;
}

html[data-theme="dark"] .pub-list li {
  border-bottom-color: #2d3548;
}

.pub-list li:last-child {
  border-bottom: none;
}

.pub-list li::before {
  content: "[" counter(pub-counter) "]";
  position: absolute;
  left: 0;
  top: 0.5rem;
  font-weight: 600;
  font-size: 0.82rem;
  color: #0d7377;
  font-variant-numeric: tabular-nums;
}

.pub-list .journal {
  font-weight: 600;
  color: #1e3a5f;
}

html[data-theme="dark"] .pub-list .journal {
  color: #93c5fd;
}

.pub-list .year-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.05rem 0.4rem;
  border-radius: 3px;
  background: #e6f4f4;
  color: #0d7377;
  margin-left: 0.2rem;
  vertical-align: middle;
}

html[data-theme="dark"] .pub-list .year-badge {
  background: rgba(45, 212, 191, 0.12);
  color: #2dd4bf;
}

/* --- Working paper status badge --- */
.status-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.1rem 0.45rem;
  border-radius: 3px;
  margin-left: 0.2rem;
}

.status-badge.submitted {
  background: #fef3c7;
  color: #92400e;
}

.status-badge.in-progress {
  background: #dbeafe;
  color: #1e40af;
}

.status-badge.rr {
  background: #dcfce7;
  color: #166534;
}

.status-badge.forthcoming {
  background: #e0e7ff;
  color: #3730a3;
}

/* --- Plain list items (working papers, no counter) --- */
.plain-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.plain-list li {
  padding: 0.4rem 0 0.4rem 1rem;
  border-bottom: 1px solid #f0f0f0;
  position: relative;
  line-height: 1.55;
  font-size: 0.9rem;
}

html[data-theme="dark"] .plain-list li {
  border-bottom-color: #2d3548;
}

.plain-list li:last-child {
  border-bottom: none;
}

.plain-list li::before {
  content: '\2013';
  position: absolute;
  left: 0;
  color: #9ca3af;
}

/* --- Data highlight box --- */
.highlight-box {
  background: #f8fafb;
  border: 1px solid #e5e7eb;
  border-left: 3px solid #0d7377;
  border-radius: 4px;
  padding: 0.7rem 1rem;
  margin: 0.6rem 0;
  font-size: 0.88rem;
}

html[data-theme="dark"] .highlight-box {
  background: #242b3d;
  border-color: #2d3548;
  border-left-color: #2dd4bf;
}

.highlight-box a {
  font-weight: 500;
}

/* --- Funding block --- */
.funding-block {
  border-left: 3px solid #0d7377;
  padding: 0.5rem 1rem;
  margin: 0.5rem 0;
  font-size: 0.88rem;
  line-height: 1.55;
}

/* --- CV entry --- */
.cv-entry {
  padding: 0.35rem 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.9rem;
}

html[data-theme="dark"] .cv-entry {
  border-bottom-color: #2d3548;
}

.cv-entry:last-child {
  border-bottom: none;
}

.cv-entry .cv-title {
  font-weight: 600;
  color: var(--global-text-color);
}

.cv-entry .cv-meta {
  font-size: 0.82rem;
  color: var(--global-text-color-light);
  margin-top: 0.1rem;
}

/* --- Conference list --- */
.conf-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.conf-list li {
  padding: 0.3rem 0;
  font-size: 0.88rem;
  line-height: 1.55;
}

.conf-list .conf-year {
  font-weight: 700;
  color: #1e3a5f;
  min-width: 3rem;
  display: inline-block;
}

html[data-theme="dark"] .conf-list .conf-year {
  color: #93c5fd;
}

/* --- Skills / tags --- */
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.3rem;
}

.skill-tag {
  display: inline-block;
  background: #e6f4f4;
  color: #0d7377;
  padding: 0.15rem 0.55rem;
  border-radius: 3px;
  font-size: 0.78rem;
  font-weight: 500;
}

html[data-theme="dark"] .skill-tag {
  background: rgba(45, 212, 191, 0.12);
  color: #2dd4bf;
}

/* --- Intro quote --- */
.page-motto {
  font-style: italic;
  font-size: 0.88rem;
  color: var(--global-text-color-light);
  border-left: 3px solid #0d7377;
  padding: 0.4rem 1rem;
  margin: 0 0 1.2rem 0;
  line-height: 1.5;
}

/* --- Footer --- */
.page__footer {
  border-top: 1px solid #e5e7eb;
}

html[data-theme="dark"] .page__footer {
  border-top-color: #2d3548;
}

.page__footer-copyright {
  font-size: 0.75rem;
  opacity: 0.7;
}

/* --- Archive pages --- */
.archive__item-title {
  font-size: 0.95rem;
  font-weight: 600;
}

.archive__item-title a {
  text-decoration: none !important;
  color: #1e3a5f;
}

.archive__item-title a:hover {
  color: #0d7377;
}

/* --- Remove heavy card styling (keep classes for backward compat) --- */
.section-card {
  background: none;
  border-radius: 0;
  padding: 0;
  margin-bottom: 0;
  box-shadow: none;
  border: none;
}

.section-card:hover {
  box-shadow: none;
  transform: none;
}

.section-card h2 {
  margin-top: 1.8rem !important;
}

.section-card:first-of-type h2 {
  margin-top: 0 !important;
}

/* --- Responsive --- */
@media screen and (max-width: 768px) {
  html { font-size: 14px; }

  .page__content h2 { font-size: 1.05rem; }

  .pub-list li { padding-left: 1.8rem; }
}

/* --- Smooth page entry --- */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

#main .page {
  animation: fadeIn 0.3s ease-out both;
}

/* --- Print --- */
@media print {
  .masthead, .sidebar, .page__footer {
    display: none !important;
  }
  .page {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }
}
