:root {
  --font-sans: 'Inter', 'Lato', 'Noto Sans TC', sans-serif;
  --font-serif: 'Merriweather', serif;

  /* Light mode colors */
  --font-color: #333;
  --bg-color: #ffffff;
  --link-color: #0057b8;

  /* Dark mode colors */
  --dark-font-color: #f1f1f1;
  --dark-bg-color: #1a1a1a;
  --dark-link-color: #4fc3f7;
  --heading-color: #111;
  --accent-color: #ccc;
  --max-width: 750px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-color);
  color: var(--font-color);
  font-size: 15px;
  font-weight: 300;
  line-height: 1.6;
  margin: 3rem auto;
  padding: 0 1rem;
  max-width: var(--max-width);
}

body.dark-mode {
  background-color: var(--dark-bg-color);
  color: var(--dark-font-color);
}

body.dark-mode a {
  color: var(--dark-link-color);
}

a {
  color: var(--link-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--font-color);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--heading-color);
  margin: 2rem 0 1rem;
  line-height: 1.3;
}

h1 { font-size: 28px; }
h2 { font-size: 24px; }
h3 { font-size: 20px; }
h4, h5, h6 { font-size: 18px; font-weight: 500; }

ul, ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0px 20px;
}

th, td {
  padding: 0.75rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--accent-color);
}

strong {
  font-weight: 700;
}

small {
  font-size: 0.85em;
}

i {
  color: var(--font-color);
  font-size: 16px;
  padding: 4px;
}

button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  font-size: 16px;
}

hr {
  border: none;
  height: 1px;
  background-color: var(--accent-color);
  margin: 2rem 0;
}

section {
  margin-bottom: 3rem;
}

.info-links {
  text-align: center;
  margin-top: 1rem;
}

.paper-title {
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.paper-summary {
  font-size: 13px;
  font-style: italic;
  color: #666;
}

.flex-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.flex-left {
  flex: 2 1 60%;
}

.flex-right {
  flex: 1 1 30%;
}

.circular-square {
  border-radius: 50%;
}

#title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

section > h2 {
  background: linear-gradient(to right, #cce9ff 10%, #ffffff 100%);
  padding: 0.5rem 1rem;
  border-left: 6px solid #007acc;
  margin: 2rem 0 1rem;
  font-size: 20px;
  font-weight: 600;
  color: #003d66;
  border-radius: 4px;
  width: fit-content;
  max-width: 90%;
}

.chinese-name {
  font-family: 'Noto Serif TC', 'Noto Sans TC', 'PingFang TC', 'Microsoft YaHei', 'Heiti TC', sans-serif;
  font-weight: 500;
  font-size: 0.95em;
  margin-left: 0.5rem;
  color: #444;
}

.chinese-name {
  font-family: 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', 'Heiti TC', sans-serif;
}

.profile-pic {
  max-width: 100%;
  width: 350px;
  height: auto;
}



/* Helpful universally */
table { table-layout: fixed; width: 100%; }


@media (max-width: 780px) {
    body {
        margin: 20px 20px 20px 20px;
        font-size: 12px;
    }
    td {
        padding: 10px 8px;
      }
    img {
        width: 100%;
    }
}



