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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Lora', Georgia, serif;
  background: #f7f5f0;
  color: #1a1a1a;
  min-height: 100vh;
}

a { color: #2a5fa5; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── Page shell ────────────────────────────────── */
.page-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 60px;
}

/* ─── Hero header ───────────────────────────────── */
header {
  position: relative;
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  margin: 24px 0 8px;
}

.header-bg {
  width: 100%;
  height: auto;
  display: block;
}

/* subtle dark veil over sky so white text is readable */
header::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.28) 0%,
    rgba(0,0,0,0.12) 45%,
    rgba(0,0,0,0.0)  55%
  );
  z-index: 1;
  pointer-events: none;
}

/* text layer — anchored just above the golden horizon line (~43% from top) */
.header-inner {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 46%;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 32px 8px;
}

.site-name {
  font-family: 'Cormorant Garamond', 'Garamond', 'Times New Roman', serif;
  font-size: 2.6rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.01em;
  line-height: 1;
  text-shadow: 0 2px 10px rgba(0,0,0,0.45);
}

nav {
  display: flex;
  gap: 26px;
  align-items: center;
}

nav a {
  font-family: 'Source Sans 3', 'Source Sans Pro', Helvetica, sans-serif;
  font-size: 0.9rem;
  font-weight: 400;
  color: rgba(255,255,255,0.90);
  letter-spacing: 0.02em;
  white-space: nowrap;
  text-shadow: 0 1px 6px rgba(0,0,0,0.45);
}

nav a:hover {
  color: #fff;
  text-decoration: none;
}

nav a.active {
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

/* ─── About page — photo + bio ──────────────────── */
.about-body {
  padding: 20px 0 64px;
  display: flex;
  gap: 60px;
  align-items: flex-start;
}

.about-photo {
  flex-shrink: 0;
  width: 240px;
}

.about-photo img,
.about-photo .photo-placeholder {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.photo-placeholder {
  background: #d8d4cc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.78rem;
  color: #888;
  text-align: center;
  padding: 12px;
}

/* ─── Social links ──────────────────────────────── */
.social-links {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid #d4cfc5;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.88rem;
  font-weight: 400;
  color: #333;
  text-decoration: none;
  transition: color 0.15s;
}

.social-link:hover { color: #111; text-decoration: none; }

.social-link svg {
  flex-shrink: 0;
  opacity: 0.75;
}

.social-link.disabled {
  color: #aaa;
  cursor: default;
  pointer-events: none;
}

.social-link.disabled svg { opacity: 0.35; }

.about-text p {
  font-size: 1.0rem;
  line-height: 1.78;
  margin-bottom: 1.1em;
  color: #222;
}

.about-text p:first-child {
  font-size: 1.22rem;
  font-weight: 500;
  line-height: 1.55;
  margin-bottom: 1.25em;
  color: #111;
}

.about-text p:last-child { margin-bottom: 0; }

strong { font-weight: 700; }

/* ─── Inner pages ───────────────────────────────── */
.page-body {
  padding: 20px 0 64px;
  width: 100%;
}

/* Two-column grid for paper lists */
.paper-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 48px;
}

/* Teaching two-column grid */
.teach-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 56px;
}

/* ─── Section headings ──────────────────────────── */
h2 {
  font-family: 'Source Sans 3', 'Source Sans Pro', Helvetica, sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #666;
  margin: 2.8em 0 1.1em;
  padding-bottom: 7px;
  border-bottom: 1px solid #ddd9d0;
}

h2:first-child { margin-top: 0; }

/* ─── Paper list ────────────────────────────────── */
.paper-list { list-style: none; }

.paper-item {
  margin-bottom: 1.3em;
  padding-bottom: 1.3em;
  border-bottom: 1px solid #ece9e2;
}

.paper-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.paper-title {
  font-size: 0.97rem;
  font-weight: 600;
  line-height: 1.52;
  color: #111;
  margin-bottom: 0.3em;
}

.paper-meta {
  font-size: 0.87rem;
  color: #555;
  line-height: 1.5;
  font-family: 'Source Sans 3', sans-serif;
}

.paper-meta em { font-style: italic; }

.paper-title-zh {
  font-size: 0.88rem;
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 400;
  margin-top: 4px;
  margin-bottom: 0.3em;
}

.paper-title-zh a {
  color: #2a5fa5;
  text-decoration: none;
}

.paper-title-zh a:hover { text-decoration: underline; }

.status-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 3px;
  margin-left: 5px;
  vertical-align: middle;
}

.badge-forthcoming { background: #e6eef8; color: #1e4f9c; }
.badge-rr          { background: #fef3e2; color: #b45309; }
.badge-submitted   { background: #ecfdf5; color: #166534; }
.badge-review      { background: #f5f0fe; color: #5b21b6; }

/* ─── Teaching ──────────────────────────────────── */
.teach-statement {
  font-family: 'Lora', Georgia, serif;
  font-size: 1.0rem;
  line-height: 1.75;
  color: #222;
  margin-bottom: 0;
}

.teach-block { margin-bottom: 2em; }

.teach-institution {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.97rem;
  font-weight: 700;
  color: #111;
  margin-bottom: 8px;
}

.course-list {
  list-style: none;
  padding: 0;
}

.course-list li {
  font-family: 'Lora', Georgia, serif;
  font-size: 0.97rem;
  line-height: 1.75;
  color: #333;
  font-style: italic;
  padding: 3px 0;
  border-bottom: 1px solid #ece9e2;
}

.course-list li:last-child { border-bottom: none; }

.course-note {
  font-style: normal;
  font-size: 0.82rem;
  color: #888;
  font-family: 'Source Sans 3', sans-serif;
  margin-left: 4px;
}

.course-code {
  font-style: normal;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: #888;
  margin-right: 6px;
  letter-spacing: 0.02em;
}

/* ─── Responsive ────────────────────────────────── */
@media (max-width: 900px) {
  .paper-grid, .teach-grid { grid-template-columns: 1fr; gap: 0; }
}

@media (max-width: 640px) {
  .page-shell { padding: 0 20px; }

  header { padding: 24px 0 16px; }
  .site-name { font-size: 1.5rem; }
  nav { gap: 14px; }
  nav a { font-size: 0.82rem; }

  .about-body { flex-direction: column; gap: 28px; padding: 36px 0 48px; }
  .about-photo { width: 100%; display: flex; justify-content: center; }
  .about-photo img, .about-photo .photo-placeholder { width: 150px; height: 150px; }

  .page-body { padding: 36px 0 48px; }
}
