:root {
  --bg: #fbfdff;
  --paper: #ffffff;
  --soft: #eef7ff;
  --soft-2: #f6fbff;
  --text: #162235;
  --muted: #5c6e82;
  --line: #d9e8f6;
  --accent: #3b82a8;
  --accent-2: #9bd3ef;
  --accent-3: #d7ecfb;
  --accent-dark: #22516e;
  --success: #5d8a9f;
  --shadow: 0 18px 50px rgba(22, 34, 53, 0.10);
  --shadow-hover: 0 24px 70px rgba(22, 34, 53, 0.16);
  --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 0%, rgba(155, 211, 239, 0.42), transparent 34rem),
    radial-gradient(circle at 95% 6%, rgba(215, 236, 251, 0.70), transparent 30rem),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
  line-height: 1.65;
}
a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: none; }
.container { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--accent); color: white; padding: 8px 12px; z-index: 99; border-radius: 10px; }
.skip-link:focus { left: 8px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,255,255,0.88);
  border-bottom: 1px solid rgba(217, 232, 246, 0.9);
  backdrop-filter: blur(16px);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 74px; gap: 24px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 850; color: var(--text); }
.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  letter-spacing: 0.04em;
  box-shadow: 0 10px 25px rgba(59, 130, 168, 0.28);
}
.site-nav { display: flex; gap: 6px; flex-wrap: wrap; font-size: 0.94rem; }
.site-nav a {
  color: var(--text);
  padding: 8px 10px;
  border-radius: 999px;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}
.site-nav a:hover { background: var(--soft); color: var(--accent-dark); transform: translateY(-1px); }
.nav-toggle { display: none; border: 1px solid var(--line); background: white; padding: 8px 12px; border-radius: 12px; }

.section { padding: 88px 0; }
.section.alt { background: linear-gradient(180deg, rgba(238,247,255,0.72), rgba(255,255,255,0.72)); }
.hero { padding-top: 70px; }
.hero-grid { display: grid; grid-template-columns: 355px 1fr; gap: 48px; align-items: center; }
.profile-card {
  background: rgba(255,255,255,0.94);
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 30px;
  box-shadow: var(--shadow);
}
.portrait-wrap {
  width: 202px;
  height: 202px;
  border-radius: 999px;
  margin: 0 auto 20px;
  padding: 6px;
  background: linear-gradient(135deg, var(--accent-2), #ffffff 46%, var(--accent));
  box-shadow: 0 16px 36px rgba(59, 130, 168, 0.18);
}
.portrait-img, .portrait-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  border: 4px solid white;
}
.portrait-img { object-fit: cover; display: block; object-position: 50% 38%; }
.portrait-placeholder {
  display: none;
  place-items: center;
  background: linear-gradient(135deg, #eef7ff, #ffffff);
  color: var(--accent-dark);
  font-size: 3rem;
  font-weight: 900;
}
.profile-card h1 { text-align: center; margin: 0; font-size: 2rem; }
.tagline { text-align: center; color: var(--muted); }
code { background: var(--soft); border: 1px solid var(--line); padding: 1px 5px; border-radius: 6px; }
.contact-list { margin: 24px 0; }
.contact-list div { border-top: 1px solid var(--line); padding: 10px 0; }
.contact-list dt { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 800; }
.contact-list dd { margin: 0; word-break: break-word; }
.button-row { display: flex; gap: 10px; flex-wrap: wrap; }
.button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 11px 16px;
  color: var(--text);
  background: rgba(255,255,255,0.95);
  box-shadow: 0 8px 18px rgba(22,34,53,0.06);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
  overflow: hidden;
}
.button::after {
  content: "→";
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 180ms ease, transform 180ms ease;
}
.button:hover { transform: translateY(-3px); box-shadow: 0 14px 28px rgba(22,34,53,0.12); border-color: var(--accent-2); }
.button:hover::after { opacity: 1; transform: translateX(0); }
.button.primary { background: linear-gradient(135deg, var(--accent), var(--accent-dark)); border-color: transparent; color: white; }
.button.ghost { background: rgba(238,247,255,0.9); }
.hero-content h2 { font-size: clamp(2.1rem, 4vw, 4.55rem); line-height: 1.04; margin: 0 0 22px; letter-spacing: -0.05em; }
.hero-content p { font-size: 1.1rem; color: var(--muted); max-width: 760px; }
.eyebrow { margin: 0 0 10px; color: var(--accent-dark); font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; font-size: 0.76rem; }
.quick-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }

