/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #162447;
  --primary-mid: #1f3564;
  --primary-light: #2a4a7f;
  --accent: #c9a227;
  --accent-light: #e8d48b;
  --warm-bg: #faf8f5;
  --card-bg: #ffffff;
  --text: #1e1e2f;
  --text-mid: #444a5a;
  --text-light: #6b7280;
  --border: #e5e1db;
  --border-light: #f0ece6;
  --max-w: 920px;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--warm-bg);
  line-height: 1.65;
  font-size: 15px;
}

a { color: var(--primary-light); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent); }

/* === Header === */
header {
  background: linear-gradient(135deg, var(--primary) 0%, #1a3158 40%, var(--primary-mid) 100%);
  color: #fff;
  padding: 0;
  border-bottom: none;
  box-shadow: 0 2px 20px rgba(22, 36, 71, 0.3);
  position: relative;
}
header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light), var(--accent));
}
.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem 1.5rem 0;
}
.site-name {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.site-name a { color: #fff; }
.site-name a:hover { color: var(--accent-light); }
.site-tagline {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  margin-top: 0.2rem;
  font-weight: 300;
  letter-spacing: 0.03em;
}

nav {
  margin-top: 1.2rem;
  display: flex;
  gap: 0;
}
nav a {
  color: rgba(255, 255, 255, 0.55);
  padding: 0.7rem 1.3rem;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: 3px solid transparent;
  transition: all 0.25s;
}
nav a:hover {
  color: #fff;
  border-bottom-color: rgba(201, 162, 39, 0.4);
}
nav a.active {
  color: #fff;
  border-bottom-color: var(--accent);
}

/* === Main === */
main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3.5rem;
}

h2 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.35rem;
  color: var(--primary);
  margin: 2.5rem 0 0.8rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  position: relative;
}
h2::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 50px;
  height: 2px;
  background: var(--accent);
}
h2:first-child { margin-top: 0; }

h3.year-heading {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.05rem;
  color: var(--primary-mid);
  margin: 1.8rem 0 0.6rem;
  font-weight: 600;
  padding-left: 0.8rem;
  border-left: 3px solid var(--accent);
}

/* === About Page === */
.about-section {
  background: var(--card-bg);
  border-radius: 8px;
  padding: 2rem 2.2rem;
  box-shadow: 0 1px 8px rgba(0,0,0,0.04);
  border: 1px solid var(--border-light);
}

.bio-block { margin-bottom: 1.8rem; }
.bio-block:last-child { margin-bottom: 0; }
.bio-block p { color: var(--text-mid); }
.bio-block strong { color: var(--primary); }

.education-list, .contact-list { list-style: none; padding: 0; }
.education-list li {
  margin-bottom: 0.9rem;
  padding-left: 1rem;
  border-left: 2px solid var(--border);
  color: var(--text-mid);
}
.education-list li strong { color: var(--text); }
.contact-list li { margin-bottom: 0.3rem; color: var(--text-mid); }

/* === Publication List === */
.pub-section {
  background: var(--card-bg);
  border-radius: 8px;
  padding: 2rem 2.2rem;
  box-shadow: 0 1px 8px rgba(0,0,0,0.04);
  border: 1px solid var(--border-light);
}
.pub-count {
  color: var(--text-light);
  font-size: 0.88rem;
  margin-bottom: 0.5rem;
}

.pub-list { list-style: none; padding: 0; }
.pub-item {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border-light);
  line-height: 1.55;
  transition: background 0.15s;
}
.pub-item:hover {
  background: rgba(250, 248, 245, 0.7);
  margin: 0 -0.8rem;
  padding-left: 0.8rem;
  padding-right: 0.8rem;
  border-radius: 4px;
}
.pub-item:last-child { border-bottom: none; }

.pub-title { font-weight: 600; color: var(--text); }
.pub-authors { font-size: 0.86rem; color: var(--text-light); }
.pub-authors strong { color: var(--primary); font-weight: 700; }
.pub-venue { font-size: 0.86rem; color: var(--text-mid); }
.pub-venue em { color: var(--primary-light); font-style: italic; }
.pub-status { color: var(--accent); font-size: 0.82rem; }
.pub-doi {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  background: var(--primary);
  color: #fff !important;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  margin-left: 0.4rem;
  vertical-align: middle;
  transition: background 0.2s;
}
.pub-doi:hover { background: var(--accent); }

/* === Pagination === */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}
.pagination a, .pagination span {
  display: inline-block;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.85rem;
  color: var(--primary-light);
  transition: all 0.2s;
}
.pagination a:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 2px 6px rgba(22, 36, 71, 0.2);
}
.pagination .current {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  font-weight: 600;
}

/* === Funding === */
.fund-section {
  background: var(--card-bg);
  border-radius: 8px;
  padding: 2rem 2.2rem;
  box-shadow: 0 1px 8px rgba(0,0,0,0.04);
  border: 1px solid var(--border-light);
  margin-bottom: 1.5rem;
}
.fund-summary {
  color: var(--text-light);
  font-size: 0.88rem;
  margin-bottom: 1rem;
}
.grant-list { display: flex; flex-direction: column; gap: 0.7rem; }
.grant-card {
  background: var(--warm-bg);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary-mid);
  border-radius: 6px;
  padding: 1rem 1.3rem;
  transition: all 0.2s;
}
.grant-card:hover {
  box-shadow: 0 3px 12px rgba(0,0,0,0.08);
  border-left-color: var(--accent);
}
.grant-card.completed {
  border-left-color: var(--border);
  opacity: 0.75;
}
.grant-card.completed:hover {
  opacity: 0.9;
  border-left-color: var(--text-light);
}
.grant-card.pending { border-left-color: var(--accent); }

.grant-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text);
  line-height: 1.4;
}
.grant-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.83rem;
  color: var(--text-light);
  align-items: center;
}
.grant-role {
  display: inline-block;
  padding: 0.12rem 0.55rem;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.role-pi { background: #dcedc8; color: #33691e; }
.role-copi { background: #e3f2fd; color: #1565c0; }

/* === Footer === */
footer {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem 1.5rem;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-light);
  border-top: 1px solid var(--border);
}

/* === Responsive === */
@media (max-width: 640px) {
  .header-inner { padding: 1.2rem 1rem 0; }
  .site-name { font-size: 1.4rem; }
  main { padding: 1.5rem 1rem 2rem; }
  .about-section, .pub-section, .fund-section { padding: 1.2rem 1rem; }
  nav a { padding: 0.5rem 0.8rem; font-size: 0.78rem; }
  .grant-meta { flex-direction: column; gap: 0.3rem; }
  .pub-item:hover { margin: 0; padding-left: 0; padding-right: 0; }
}
