:root {
  --bg: #f3f7fc;
  --panel: transparent;
  --text: #162033;
  --muted: #5d6b82;
  --body-copy: #465468;
  --line: rgba(22, 32, 51, 0.12);
  --accent: #1f5fbf;
  --accent-soft: rgba(31, 95, 191, 0.12);
  --shadow: 0 20px 50px rgba(22, 32, 40, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(52, 120, 246, 0.12), transparent 24%),
    radial-gradient(circle at bottom left, rgba(103, 159, 255, 0.1), transparent 22%),
    var(--bg);
  position: relative;
  overflow-x: hidden;
}

a {
  color: inherit;
}

.bg-shape {
  position: fixed;
  border-radius: 999px;
  filter: blur(12px);
  pointer-events: none;
  opacity: 0.9;
}

.shape-1 {
  width: 320px;
  height: 320px;
  background: linear-gradient(
    145deg,
    rgba(52, 120, 246, 0.22),
    rgba(52, 120, 246, 0.03)
  );
  top: -100px;
  right: -60px;
}

.shape-2 {
  width: 260px;
  height: 260px;
  background: linear-gradient(
    145deg,
    rgba(122, 167, 255, 0.2),
    rgba(122, 167, 255, 0.03)
  );
  bottom: -70px;
  left: -80px;
}

.layout {
  width: min(1180px, 94vw);
  margin: 2rem auto;
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 1.2rem;
  align-items: start;
}

.banner {
  grid-column: 1 / -1;
  width: 100%;
  aspect-ratio: 1019 / 355;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 14px 30px rgba(20, 30, 50, 0.12);
}

.banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-panel,
.content-panel {
  background: var(--panel);
  border: 1px solid transparent;
  border-radius: 24px;
}

.profile-panel {
  padding: 0 1.4rem 1.4rem;
  position: sticky;
  top: 1.2rem;
}

.content-panel {
  padding-top: 1.4rem;
}

.profile-photo {
  width: 100%;
  display: block;
  margin: -100px 0 0;
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  object-fit: cover;
  object-position: center 18%;
  border: 4px solid #ffffff;
  box-shadow: 0 14px 26px rgba(20, 30, 50, 0.18);
}

h1 {
  margin: 1.15rem 0 0.4rem;
  font-size: 1.78rem;
  line-height: 1.2;
  letter-spacing: -0.03em;
  text-align: center;
}

.profile-panel h1,
 .profile-panel .actions,
 .profile-panel .bio {
  width: 100%;
}

.bio {
  margin: 0.95rem 0 0;
  line-height: 1.55;
  color: var(--body-copy);
}

.actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 0.9rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 0.55rem 0.65rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.5);
  font-weight: 600;
  font-size: 0.88rem;
  white-space: normal;
  min-height: 44px;
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-1px);
  background: rgba(23, 34, 42, 0.04);
  border-color: rgba(23, 34, 42, 0.2);
}

.content-panel {
  padding: 1.4rem;
}

.sidebar-bio {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

#research {
  margin-bottom: 2rem;
}

#projects {
  padding-top: 1.4rem;
}

.section-header {
  border-bottom: 2px solid #5b9bd5;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.section-header h2 {
  margin: 0;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
}

.subsection-label {
  margin: 0 0 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.section-header p {
  margin: 0.25rem 0 0;
  color: var(--body-copy);
}

.prose-block {
  display: grid;
  gap: 0.95rem;
  max-width: 66ch;
}

.prose-block p {
  margin: 0;
  color: var(--body-copy);
  line-height: 1.7;
  font-size: 1.02rem;
}

.papers-list {
  display: grid;
  gap: 0.25rem;
}

.paper-item {
  padding: 0.8rem 0 1.05rem;
  border-bottom: 1px solid transparent;
  animation: rise 380ms ease both;
}

.paper-item h3 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.35;
}

.paper-meta {
  margin: 0.35rem 0 0.45rem;
  color: var(--body-copy);
  font-size: 0.95rem;
}

.jmp-tag {
  color: #c0392b;
  font-weight: 700;
}

.abstract-text {
  margin: 0.7rem 0 0;
  color: var(--body-copy);
  font-size: 1rem;
  line-height: 1.58;
  max-width: 70ch;
}

.paper-actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  align-items: center;
}

.paper-actions a,
.abstract-btn {
  display: inline-flex;
  align-items: center;
  border: none;
  background: #5b9bd5;
  color: #ffffff;
  font: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  border-radius: 10px;
  padding: 0.18rem 0.55rem;
  line-height: 1.4;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 180ms ease;
}

.paper-actions a:hover,
.paper-actions a:focus-visible,
.abstract-btn:hover,
.abstract-btn:focus-visible {
  background: #4a86c0;
}

.abstract-btn[aria-expanded="true"] {
  background: #3a72aa;
}

.wip-block {
  margin-top: 1rem;
  padding-top: 0.9rem;
}

.compact {
  padding-bottom: 0.8rem;
}

.project-item {
  max-width: 70ch;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 940px) {
  .layout {
    grid-template-columns: 1fr;
    margin: 1.2rem auto;
  }

  .profile-panel {
    position: static;
  }

  .profile-photo {
    width: 240px;
    height: 240px;
    margin: -40px auto 0;
  }

  .actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .actions .btn:nth-child(3) {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc(50% - 0.25rem);
  }
}

@media (max-width: 640px) {
  .profile-panel {
    padding: 0 1rem 1rem;
  }

  .content-panel {
    padding: 1rem;
  }

  .profile-photo {
    width: 200px;
    height: 200px;
    margin: -30px auto 0;
  }

  .btn {
    padding-left: 0.45rem;
    padding-right: 0.45rem;
  }
}
