/* Personal Academic Homepage — Qianyi Wang
   Design synthesis across reference academic portfolios:
   - Editorial serif + clean geometric sans + warm stone paper canvas (yangchen.info / shuyuehu.github.io)
   - Top scroll progress bar, light/dark mode toggle, 2-col News & ABS/BIB drawers (shaozhang.info)
   - Sticky left profile card + timeline & 1-line paper highlights (boZhang.github.io) */

:root {
  --bg: #f3f5f8;
  --surface: rgba(255, 255, 255, 0.93);
  --surface-alt: rgba(241, 245, 249, 0.85);
  --ink: #151921;
  --ink-secondary: #434c58;
  --ink-muted: #6c7684;
  --accent: #244b70;
  --accent-hover: #173452;
  --accent-soft: #e3eef8;
  --line: rgba(36, 75, 112, 0.13);
  --line-subtle: rgba(36, 75, 112, 0.075);
  --pill-prep-bg: #e7ebf0;
  --pill-prep-fg: #444d58;
  --header-bg: rgba(247, 248, 251, 0.78);
  --shadow-sm: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 2px 6px rgba(20, 38, 62, 0.04), 0 12px 28px -8px rgba(24, 48, 78, 0.08);
  --shadow-md: inset 0 1px 0 rgba(255, 255, 255, 0.98), 0 4px 10px rgba(20, 38, 62, 0.05), 0 18px 36px -8px rgba(36, 75, 112, 0.15);
}

html[data-theme="dark"] {
  --bg: #0b0f17;
  --surface: rgba(20, 26, 36, 0.90);
  --surface-alt: rgba(30, 39, 52, 0.85);
  --ink: #edf1f7;
  --ink-secondary: #b3bdca;
  --ink-muted: #7f8b9b;
  --accent: #7cb0e3;
  --accent-hover: #a3cbf2;
  --accent-soft: #1b2c40;
  --line: rgba(140, 180, 225, 0.15);
  --line-subtle: rgba(140, 180, 225, 0.08);
  --pill-prep-bg: #222b38;
  --pill-prep-fg: #bac3cf;
  --header-bg: rgba(11, 15, 23, 0.78);
  --shadow-sm: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-md: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 14px 34px rgba(0, 0, 0, 0.55);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.68;
  color: var(--ink);
  background-color: var(--bg);
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: background-color 0.22s ease, color 0.22s ease;
  -webkit-font-smoothing: antialiased;
}

/* Layer 1: Rich Coastal-Sunset Aurora Mesh (warm amber-apricot left + cerulean-slate right) */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(820px 560px at 8% 4%, rgba(245, 158, 98, 0.34), transparent 70%),
    radial-gradient(900px 620px at 92% 6%, rgba(66, 133, 196, 0.31), transparent 72%),
    radial-gradient(760px 580px at 6% 92%, rgba(92, 158, 168, 0.22), transparent 70%),
    radial-gradient(840px 600px at 94% 94%, rgba(124, 138, 204, 0.24), transparent 72%),
    linear-gradient(180deg, #f8f6f2 0%, #f2f5f9 52%, #f5f4f0 100%);
}

