/* =========================================================
   Jiayao Zhang  张嘉瑶 — Personal Academic Website
   Google Sites Exact Proportion Theme (Larger Images, Refined Typography)
   ========================================================= */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --page-bg: #e1dfdb;
  --text-color: #212121;
  --topbar-bg: #1b1b1b;
  --topbar-text: #e1dfdb;
  --link-color: #212121;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Open Sans', Arial, sans-serif;
  --max-width: 1200px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--page-bg);
  color: var(--text-color);
  font-size: 13.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ==================== TOPBAR ==================== */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 50px;
  background-color: var(--topbar-bg);
  z-index: 1000;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
}

.topbar-brand {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 700;
  color: #e1dfdb;
  text-decoration: none;
  letter-spacing: 0px;
  white-space: nowrap;
}

.topbar-brand:hover {
  color: #ffffff;
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.topbar-link {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 400;
  color: #bdbbb5;
  text-decoration: none;
  transition: color 0.15s ease;
}

.topbar-link:hover {
  color: #ffffff;
}

.topbar-link.active {
  color: #ffffff;
  font-weight: 700;
}

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background-color: #ffffff;
  margin: 4px 0;
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 50px; left: 0; right: 0;
  background-color: var(--topbar-bg);
  z-index: 999;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 0;
}

.mobile-menu.open {
  display: block;
}

.mobile-link {
  display: block;
  padding: 10px 24px;
  color: #bdbbb5;
  text-decoration: none;
  font-size: 13px;
}

.mobile-link.active, .mobile-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

/* ==================== HERO BANNER ==================== */
.hero-banner {
  margin-top: 50px;
  position: relative;
  height: 220px;
  background-size: cover;
  background-position: center 30%;
  display: flex;
  align-items: center;
}

.hero-banner-home {
  background-image: url('background.jpg');
}

.hero-banner-sub {
  background-image: url('background2.png');
  background-position: center 45%;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.15);
}

.hero-container {
  position: relative;
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
  padding: 0 32px;
  z-index: 1;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

/* ==================== PAGE WRAPPER ==================== */
.page-wrapper {
  background-color: var(--page-bg);
  width: 100%;
  min-height: calc(100vh - 270px);
}

.site-main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 32px 60px;
}

/* ==================== BIO SECTION (PROPORTIONAL 50/50 LAYOUT) ==================== */
.bio-container {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.bio-photo-col {
  flex-shrink: 0;
  width: 440px;
}

.bio-photo {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 2px;
}

.bio-text-col {
  flex: 1;
  min-width: 0;
}

.bio-text-col p {
  font-size: 13.5px;
  color: var(--text-color);
  margin-bottom: 12px;
  line-height: 1.6;
  text-align: justify;
}

.bio-text-col a {
  color: var(--text-color);
  text-decoration: underline;
}

.bio-text-col a:hover {
  color: #000000;
}

.focus-title {
  font-weight: 700 !important;
  color: var(--text-color) !important;
  margin-top: 14px !important;
  margin-bottom: 4px !important;
  font-size: 13.5px !important;
}

.focus-item {
  margin-bottom: 2px !important;
  font-size: 13.5px !important;
  color: var(--text-color) !important;
  text-align: left !important;
}

/* ==================== DIVIDER ==================== */
.section-divider {
  height: 1px;
  background-color: #c5c3be;
  margin: 32px 0;
}

/* ==================== NEWS SECTION ==================== */
.news-container {
  margin-bottom: 32px;
}

.section-heading {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 14px;
}

/* Google Sites native "section title" style — large, centered serif
   (used for Publication / Research headings) */
.section-title {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 400;
  color: var(--text-color);
  text-align: center;
  margin: 10px 0 26px;
}

.news-list {
  list-style: square;
  padding-left: 18px;
}

.news-list li {
  font-size: 13.5px;
  color: var(--text-color);
  margin-bottom: 6px;
  line-height: 1.6;
}

.news-list a {
  color: var(--text-color);
  text-decoration: underline;
}

.news-list a:hover {
  color: #000000;
}

/* ==================== CARD ITEMS (PROJECTS & PUBLICATIONS - LARGER IMAGES) ==================== */
.page-intro {
  font-size: 14px;
  color: var(--text-color);
  margin-bottom: 28px;
  line-height: 1.6;
  text-align: justify;
}

.card-item {
  display: flex;
  gap: 36px;
  align-items: flex-start;
  margin-bottom: 36px;
}

.card-media {
  flex-shrink: 0;
  width: 400px;
}

.card-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 2px;
}

.card-content {
  flex: 1;
  min-width: 0;
}

.card-title {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 4px;
  line-height: 1.4;
}

.card-title a {
  color: var(--text-color);
  text-decoration: underline;
}

.card-meta {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 6px;
  /* Boxed background to match Google Sites venue/meta line */
  background-color: rgba(0, 0, 0, 0.059);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background-clip: padding-box;
  padding: 5px 5px;
}

.card-meta a {
  color: var(--text-color);
  text-decoration: underline;
}

/* Keep every link inside a card dark/underlined (matches Google Sites) */
.card-content a {
  color: var(--text-color);
  text-decoration: underline;
}

.card-links {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 8px;
  /* Boxed background to match the venue/meta line */
  background-color: rgba(0, 0, 0, 0.059);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background-clip: padding-box;
  padding: 5px 5px;
}

.card-links a {
  color: var(--text-color);
  text-decoration: underline;
}

.award-badge {
  color: var(--text-color) !important;
  font-weight: 700;
}

.card-desc {
  font-size: 13.5px;
  color: var(--text-color);
  margin-bottom: 6px;
  line-height: 1.6;
  text-align: justify;
}

.scholar-footnote {
  font-size: 14px;
  color: var(--text-color);
  margin-top: 16px;
}

.scholar-footnote a {
  color: var(--text-color);
  text-decoration: underline;
}

/* ==================== SOCIAL FOOTER ==================== */
.social-footer {
  margin-top: 32px;
  padding-top: 16px;
}

.social-links-row {
  display: flex;
  gap: 20px;
  align-items: center;
}

.social-icon {
  height: 44px;
  width: auto;
  display: block;
  transition: opacity 0.2s ease;
}

.social-icon:hover {
  opacity: 0.75;
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 860px) {
  .topbar-nav {
    display: none;
  }
  .mobile-toggle {
    display: block;
  }

  .hero-banner {
    height: 140px;
  }
  .hero-title {
    font-size: 26px;
  }

  .site-main {
    padding: 24px 20px 40px;
  }

  .bio-container {
    flex-direction: column;
    gap: 20px;
  }

  .bio-photo-col {
    width: 100%;
    max-width: 100%;
  }

  .card-item {
    flex-direction: column;
    gap: 16px;
  }

  .card-media {
    width: 100%;
    max-width: 100%;
  }
}
