/*
 * Typography & colors aligned with Fei Xue / Jon Barron-style academic pages
 * Reference: https://github.com/feixue94/feixue94.github.io — stylesheet.css + index.html
 * Lato + Noto Serif SC are loaded in _layouts/barron.html.
 * Latin uses Lato; CJK (e.g. name) falls through to Noto Serif SC.
 */

html {
  background-color: #ffffff;
  color: #333333;
}

a {
  color: #0056b3;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:focus,
a:hover {
  color: #d9230f;
  text-decoration: none;
}

body,
td,
th,
tr,
p,
li {
  font-family: "Lato", Verdana, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.6;
}

body {
  margin: 0;
  padding: 0 0 2.5rem;
  -webkit-font-smoothing: antialiased;
}

strong {
  font-family: "Lato", Verdana, Helvetica, sans-serif;
  font-size: 14px;
}

/* Fei uses custom <heading> for section titles; we style h2 the same role */
heading,
h1 {
  font-family: "Lato", Verdana, Helvetica, sans-serif;
}

h1 {
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 0.65rem;
  color: #111111;
}

h2 {
  font-family: "Lato", Verdana, Helvetica, sans-serif;
  font-size: 24px;
  font-weight: 700;
  margin: 1.5em 0 0.5em;
  padding: 0 0 0.2em 0;
  border-bottom: 1px solid #f0f0f0;
  color: #111111;
}

h2:first-of-type {
  margin-top: 0.85em;
}

h3 {
  font-family: "Lato", Verdana, Helvetica, sans-serif;
  font-size: 17px;
  font-weight: 700;
  margin: 1.2em 0 0.35em;
  color: #111111;
}

papertitle {
  font-family: "Lato", Verdana, Helvetica, sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: #111111;
  display: block;
  margin-bottom: 0.25rem;
  line-height: 1.4;
}

name {
  font-family: "Lato", "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  font-size: 38px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.02em;
  color: #111111;
}

span.highlight {
  background-color: #ffffd0;
}

/* --- Shell (Fei: outer table max-width 900px centered) --- */

.barron-wrap {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 36px 4% 48px;
  box-sizing: border-box;
}

.barron-nav {
  font-family: "Lato", Verdana, Helvetica, sans-serif;
  font-size: 14px;
  margin: 0 0 32px;
  padding-bottom: 14px;
  border-bottom: 1px solid #eaeaea;
}

.barron-nav a {
  margin-right: 18px;
  white-space: nowrap;
  color: #555555;
}

.barron-nav a:hover {
  color: #111111;
}

.barron-nav .barron-nav-name {
  color: #111111;
  font-family: "Lato", "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  font-size: 16px;
  font-weight: 700;
  margin-right: 24px;
  letter-spacing: 0.02em;
}

.barron-page-header {
  margin-bottom: 14px;
}

.barron-page-header h1 {
  font-size: 22px;
}

.barron-footer {
  margin-top: 3rem;
  padding-top: 20px;
  border-top: 1px solid #eaeaea;
  font-family: "Lato", "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  font-size: 13px;
  color: #777;
}

.barron-footer-line {
  margin: 0;
}

.barron-footer-updated {
  margin-top: 8px;
  font-size: 12px;
  color: #999;
}

.barron-footer a {
  color: #555;
  transition: color 0.2s ease;
}

.barron-footer a:hover {
  color: #111;
}

/* --- Intro row: text left (~63%), photo right (~40%), Fei spacing --- */

.barron-intro {
  width: 100%;
  border: 0;
  border-collapse: separate;
  border-spacing: 0;
  margin: 0 0 8px;
}

.barron-intro > tbody > tr > td {
  padding: 2.5%;
  vertical-align: middle;
  border: 0;
}

.barron-intro .fei-intro-text {
  width: 63%;
}

.barron-intro .fei-intro-photo {
  width: 40%;
  max-width: 40%;
  text-align: center;
}

.barron-intro .fei-intro-name {
  text-align: left;
  margin: 0 0 0.6rem;
}

.barron-intro .fei-intro-ipa {
  display: block;
  margin: 0.25rem 0 0;
  font-family: "Lato", "Noto Sans", "DejaVu Sans", sans-serif;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.03em;
  color: #666;
}

.barron-intro .fei-intro-text > p {
  margin: 0 0 1rem;
}

.barron-intro .fei-intro-links {
  text-align: left;
  margin-bottom: 0;
  font-size: 14px;
}

.barron-intro .fei-intro-links .fei-intro-link-icon {
  margin-right: 0.35em;
  width: 1.15em;
  text-align: center;
  display: inline-block;
}

.barron-link-sep {
  color: #999;
  padding: 0 0.4em;
  font-weight: 400;
  user-select: none;
}

.barron-visitor-map {
  margin-top: 0.25rem;
  margin-bottom: 0.75rem;
  /* 比默认 widget 略窄，不用 scale（易把 iframe 压成一条线） */
  width: 100%;
  max-width: 252px;
}

.barron-visitor-map iframe {
  display: block;
  width: 100% !important;
  max-width: 100%;
  /* 约 3:2，与常见 ClustrMaps 比例接近 */
  height: 168px !important;
  border: 0;
}

.barron-visitor-map-hint {
  font-size: 12px;
  line-height: 1.5;
  color: #666;
  margin: 0;
  max-width: 42em;
}

.barron-visitor-map-hint code {
  font-size: 11px;
  background: #eee;
  padding: 1px 4px;
  border-radius: 3px;
}

/*
 * Profile photo: Jiawei Ren–style circular headshot, fills right column
 * Ref: https://jiawei-ren.github.io/ — img width 100% + myphoto-circle.png
 * Here: CSS circle + object-fit so a normal rectangular photo works too.
 */
.barron-intro .fei-intro-photo a {
  display: block;
  width: 75%;
  max-width: 200px;
  margin: 0 auto;
  line-height: 0;
  border: 0;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.barron-intro .fei-intro-photo a:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  transform: scale(1.02) translateY(-2px);
}

.barron-intro .fei-intro-photo img {
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center;
  border: 0;
  display: block;
  vertical-align: middle;
}

/* --- Lists (Education, News-style blocks) --- */

main ul {
  margin: 0.25rem 0 0.85rem;
  padding-left: 1.5rem;
}

main li {
  margin: 0.2rem 0;
}

/* --- Publication tables (match Fei / original inline 25% / 75%, padding 20px) --- */

.barron-pubs table {
  width: 100%;
  border: 0;
  border-spacing: 0;
  border-collapse: separate;
  margin: 0 auto 12px;
  border-radius: 12px;
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

.barron-pubs table:hover {
  background-color: #fcfcfc;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.barron-pubs td {
  padding: 24px !important;
  vertical-align: middle !important;
  border: 0 !important;
}

.barron-pubs td:first-child {
  width: 25% !important;
}

.barron-pubs td:last-child {
  width: 75% !important;
}

.barron-pubs img {
  width: 100%;
  max-width: 100%;
  height: auto;
  border: 0;
  display: block;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.barron-pubs table:hover img {
  transform: scale(1.03);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

iframe {
  max-width: 100%;
}

/* Projects list */
.barron-project-title {
  font-family: "Lato", Verdana, Helvetica, sans-serif;
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 0.5rem;
  border: 0;
  padding: 0;
}

@media (max-width: 640px) {
  name {
    font-size: 28px;
  }

  .barron-intro .fei-intro-name {
    text-align: center;
  }

  .barron-intro .fei-intro-links {
    text-align: center;
  }

  .barron-intro > tbody > tr,
  .barron-intro > tbody > tr > td {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
  }

  .barron-intro .fei-intro-photo {
    padding-top: 12px;
  }

  .barron-intro .fei-intro-photo a {
    width: 65%;
    max-width: min(200px, 58vw);
  }

  .barron-pubs tr,
  .barron-pubs tbody {
    display: block;
  }

  .barron-pubs tr {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e0e0e0;
  }

  .barron-pubs td {
    display: block;
    width: 100% !important;
    padding: 10px 0 !important;
  }

  .barron-pubs img {
    max-width: 200px;
  }
}