html[data-theme="dark"] body::before {
  background:
    radial-gradient(820px 540px at 8% 4%, rgba(224, 128, 68, 0.22), transparent 70%),
    radial-gradient(900px 600px at 92% 6%, rgba(58, 128, 208, 0.26), transparent 72%),
    radial-gradient(760px 560px at 8% 94%, rgba(52, 132, 148, 0.18), transparent 70%),
    radial-gradient(820px 580px at 92% 94%, rgba(98, 108, 192, 0.20), transparent 72%),
    linear-gradient(180deg, #0b0f17 0%, #0e1420 50%, #0b0f17 100%);
}

/* Layer 2: Precision Blueprint Crosshair Grid + Geodesic Manifold Contour Lines */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 900' preserveAspectRatio='xMidYMid slice'%3E%3Cg fill='none' stroke='%23244b70'%3E%3Cpath d='M-120 180 C 120 90, 260 310, 420 190 C 560 85, 620 -40, 760 -60' stroke-opacity='0.16' stroke-width='1.2'/%3E%3Cpath d='M-140 240 C 130 140, 280 370, 460 235 C 610 120, 670 -10, 830 -40' stroke-opacity='0.11' stroke-width='1' stroke-dasharray='4 5'/%3E%3Cpath d='M-100 310 C 150 200, 310 430, 500 285' stroke-opacity='0.09' stroke-width='1'/%3E%3Cpath d='M1720 140 C 1450 240, 1320 40, 1140 165 C 990 270, 960 430, 790 480' stroke-opacity='0.16' stroke-width='1.2'/%3E%3Cpath d='M1740 210 C 1460 310, 1310 105, 1115 225 C 960 325, 930 490, 750 545' stroke-opacity='0.11' stroke-width='1' stroke-dasharray='4 5'/%3E%3Cpath d='M1720 720 C 1460 610, 1310 810, 1120 700 C 960 605, 890 740, 720 920' stroke-opacity='0.14' stroke-width='1.15'/%3E%3Cpath d='M-110 740 C 140 640, 290 830, 470 720 C 610 635, 680 770, 820 930' stroke-opacity='0.13' stroke-width='1.1' stroke='%23c26d3a'/%3E%3C/g%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cpath d='M32 0v160M64 0v160M96 0v160M128 0v160M0 32h160M0 64h160M0 96h160M0 128h160' stroke='%23244b70' stroke-opacity='0.065' stroke-width='1'/%3E%3Cpath d='M160 0H0v160' fill='none' stroke='%23244b70' stroke-opacity='0.12' stroke-width='1'/%3E%3Cpath d='M-5 0H5M0 -5V5M155 0h10M160 -5V5M0 155v10M-5 160H5M155 160h10M160 155v10' stroke='%23244b70' stroke-opacity='0.34' stroke-width='1.3'/%3E%3C/svg%3E");
  background-size: cover, 160px 160px;
  background-position: center center, center top;
  -webkit-mask-image: linear-gradient(90deg, #000 0%, rgba(0,0,0,0.88) 17%, rgba(0,0,0,0.28) 32%, rgba(0,0,0,0.28) 68%, rgba(0,0,0,0.88) 83%, #000 100%);
  mask-image: linear-gradient(90deg, #000 0%, rgba(0,0,0,0.88) 17%, rgba(0,0,0,0.28) 32%, rgba(0,0,0,0.28) 68%, rgba(0,0,0,0.88) 83%, #000 100%);
}

html[data-theme="dark"] body::after {
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 900' preserveAspectRatio='xMidYMid slice'%3E%3Cg fill='none' stroke='%237cb0e3'%3E%3Cpath d='M-120 180 C 120 90, 260 310, 420 190 C 560 85, 620 -40, 760 -60' stroke-opacity='0.22' stroke-width='1.2'/%3E%3Cpath d='M-140 240 C 130 140, 280 370, 460 235 C 610 120, 670 -10, 830 -40' stroke-opacity='0.14' stroke-width='1' stroke-dasharray='4 5'/%3E%3Cpath d='M1720 140 C 1450 240, 1320 40, 1140 165 C 990 270, 960 430, 790 480' stroke-opacity='0.22' stroke-width='1.2'/%3E%3Cpath d='M1740 210 C 1460 310, 1310 105, 1115 225 C 960 325, 930 490, 750 545' stroke-opacity='0.14' stroke-width='1' stroke-dasharray='4 5'/%3E%3Cpath d='M1720 720 C 1460 610, 1310 810, 1120 700 C 960 605, 890 740, 720 920' stroke-opacity='0.18' stroke-width='1.15'/%3E%3Cpath d='M-110 740 C 140 640, 290 830, 470 720 C 610 635, 680 770, 820 930' stroke-opacity='0.18' stroke-width='1.1'/%3E%3C/g%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cpath d='M32 0v160M64 0v160M96 0v160M128 0v160M0 32h160M0 64h160M0 96h160M0 128h160' stroke='%237cb0e3' stroke-opacity='0.065' stroke-width='1'/%3E%3Cpath d='M160 0H0v160' fill='none' stroke='%237cb0e3' stroke-opacity='0.13' stroke-width='1'/%3E%3Cpath d='M-5 0H5M0 -5V5M155 0h10M160 -5V5M0 155v10M-5 160H5M155 160h10M160 155v10' stroke='%237cb0e3' stroke-opacity='0.36' stroke-width='1.3'/%3E%3C/svg%3E");
  background-size: cover, 160px 160px;
  background-position: center center, center top;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

a:hover {
  color: var(--accent-hover);
}

/* Reading Scroll Progress Bar (inspired by shaozhang.info) */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2.5px;
  width: 0%;
  background: var(--accent);
  z-index: 200;
  transition: width 0.08s linear;
}

/* Sticky Top Editorial Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: 1020px;
  margin: 0 auto;
  padding: 0 28px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-brand {
  font-family: 'Newsreader', 'Lora', Georgia, serif;
  font-size: 1.24rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink) !important;
}

.site-brand .brand-dot {
  color: var(--accent);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-nav a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink-secondary);
  padding: 4px 0;
  position: relative;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--ink);
}

.site-nav a.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1.5px;
  background-color: var(--accent);
}

.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-secondary);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.theme-toggle-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.theme-toggle-btn svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mobile-menu-btn {
  display: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 5px 9px;
  color: var(--ink);
  cursor: pointer;
}

/* Main Shell */
.page-shell {
  max-width: 1020px;
  width: 100%;
  margin: 0 auto;
  padding: 42px 28px 32px 28px;
  flex: 1 0 auto;
}

.home-grid {
  display: grid;
  grid-template-columns: 245px minmax(0, 1fr);
  gap: 54px;
  align-items: start;
}

/* Left Sticky Profile Card (inspired by Bo Zhang) */
.profile-rail {
  position: sticky;
  top: 92px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px 20px 22px 20px;
  box-shadow: var(--shadow-sm);
}

.portrait-frame {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  padding: 3px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  margin: 0 auto 16px auto;
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.profile-Identity {
  text-align: center;
}

.profile-name {
  font-family: 'Newsreader', 'Lora', Georgia, serif;
  font-size: 1.44rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 4px 0;
  letter-spacing: -0.015em;
}

.profile-role {
  font-size: 0.83rem;
  color: var(--ink-secondary);
  line-height: 1.46;
  margin: 0 0 2px 0;
}

.profile-loc {
  font-size: 0.79rem;
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 8px 0 14px 0;
}

.profile-loc svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

.profile-links {
  list-style: none;
  padding: 13px 0;
  margin: 0 0 14px 0;
  border-top: 1px solid var(--line-subtle);
  border-bottom: 1px solid var(--line-subtle);
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.profile-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--ink-secondary);
  padding: 3px 4px;
  border-radius: 5px;
}

.profile-links a:hover {
  color: var(--accent);
  background: var(--surface-alt);
}

.profile-link-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.profile-link-left svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  color: var(--ink-muted);
}

.profile-links a:hover .profile-link-left svg {
  color: var(--accent);
}

.ext-arrow {
  font-size: 0.74rem;
  color: var(--ink-muted);
  opacity: 0.65;
}

/* Sidebar Timeline */
.rail-timeline {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 2px;
}

.rail-timeline-item {
  position: relative;
  padding-left: 13px;
  border-left: 1.5px solid var(--line);
}

.rail-timeline-item::before {
  content: '';
  position: absolute;
  left: -3.5px;
  top: 5px;
  width: 5.5px;
  height: 5.5px;
  border-radius: 50%;
  background: var(--accent);
}

.rail-year {
  font-size: 0.72rem;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--ink-muted);
  line-height: 1.2;
}

