:root {
  --paper: #f6f4ff;
  --paper-2: rgba(255, 255, 255, .72);
  --ink: #2a2740;
  --muted: #6b6580;
  --line: rgba(160, 140, 200, 0.22);
  --blue: #7eb6f7;
  --purple: #b89cf5;
  --pink: #f3a4c8;
  --accent: #b89cf5;
  --accent-dark: #8b7adf;
  --blush: #ead9ff;
  --gold: #f3a4c8;
  --grad: linear-gradient(120deg, #7eb6f7 0%, #b89cf5 50%, #f3a4c8 100%);
  --display: "Iowan Old Style", "Palatino Linotype", Georgia, "Noto Serif SC", serif;
  --sans: Aptos, "Helvetica Neue", "Noto Sans SC", Arial, sans-serif;
  --shadow: 0 20px 50px rgba(140, 120, 200, 0.16);
  --radius: 26px;
  --page-pad: clamp(16px, 4vw, 24px);
  --container: min(1120px, 100%);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; overflow-x: clip; }
body {
  isolation: isolate;
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  padding-left: max(var(--page-pad), env(safe-area-inset-left));
  padding-right: max(var(--page-pad), env(safe-area-inset-right));
  overflow-x: clip;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.85;
  overflow-wrap: break-word;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(ellipse 80% 55% at 0% -10%, rgba(126, 182, 247, .48), transparent 58%),
    radial-gradient(ellipse 70% 50% at 100% 0%, rgba(243, 164, 200, .42), transparent 52%),
    radial-gradient(ellipse 65% 50% at 50% 110%, rgba(184, 156, 245, .4), transparent 58%),
    linear-gradient(165deg, #eef6ff 0%, #f6f0ff 46%, #fff0f6 100%);
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }

.container { width: var(--container); max-width: 100%; margin-inline: auto; }
body.nav-open { overflow: hidden; }

.skip-link {
  position: fixed; left: 16px; top: -80px; z-index: 9999;
  padding: 10px 16px; border-radius: 8px; background: var(--ink); color: #fff;
}
.skip-link:focus { top: 12px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.site-header { position: sticky; top: 0; z-index: 20; padding: max(12px, env(safe-area-inset-top)) 0 0; }
.site-nav {
  position: relative;
  width: min(1200px, 100%);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px 10px 16px;
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 24px;
  background: linear-gradient(120deg, rgba(255,255,255,.86), rgba(246, 240, 255, .9), rgba(255, 240, 246, .9));
  box-shadow: 0 14px 44px rgba(140, 120, 200, .16);
}
.nav-shell { display: contents; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; order: 1; }
.brand img.brand-mark { width: 36px; height: 36px; flex-shrink: 0; }
.brand-copy { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand-copy strong {
  font-family: var(--display); font-size: clamp(12px, 1.15vw, 16px); font-weight: 600;
  overflow-wrap: anywhere;
}
.brand-copy small { margin-top: 4px; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .12em; }
.nav-links {
  position: static;
  transform: none;
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.6vw, 28px);
  font-size: 14px;
  font-weight: 650;
  z-index: 2;
  pointer-events: auto;
  flex-shrink: 0;
  order: 2;
}
.nav-links a { position: relative; padding-block: 8px; pointer-events: auto; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 3px; height: 2px;
  border-radius: 99px; background: var(--grad); transition: right 220ms ease;
}
.nav-links a:hover::after,
.nav-links a:focus-visible::after,
.nav-links a[aria-current="page"]::after { right: 0; }
.nav-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; order: 3; }
.language-toggle {
  display: flex; gap: 5px; padding: 9px 10px; border: 0; border-radius: 999px;
  background: transparent; color: var(--muted); cursor: pointer; font-size: 11px; font-weight: 700;
}
.language-toggle:hover { background: rgba(184, 156, 245, .16); }
.language-active { color: var(--ink); }
.nav-toggle { display: none; order: 4; }
.nav-backdrop { display: none; pointer-events: none; }

.page { position: relative; z-index: 1; padding: 28px 0 88px; min-height: 70vh; }
.eyebrow, .section-label, .footer-label {
  margin: 0 0 14px; font-size: 11px; font-weight: 800;
  letter-spacing: .18em; text-transform: uppercase;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-page .eyebrow {
  font-size: clamp(15px, 1.5vw, 18px);
  font-weight: 750;
  letter-spacing: .06em;
  text-transform: none;
}
h1, h2, h3 { margin-top: 0; font-family: var(--display); font-weight: 500; letter-spacing: -.03em; }
h1 { margin-bottom: 20px; font-size: clamp(36px, 5vw, 62px); line-height: 1.08; }
h2 { margin-bottom: 18px; font-size: clamp(28px, 3.4vw, 42px); line-height: 1.15; }
h3 { margin-bottom: 10px; font-size: 22px; line-height: 1.25; }
p { margin-top: 0; }
.bio p:not(.section-label) {
  line-height: 2;
  margin-bottom: 1.15em;
  text-indent: 2em;
}
.muted { color: var(--muted); }

.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 12px 22px; border-radius: 999px; font-size: 13px; font-weight: 750;
  border: 1px solid transparent; transition: transform 180ms ease, filter 180ms ease, background 180ms ease;
}
.button:hover { transform: none; }
@media (hover: hover) {
  .button:hover { transform: translateY(-2px); }
}
.button-pink {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 12px 28px rgba(184, 156, 245, .32);
}
.button-pink:hover { filter: brightness(1.06); }
.button-ghost {
  border-color: transparent;
  background: rgba(255,255,255,.45);
  box-shadow: inset 0 0 0 1px rgba(184, 156, 245, .35);
  color: var(--ink);
}
.button-ghost:hover { background: rgba(255,255,255,.7); }

.hero-page {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(280px, .95fr);
  gap: 56px; align-items: center; margin-bottom: 72px;
}
.hero-lede { max-width: 620px; margin-bottom: 28px; color: var(--muted); font-size: clamp(16px, 1.3vw, 19px); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 36px; }
.hero-visual { margin: 0; min-width: 0; }
.hero-carousel {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  box-shadow: var(--shadow);
  background: #1b1430;
}
.hero-carousel-viewport {
  position: relative;
  aspect-ratio: 4 / 5;
  width: 100%;
}
.hero-carousel-viewport img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity 700ms ease;
  pointer-events: none;
}
.hero-carousel-viewport img.is-active { opacity: 1; }
.hero-carousel-btn {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 38px;
  height: 38px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.88);
  color: var(--ink);
  cursor: pointer;
  transform: translateY(-50%);
  box-shadow: 0 6px 18px rgba(42, 39, 64, .18);
}
.hero-carousel-btn.prev { left: 12px; }
.hero-carousel-btn.next { right: 12px; }
.hero-carousel-btn::before {
  content: "";
  display: block;
  width: 8px;
  height: 8px;
  margin: 0 auto;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
}
.hero-carousel-btn.prev::before { transform: rotate(135deg) translate(-1px, -1px); }
.hero-carousel-btn.next::before { transform: rotate(-45deg) translate(-1px, -1px); }
.hero-carousel-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 8px;
}
.hero-carousel-dots button {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: rgba(255,255,255,.45);
  cursor: pointer;
}
.hero-carousel-dots button.is-active {
  width: 22px;
  background: #fff;
}
.stats {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px;
  padding-top: 22px; border-top: 1px solid var(--line);
}
.stats strong {
  display: block; font-family: var(--display); font-size: 28px; font-weight: 500;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stats span { color: var(--muted); font-size: 12px; }

.section { margin-top: 72px; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.card, .paper-card, .award-card, .project-card, .member-card {
  background: linear-gradient(165deg, rgba(255,255,255,.82), rgba(247, 240, 255, .7));
  border: 1px solid rgba(255,255,255,.7);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(140, 120, 200, .1);
  backdrop-filter: blur(12px);
}
.card { padding: 28px 24px; }
.card:nth-child(1) { box-shadow: 0 10px 30px rgba(126, 182, 247, .16); }
.card:nth-child(2) { box-shadow: 0 10px 30px rgba(184, 156, 245, .16); }
.card:nth-child(3) { box-shadow: 0 10px 30px rgba(243, 164, 200, .16); }
.card p { margin: 0; color: var(--muted); font-size: 15px; }

.profile {
  display: grid;
  grid-template-columns: minmax(200px, 260px) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
}
.profile figure {
  margin: 0;
  width: 100%;
}
.profile img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
  border-radius: 24px;
  box-shadow: var(--shadow);
  background: var(--blush);
}
.profile-meta {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.split-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.award-card, .project-card { padding: 24px; }
.award-card time, .project-card small {
  display: block; margin-bottom: 8px; font-size: 12px; font-weight: 700; letter-spacing: .08em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}

.member-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.member-card { overflow: hidden; }
.member-card img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center top; background: #f3f0fa; }
.member-card img.photo-shift-up { object-position: center 32%; }
.member-card .member-copy { padding: 18px 18px 22px; }
.member-card h3 { margin-bottom: 4px; font-size: 20px; }
.member-card p { margin: 0; color: var(--muted); font-size: 14px; }
.note {
  margin: 0 0 28px; padding: 14px 18px;
  border-left: 3px solid transparent;
  border-image: var(--grad) 1;
  background: linear-gradient(90deg, rgba(126,182,247,.16), rgba(184,156,245,.14), rgba(243,164,200,.16));
  color: var(--muted); border-radius: 0 12px 12px 0;
}

.paper-list { display: grid; gap: 16px; }
.paper-card {
  display: grid; grid-template-columns: 110px 1fr; gap: 18px; align-items: start; padding: 22px 24px;
}
.paper-year {
  font-family: var(--display); font-size: 22px;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.paper-card h3 { font-size: 18px; margin-bottom: 8px; overflow-wrap: anywhere; }
.paper-card p { margin: 0; color: var(--muted); font-size: 14px; }

.site-footer {
  padding: 42px 0 28px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.35), rgba(246, 240, 255, .55));
}
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 28px; }
.footer-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.footer-logo img { width: 36px; height: 36px; }
.footer-grid a, .footer-grid p { display: block; color: var(--muted); font-size: 14px; margin-bottom: 6px; overflow-wrap: anywhere; }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 28px; padding-top: 16px;
  padding-bottom: env(safe-area-inset-bottom);
  border-top: 1px solid var(--line); color: var(--muted); font-size: 13px;
}

