:root {
  --bg: #e8eef6;
  --bg-mid: #f2f6fb;
  --surface: #fff;
  --border: rgba(0, 30, 80, 0.09);
  --border2: rgba(0, 30, 80, 0.14);
  --accent: #1a5fc8;
  --accent2: #0d2e6e;
  --accent-soft: rgba(26, 95, 200, 0.1);
  --text: #0a1a3a;
  --text2: #3a5070;
  --text3: #8aa0bc;
  --mono: "IBM Plex Mono", monospace;
  --sans: "IBM Plex Sans", "Noto Sans SC", sans-serif;
  --radius-lg: 16px;
  --radius-md: 10px;
  --shadow-card: 0 4px 6px rgba(13, 46, 110, 0.04), 0 16px 40px rgba(13, 46, 110, 0.08);
  --shadow-hover: 0 8px 24px rgba(13, 46, 110, 0.1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.65;
  min-height: 100vh;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(77, 163, 245, 0.18), transparent 55%),
    radial-gradient(ellipse 70% 50% at 100% 50%, rgba(26, 95, 200, 0.06), transparent 50%);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.fp-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 2.5rem 1.35rem 3.5rem;
}

.fp-back {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text2);
  margin-bottom: 1.35rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(13, 46, 110, 0.06);
  transition: color 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.fp-back:hover {
  color: var(--accent2);
  text-decoration: none;
  border-color: rgba(26, 95, 200, 0.25);
  box-shadow: 0 2px 10px rgba(26, 95, 200, 0.1);
  transform: translateY(-1px);
}
.fp-back-icon { opacity: 0.75; }

.fp-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.fp-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent2), var(--accent), #4da3f5);
  opacity: 0.95;
}

.fp-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.35rem 1.5rem;
  padding: 2rem 2rem 1.75rem;
  background: linear-gradient(165deg, rgba(248, 250, 252, 0.98) 0%, rgba(255, 255, 255, 0.5) 55%, transparent 100%);
  border-bottom: 1px solid var(--border);
  transition: transform 0.05s linear, box-shadow 0.25s ease;
  will-change: transform;
}

body.fp-scrolled .fp-card {
  box-shadow: 0 6px 10px rgba(13, 46, 110, 0.06), 0 22px 48px rgba(13, 46, 110, 0.11);
}

html.js-fp-scroll-fx .fp-scroll-reveal {
  opacity: 0;
  transform: translateY(1rem);
  transition: opacity 0.01s;
  will-change: opacity, transform;
}
html.js-fp-scroll-fx .fp-scroll-reveal.is-visible {
  opacity: 1;
  transform: none;
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1), transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: auto;
}

.fp-avatar-wrap { flex-shrink: 0; }

.fp-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.1rem;
  font-weight: 600;
  color: #fff;
  box-shadow: 0 6px 20px rgba(13, 46, 110, 0.2), 0 0 0 4px rgba(255, 255, 255, 0.9);
}
.fp-avatar-img {
  display: block;
  border-radius: 14px;
  object-fit: contain;
  object-position: center center;
  background: #fff;
  border: 1px solid var(--border2);
  box-shadow: 0 6px 20px rgba(13, 46, 110, 0.12), 0 0 0 4px rgba(255, 255, 255, 0.95);
}