.two-column { display: grid; grid-template-columns: 260px 1fr; gap: 54px; }
.section-heading { max-width: 800px; margin-bottom: 32px; }
.section-heading h2, .two-column h2 { margin: 0 0 10px; font-size: clamp(1.7rem, 3vw, 2.7rem); letter-spacing: -0.03em; }
.section-heading p, .prose { color: var(--muted); }
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: rgba(255,255,255,0.94);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 8px 26px rgba(22,34,53,0.06);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); border-color: var(--accent-2); }
.card h3 { margin-top: 0; margin-bottom: 8px; }
.card p { color: var(--muted); }
.card .meta { font-size: 0.82rem; color: var(--success); font-weight: 900; text-transform: uppercase; letter-spacing: 0.06em; }
.stacked-list { display: grid; gap: 12px; }
.news-item { background: white; border: 1px solid var(--line); border-left: 5px solid var(--accent); border-radius: 16px; padding: 15px 18px; box-shadow: 0 8px 22px rgba(22,34,53,0.05); }
.news-date { font-weight: 900; color: var(--accent-dark); margin-right: 10px; }
.pub-list { display: grid; gap: 14px; }
.pub { background: white; border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; box-shadow: 0 8px 22px rgba(22,34,53,0.05); }
.pub-title { font-weight: 900; }
.pub-venue { color: var(--muted); }
.timeline-list { display: grid; gap: 14px; }
.timeline-item { display: grid; grid-template-columns: 150px 1fr; gap: 18px; background: white; border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; box-shadow: 0 8px 22px rgba(22,34,53,0.05); }
.timeline-item h3 { margin: 0; }
.timeline-item p { margin: 4px 0 0; color: var(--muted); }
.timeline-date { color: var(--accent-dark); font-weight: 900; }
.timeline-org { font-weight: 700; }
.affiliation-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 22px; }
.affiliation-card { background: white; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: 0 8px 22px rgba(22,34,53,0.05); }
.affiliation-card img, .campus-fallback { width: 100%; height: 150px; object-fit: cover; display: block; }
.campus-fallback { display: none; place-items: center; background: linear-gradient(135deg, #e8f6ff, #ffffff); color: var(--accent-dark); font-weight: 900; font-size: 1.35rem; }
.affiliation-card div:last-child { padding: 16px; }
.affiliation-card h3 { margin: 0 0 6px; }
.affiliation-card p { margin: 0; color: var(--muted); }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.gallery-grid figure { margin: 0; background: white; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: 0 8px 22px rgba(22,34,53,0.05); transition: transform 180ms ease, box-shadow 180ms ease; }
.gallery-grid figure:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.gallery-grid img { width: 100%; height: 210px; object-fit: cover; display: block; background: #eef7ff; }
.gallery-grid figcaption { padding: 13px 14px 15px; color: var(--muted); display: grid; gap: 4px; }
.gallery-grid figcaption strong { color: var(--text); }
.gallery-grid figcaption span { font-size: 0.92rem; }
.site-footer { padding: 28px 0; border-top: 1px solid var(--line); background: white; }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; color: var(--muted); }
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 520ms ease, transform 520ms ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 980px) {
  .nav-toggle { display: inline-flex; }
  .site-nav { display: none; width: 100%; padding-bottom: 16px; }
  .site-nav.open { display: grid; grid-template-columns: repeat(2, 1fr); }
  .header-inner { flex-wrap: wrap; }
  .hero-grid, .two-column { grid-template-columns: 1fr; }
  .card-grid, .gallery-grid, .affiliation-grid { grid-template-columns: 1fr; }
  .profile-card { max-width: 430px; margin: 0 auto; }
  .timeline-item { grid-template-columns: 1fr; }
}