.reveal { opacity: 1; transform: none; }

@media (max-width: 1024px) {
  .hero-page { gap: 36px; }
  .card-grid, .member-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .hero-page, .profile, .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .paper-card { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stats strong { font-size: 22px; }
  .stats span { font-size: 11px; line-height: 1.35; }
  .site-nav {
    display: block;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    border-radius: 0;
  }
  .nav-shell {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255,255,255,.8);
    border-radius: 18px;
    overflow: visible;
    min-height: 56px;
    padding: 6px 8px 6px 12px;
    background: linear-gradient(120deg, rgba(255,255,255,.86), rgba(246, 240, 255, .9), rgba(255, 240, 246, .9));
    box-shadow: 0 14px 44px rgba(140, 120, 200, .16);
  }
  .brand { flex: 1; order: 0; }
  .nav-toggle, .nav-actions { flex-shrink: 0; order: 0; }
  .nav-toggle {
    width: 44px; height: 44px; padding: 12px; display: grid; align-content: center; gap: 6px;
    border: 0; border-radius: 50%; background: var(--grad); cursor: pointer; z-index: 22;
  }
  .nav-toggle span:not(.sr-only) { width: 18px; height: 1.5px; background: #fff; }
  .nav-links {
    position: fixed;
    left: max(12px, env(safe-area-inset-left));
    top: calc(env(safe-area-inset-top) + 72px);
    transform: none;
    width: calc(100% - 24px);
    max-width: none;
    max-height: min(70dvh, 420px);
    overflow: auto;
    padding: 10px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    text-align: left;
    pointer-events: auto;
    z-index: 21;
    border: 1px solid rgba(255,255,255,.6);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px 16px; border-radius: 12px; min-height: 44px; }
  .nav-links a::after { display: none; }
  .nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 19;
    background: rgba(42, 39, 64, .18);
  }
  .nav-backdrop.open { display: block; pointer-events: auto; }
  .page { padding: 20px 0 64px; }
  .section { margin-top: 48px; }
  .hero-page { gap: 24px; margin-bottom: 40px; }
  .hero-visual img, .profile img { border-radius: 22px; }
  .hero-carousel { border-radius: 22px; }
  .language-toggle { min-height: 44px; padding: 8px 10px; }
  .profile figure {
    max-width: 240px;
    margin-inline: auto;
  }
  .profile img { max-height: none; }
  .hero-page .eyebrow { font-size: 15px; letter-spacing: .05em; }
}

@media (max-width: 640px) {
  :root { --page-pad: 14px; --radius: 20px; }
  .brand-copy small { display: none; }
  .brand-copy strong { font-size: 12px; line-height: 1.25; }
  .brand img.brand-mark { width: 30px; height: 30px; }
  h1 { font-size: clamp(28px, 8.4vw, 40px); }
  h2 { font-size: clamp(22px, 6vw, 32px); }
  h3 { font-size: 19px; }
  .hero-lede { font-size: 16px; margin-bottom: 20px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .button { width: 100%; }
  .card-grid, .split-grid, .member-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .card, .award-card, .project-card, .paper-card { padding: 18px 16px; }
  .paper-year { font-size: 16px; }
  .paper-card h3 { font-size: 16px; line-height: 1.4; }
  .member-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .member-card .member-copy { padding: 12px 12px 16px; }
  .member-card h3 { font-size: 16px; }
  .note { padding: 12px 14px; }
  .site-footer { padding: 32px 0 20px; }
  .card, .paper-card, .award-card, .project-card, .member-card { backdrop-filter: none; }
}

@media (max-width: 400px) {
  :root { --page-pad: 12px; }
  .stats { gap: 8px; }
  .stats strong { font-size: 18px; }
}
