/* Match erdemtbao_old.github.io / tianxingchen.github.io layout and style */

/* Default page zoom: 100% */
html { zoom: 1; }

/* Sidebar: no horizontal scroll, school name wraps, links always visible and clickable */
.sidebar { overflow-x: hidden; }
/* Sidebar: force wider width so long text (e.g. HUST, research) fits on fewer lines */
@media (min-width: 925px) {
  .layout-home-old .sidebar {
    width: 320px !important;
    max-width: 320px !important;
  }
  .layout-home-old .page {
    margin-left: 340px !important;  /* 320px sidebar + 20px gutter */
  }
}
/* Sidebar: add left padding so personal info is not flush against viewport edge */
.layout-home-old .sidebar {
  padding-left: 2.0em;
}
@media (min-width: 925px) {
  .layout-home-old .sidebar {
    padding-left: 4.0em;
  }
}
.sidebar .author__links.sidebar-links {
  display: block !important;
  position: relative !important;
  margin: 0;
  padding: 0;
  border: 0;
  box-shadow: none;
  z-index: 1;
  list-style: none;
}
.sidebar .author__links a {
  display: inline-block;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  pointer-events: auto;
}
.sidebar .author__links a:hover { text-decoration: underline; }
.sidebar .author__employer-text { white-space: normal; word-wrap: break-word; display: inline; }

/* Home (old-style) wider main, Georgia serif like jemdoc/tianxingchen */
/* Theme: #main gets max-width 1280px at (min-width: 1280px) and container() may add 925px; force override */
.layout-home-old #main {
  max-width: 2000px !important;
  width: 100% !important;
}
@media (min-width: 1280px) {
  .layout-home-old #main {
    max-width: 2000px !important;
  }
}
/* Ensure article ( .page ) can use full width of #main - theme uses span(10 of 12) */
.layout-home-old .page {
  max-width: none !important;
}
.home-old__main {
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding: 0 32px;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 15px;
  line-height: 1.6;
  color: #000;
}
.home-old__main .page__inner-wrap { max-width: none; }
.home-old__main .page__content--full { padding: 0; }
/* Publication titles: no underline */
.home-old__main .tb-publications a[href*="/publication/"] { text-decoration: none; }
.home-old__main .tb-publications a[href*="/publication/"]:hover { text-decoration: underline; }
.home-hero h1 { font-size: 1.75em; margin: 0; }
.home-hero table { border: none; }
.home-hero td { border: none; }

/* Publication tables like old site */
.tb-publications { border-collapse: collapse; margin-top: 0; margin-bottom: 0; }
.tb-publications td { vertical-align: middle; }
/* Publications: uniform thumbnail size for alignment */
.tb-publications .pub-thumb-wrap {
  width: 180px;
  height: 100px;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 4px 4px 4px #888888;
}
.tb-publications .pub-thumb-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.tb-education { border-collapse: collapse; }
.tb-education td { border: none; vertical-align: middle; }
.tb-education td:first-child { width: 260px !important; padding-right: 16px; }
.tb-education td:first-child img { margin-left: 10px !important; }
.tb-education td p { margin: 0 0 2px 0; line-height: 1.35; }
.tb-education td div { margin: 0; line-height: 1.4; }
.tb-education td p + div,
.tb-education td div + div { margin-top: 1px; }
.tb-challenge { border-collapse: collapse; }
.tb-challenge td { border: none; vertical-align: middle; }
.tb-challenge td > b { color: #054095; }
.tb-challenge td p { margin: 0 0 0 0; }
.tb-challenge td div[style*="font-size: small"] { margin-top: 2px; }

/* Section headings like old site (jemdoc: color #054095, font-size 125%) */
.page__content h1,
.page__content h2 {
  color: #054095;
  margin-top: 0.7em;
  margin-bottom: 0.5em;
  padding-top: 0.8em;
  padding-bottom: 0.2em;
  font-size: 125%;
  line-height: 1.2;
  border-bottom: none;
}
.page__content h1:first-of-type,
.page__content h2:first-of-type { margin-top: -10px; padding-top: 0; }
.page__content h1 { font-size: 165%; padding-bottom: 0.3em; }
.page__content h2#about-me { font-size: 165%; }

/* Spacing between sections */
.page__content .section-block { margin-bottom: 1.5em; }
.page__content .section-block + h2 { margin-top: 1.8em; }

/* Award grid (Honors) - 3 columns, card style */
.award-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 12px 0 24px;
}
.award-card {
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.award-card img {
  height: 140px;
  width: auto;
  display: block;
  box-shadow: 2px 2px 2px rgba(0,0,0,0.25);
}
.award-text {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.35;
  max-width: 90%;
}
@media (max-width: 900px) {
  .award-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .award-grid { grid-template-columns: 1fr; }
}

/* Content tables - clean, like old site */
.page__content table {
  border-collapse: collapse;
  width: 100%;
  margin-top: 10px;
  margin-bottom: 20px;
}
.page__content table td {
  vertical-align: middle;
  padding: 8px 4px;
}
.page__content table img {
  border-radius: 4px;
  max-width: 100%;
}

/* Publication-style rows (optional) */
.pub-row {
  display: table;
  width: 100%;
  margin-bottom: 16px;
  padding: 10px 0;
}
.pub-row:nth-of-type(odd) { background-color: #ffffdf; }
.pub-thumb {
  display: table-cell;
  width: 200px;
  padding-right: 12px;
  vertical-align: middle;
}
.pub-thumb img, .pub-thumb video {
  width: 180px;
  max-width: 100%;
  box-shadow: 4px 4px 4px #888;
  border-radius: 4px;
}
.pub-info { display: table-cell; vertical-align: middle; }
.pub-title { font-size: 15px; color: #054095; font-weight: bold; margin-bottom: 4px; }
.pub-meta { font-size: 12px; color: #333; }

/* Challenge award rows - image left, text right */
.challenge-row {
  display: table;
  width: 100%;
  margin-bottom: 20px;
}
.challenge-row img {
  width: 150px;
  box-shadow: 4px 4px 8px #888;
  margin-right: 16px;
  vertical-align: middle;
}
.challenge-row > div { display: table-cell; vertical-align: middle; }

/* Body text size like old site */
.page__content p, .page__content li { font-size: 15px; line-height: 1.6; }

/* Unified link color for all hyperlinks in main content */
.layout-home-old .page__content a,
.layout-home-old .home-old__main a {
  color: #054095 !important;
}
.layout-home-old .page__content a:hover,
.layout-home-old .home-old__main a:hover {
  color: #054095 !important;
  opacity: 0.85;
}

/* Blog section: pill-style link (overrides unified link color above) */
.layout-home-old .page__content a.blog-badge-link,
.layout-home-old .home-old__main a.blog-badge-link {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 8px;
  background-color: #054095;
  color: #fff !important;
  text-decoration: none !important;
  font-weight: bold;
  opacity: 1;
}
.layout-home-old .page__content a.blog-badge-link:hover,
.layout-home-old .home-old__main a.blog-badge-link:hover {
  color: #fff !important;
  background-color: #043a7a;
  opacity: 1;
  text-decoration: none !important;
}