.av-blue { background: linear-gradient(145deg, #1a5fc8, #4da3f5); }
.av-navy { background: linear-gradient(145deg, #0d2e6e, #1a5fc8); }
.av-purple { background: linear-gradient(145deg, #5c3fc4, #8b6fd4); }
.av-teal { background: linear-gradient(145deg, #0d9c5a, #3d9ebe); }

.fp-header-text { min-width: 0; flex: 1; }

.fp-name {
  font-family: var(--mono);
  font-size: clamp(1.5rem, 4vw, 1.85rem);
  font-weight: 600;
  color: var(--accent2);
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 0.45rem;
}

.fp-title-line {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text2);
  line-height: 1.5;
  max-width: 36em;
}

.fp-content {
  padding: 0.25rem 2rem 0.5rem;
}

.fp-block {
  margin-top: 1.65rem;
}
.fp-block:first-child { margin-top: 1.25rem; }

.fp-section-title {
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 600;
  color: var(--accent2);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 0.65rem;
  padding-left: 0.65rem;
  border-left: 3px solid var(--accent);
  line-height: 1.35;
}
.fp-section-note {
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: none;
  color: var(--text3);
  font-size: 0.58rem;
}

.fp-text {
  font-size: 0.94rem;
  color: var(--text2);
  white-space: pre-wrap;
  line-height: 1.72;
}

.fp-block-about {
  padding: 1.1rem 1.15rem;
  margin-left: -0.25rem;
  margin-right: -0.25rem;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(26, 95, 200, 0.05) 0%, rgba(77, 163, 245, 0.04) 100%);
  border: 1px solid rgba(26, 95, 200, 0.1);
}
.fp-block-about .fp-section-title { margin-bottom: 0.55rem; }

.fp-intro { margin-top: 0; line-height: 1.78; }

.fp-intro-link {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  word-break: break-all;
  font-weight: 500;
}
.fp-intro-link:hover { color: var(--accent2); }

.fp-contact-mail {
  font-family: var(--mono);
  font-size: 0.88rem;
}
.fp-contact-mail a {
  display: inline-block;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  background: var(--accent-soft);
  border: 1px solid rgba(26, 95, 200, 0.15);
  transition: background 0.15s, border-color 0.15s;
}
.fp-contact-mail a:hover {
  text-decoration: none;
  background: rgba(26, 95, 200, 0.14);
  border-color: rgba(26, 95, 200, 0.28);
}

.fp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.65rem;
}
.fp-tag {
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 500;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(26, 95, 200, 0.16);
  color: var(--accent2);
}

.fp-block-pubs .fp-pub-list { margin-top: 0.75rem; }

.fp-pub-list {
  display: grid;
  gap: 0.75rem;
}
.fp-pub-item {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.95rem 1rem 0.95rem 1.05rem;
  background: linear-gradient(180deg, #fbfcff 0%, #f6f9fc 100%);
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
}
.fp-pub-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65rem;
  bottom: 0.65rem;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: linear-gradient(180deg, var(--accent2), var(--accent));
  opacity: 0.85;
}
.fp-pub-item:hover {
  border-color: rgba(26, 95, 200, 0.22);
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}

.fp-pub-title {
  display: inline;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent2);
  line-height: 1.5;
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: color 0.15s, background-size 0.2s ease;
}
.fp-pub-title:hover {
  color: var(--accent);
  text-decoration: none;
  background-size: 100% 1px;
}

.fp-pub-authors {
  margin-top: 0.45rem;
  font-size: 0.78rem;
  color: var(--text2);
  line-height: 1.5;
}
.fp-pub-venue {
  margin-top: 0.35rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text3);
  letter-spacing: 0.02em;
}

.fp-footer {
  margin-top: 0.25rem;
  padding: 1.35rem 2rem 1.5rem;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.5) 0%, rgba(240, 244, 248, 0.35) 100%);
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--text3);
  line-height: 1.65;
  text-align: center;
}
.fp-footer-brand {
  font-weight: 600;
  color: var(--accent2);
  letter-spacing: 0.06em;
}
.fp-footer-sep { margin: 0 0.35rem; opacity: 0.5; }
.fp-footer-org { display: inline; }

@media (max-width: 520px) {
  .fp-wrap { padding: 1.75rem 1rem 2.5rem; }
  .fp-header { padding: 1.5rem 1.25rem 1.35rem; }
  .fp-content { padding-left: 1.25rem; padding-right: 1.25rem; }
  .fp-footer { padding-left: 1.25rem; padding-right: 1.25rem; }
  .fp-avatar, .fp-avatar-img {
    width: 100px;
    height: 100px;
  }
  .fp-avatar { font-size: 1.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  .fp-back:hover,
  .fp-pub-item:hover { transform: none; }
  .fp-pub-title { transition: none; }
  body.fp-scrolled .fp-card { box-shadow: var(--shadow-card); }
  html.js-fp-scroll-fx .fp-scroll-reveal,
  html.js-fp-scroll-fx .fp-scroll-reveal.is-visible {
    opacity: 1;
    transform: none;
    transition: none;
    will-change: auto;
  }
  .fp-header { transform: none !important; will-change: auto; }
}