.rail-org {
  font-size: 0.81rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
  margin-top: 1px;
}

.rail-deg {
  font-size: 0.77rem;
  color: var(--ink-secondary);
}

/* Right Content Sections */
.content-section {
  margin-bottom: 40px;
}

.section-heading {
  font-family: 'Newsreader', 'Lora', Georgia, serif;
  font-size: 1.34rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 16px 0;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.section-heading .section-more {
  font-family: 'Inter', sans-serif;
  font-size: 0.81rem;
  font-weight: 500;
  color: var(--ink-muted);
}

.section-heading .section-more:hover {
  color: var(--accent);
}

.bio-prose p {
  margin: 0 0 13px 0;
  color: var(--ink-secondary);
  font-size: 0.95rem;
  line-height: 1.75;
}

.bio-prose strong {
  font-weight: 600;
  color: var(--ink);
}

/* 3 Research Pillars Grid (clean editorial strip, inspired by shuyuehu & yangchen) */
.research-pillars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.pillar-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 14px;
}

.pillar-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}

.pillar-desc {
  font-size: 0.79rem;
  color: var(--ink-muted);
  line-height: 1.5;
}

/* 2-Column News Table (inspired by shaozhang.info) */
.news-list {
  display: flex;
  flex-direction: column;
}

.news-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 16px;
  padding: 8.5px 0;
  border-bottom: 1px solid var(--line-subtle);
  align-items: baseline;
  font-size: 0.9rem;
}

.news-row:last-child {
  border-bottom: none;
}

.news-date {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
  color: var(--ink-muted);
}

.news-text {
  color: var(--ink-secondary);
  line-height: 1.58;
}

.news-venue-badge {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.71rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 3px;
  background: var(--accent-soft);
  color: var(--accent);
}

/* Search Bar on Publications Page */
.pub-search-wrap {
  position: relative;
  margin-bottom: 22px;
}

.pub-search-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  fill: none;
  stroke: var(--ink-muted);
  stroke-width: 1.9;
  stroke-linecap: round;
  pointer-events: none;
}

.pub-search-input {
  width: 100%;
  font-family: inherit;
  font-size: 0.88rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 14px 9px 38px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pub-search-input::placeholder {
  color: var(--ink-muted);
}

.pub-search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.pub-empty-msg {
  display: none;
  font-size: 0.88rem;
  color: var(--ink-muted);
  padding: 18px 2px;
  margin: 0;
}

/* Publication Cards — Clean Editorial Cards */
.pub-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pub-item {
  display: grid;
  grid-template-columns: 192px minmax(0, 1fr);
  gap: 20px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  align-items: start;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.pub-item:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.pub-thumb {
  border: 1px solid var(--line-subtle);
  border-radius: 6px;
  background: #ffffff;
  padding: 5px;
  overflow: hidden;
  cursor: zoom-in;
}

.pub-thumb img {
  width: 100%;
  height: 114px;
  object-fit: contain;
  display: block;
}

.pub-main {
  min-width: 0;
}

.pub-meta-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

/* Venue Pill: Specific venue name (e.g. DAI 2026) vs Preprint — NEVER generic "Conference" */
.venue-pill {
  display: inline-flex;
  align-items: center;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--accent);
  color: #ffffff;
}

html[data-theme="dark"] .venue-pill {
  color: #0f1419;
}

.venue-pill.is-preprint {
  background: var(--pill-prep-bg);
  color: var(--pill-prep-fg);
}

.topic-chip {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--ink-muted);
}

.pub-title {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.42;
  margin: 0 0 6px 0;
  color: var(--ink);
}

.pub-title a {
  color: var(--ink);
}

.pub-title a:hover {
  color: var(--accent);
}

.pub-authors {
  font-size: 0.84rem;
  color: var(--ink-secondary);
  line-height: 1.52;
  margin-bottom: 5px;
}

.pub-authors .me {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2.5px;
}

.pub-venue-line {
  font-size: 0.81rem;
  color: var(--ink-muted);
  font-style: italic;
  margin-bottom: 7px;
}

.pub-highlight {
  font-size: 0.82rem;
  color: var(--ink-secondary);
  background: var(--surface-alt);
  border-left: 2px solid var(--accent);
  padding: 5px 10px;
  border-radius: 0 4px 4px 0;
  margin-bottom: 10px;
  line-height: 1.5;
}

/* Tactile Outlined Pills (yangchen.info + shaozhang.info) */
.pub-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.action-pill {
  display: inline-flex;
  align-items: center;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-secondary) !important;
  cursor: pointer;
  line-height: 1.45;
  transition: all 0.15s ease;
}

.action-pill:hover,
.action-pill.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff !important;
}

html[data-theme="dark"] .action-pill:hover,
html[data-theme="dark"] .action-pill.active {
  color: #0f1419 !important;
}

.drawer-box {
  display: none;
  margin-top: 10px;
  padding: 12px 14px;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 0.82rem;
  color: var(--ink-secondary);
  line-height: 1.62;
}

.drawer-box.open {
  display: block;
}

.drawer-box.bib-drawer {
  position: relative;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
  white-space: pre-wrap;
  word-break: break-word;
  padding-right: 68px;
}

.copy-bib-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink-secondary);
  cursor: pointer;
}

.copy-bib-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Subpages */
.subpage-wrap {
  max-width: 840px;
  margin: 0 auto;
}

.page-title {
  font-family: 'Newsreader', 'Lora', Georgia, serif;
  font-size: 1.72rem;
  font-weight: 600;
  margin: 0 0 6px 0;
  color: var(--ink);
}

.page-subtitle {
  font-size: 0.91rem;
  color: var(--ink-muted);
  margin: 0 0 24px 0;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.project-grid {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.project-card {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 22px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.project-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.cv-block {
  margin-bottom: 30px;
}

.cv-row {
  display: grid;
  grid-template-columns: 155px minmax(0, 1fr);
  gap: 18px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-subtle);
}

.cv-period {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.cv-detail strong {
  color: var(--ink);
  font-weight: 600;
}

.cv-detail div {
  font-size: 0.88rem;
  color: var(--ink-secondary);
  margin-top: 2px;
}

/* Lightbox */
.lightbox-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(12, 16, 22, 0.78);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 28px;
  cursor: zoom-out;
}

.lightbox-backdrop.open {
  display: flex;
}

.lightbox-backdrop img {
  max-width: min(960px, 92vw);
  max-height: 86vh;
  background: #ffffff;
  padding: 12px;
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

/* Minimalist Footer */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 42px;
  padding: 22px 28px;
}

.footer-inner {
  max-width: 1020px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.81rem;
  color: var(--ink-muted);
  flex-wrap: wrap;
  gap: 10px;
}

.footer-links {
  display: flex;
  gap: 18px;
}

.footer-links a {
  color: var(--ink-muted);
}

.footer-links a:hover {
  color: var(--accent);
}

/* Responsive */
@media (max-width: 900px) {
  .home-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .profile-rail {
    position: static;
  }
  .research-pillars {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .mobile-menu-btn {
    display: inline-block;
  }
  .site-nav {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 28px 18px 28px;
    gap: 10px;
  }
  .site-nav.open {
    display: flex;
  }
  .pub-item,
  .project-card,
  .cv-row,
  .news-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .pub-thumb img {
    height: 150px;
  }
}
