:root {
  --bg: #f4f6fb;
  --bg-accent: #eaf1ff;
  --ink: #1f2633;
  --muted: #5d697a;
  --line: #d7deec;
  --card: rgba(255, 255, 255, 0.86);
  --accent: #2062d7;
  --accent-2: #1f9c8f;
  --radius: 20px;
  --shadow: 0 14px 38px rgba(31, 38, 51, 0.08);
  --scroll-track: #e7edf9;
  --scroll-thumb: #8ea3cd;
  --scroll-thumb-hover: #738cbe;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-color: var(--scroll-thumb) var(--scroll-track);
  scrollbar-width: thin;
}

::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: var(--scroll-track);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--scroll-thumb), #7f96c4);
  border: 2px solid var(--scroll-track);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--scroll-thumb-hover), #657eaf);
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 2% 2%, rgba(32, 98, 215, 0.14) 0, rgba(32, 98, 215, 0) 42%),
    radial-gradient(circle at 94% 6%, rgba(31, 156, 143, 0.12) 0, rgba(31, 156, 143, 0) 34%),
    linear-gradient(145deg, var(--bg), var(--bg-accent));
  font-family: "Manrope", sans-serif;
  line-height: 1.65;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(31, 38, 51, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 38, 51, 0.035) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.page-shell {
  width: min(1280px, calc(100% - 22px));
  margin: 22px auto 52px;
}

.top-nav {
  position: sticky;
  top: 10px;
  z-index: 20;
  margin: 4px 0 14px;
  border: 1px solid #c7d6f0;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(32, 98, 215, 0.12), rgba(255, 255, 255, 0.9));
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 14px;
}

.top-nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "Sora", sans-serif;
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.top-nav-photo {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  object-fit: cover;
  border: 1px solid #d7e2f8;
}

.top-nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.top-nav-links a {
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  border: 1px solid #c4d2ee;
  border-radius: 999px;
  padding: 5px 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(245, 249, 255, 0.82));
  transition:
    transform 0.18s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.22s ease,
    background 0.22s ease;
}

.top-nav-links a::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0));
  transform: translateX(-135%);
  transition: transform 0.35s ease;
}

.top-nav-links a:hover {
  color: #134fb8;
  border-color: #98b2e3;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(238, 245, 255, 0.9));
  box-shadow: 0 8px 18px rgba(26, 76, 169, 0.18);
  transform: translateY(-1px);
}

.top-nav-links a:hover::before {
  transform: translateX(135%);
}

.top-nav-links a:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(32, 98, 215, 0.22), 0 8px 18px rgba(26, 76, 169, 0.18);
}

.top-nav-links a.is-active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #2f6fe4, #4d8cff);
  box-shadow: 0 10px 22px rgba(32, 98, 215, 0.34);
}

.top-nav-links a.is-active:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(32, 98, 215, 0.36);
}

.top-nav-links a.is-active::before {
  display: none;
}

.top-nav-links a:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(26, 76, 169, 0.2);
}

.top-nav-links a:active.is-active {
  box-shadow: 0 6px 14px rgba(32, 98, 215, 0.28);
}

.top-nav-brand:hover {
  color: var(--accent);
}

.layout {
  display: grid;
  grid-template-columns: minmax(220px, 255px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.content {
  min-width: 0;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(7px);
}

.sidebar {
  position: sticky;
  top: clamp(40px, 8vh, 72px);
  padding: 22px 16px 26px;
  text-align: center;
}

.profile-photo {
  width: 144px;
  height: 144px;
  border-radius: 50%;
  object-fit: contain;
  object-position: center;
  display: block;
  margin: 2px auto 18px;
  padding: 4px;
  background: #edf2fe;
  border: 3px solid #edf2fe;
  box-shadow: 0 8px 24px rgba(31, 38, 51, 0.16);
}

.profile-name {
  margin: 0;
  font-family: "Sora", sans-serif;
  font-size: 1.44rem;
  line-height: 1.2;
}

.profile-role {
  margin: 12px 0 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--muted);
}

.profile-school {
  margin: 12px 0 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #3f4d62;
}

.profile-meta-list {
  margin-top: 18px;
  width: min(190px, 100%);
  margin-left: auto;
  margin-right: auto;
}

.profile-meta-item {
  margin: 14px 0 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  gap: 12px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.26;
  text-align: left;
}

.meta-icon {
  width: 17px;
  height: 17px;
  display: inline-flex;
  flex: 0 0 17px;
  margin-top: 1px;
}

.meta-icon svg {
  width: 17px;
  height: 17px;
  fill: #111111;
}

.meta-icon-scholar {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
}

.meta-icon-scholar svg {
  width: 19px;
  height: 19px;
}

.profile-meta-item a {
  color: inherit;
  text-decoration: none;
}

.profile-meta-item a:hover,
.profile-meta-item a:focus-visible {
  text-decoration: underline;
}

.sidebar-note {
  margin-top: 22px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding: 13px 15px 14px;
  border: 1px solid #d9e1f2;
  border-radius: 12px;
  background: linear-gradient(160deg, rgba(244, 248, 255, 0.72), rgba(255, 255, 255, 0.74));
  text-align: left;
}

.sidebar-note-title {
  margin: 0;
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #3b66bf;
}

.sidebar-note-text {
  margin: 6px 0 0;
  font-size: 0.82rem;
  line-height: 1.5;
  color: #5c6879;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
}

.hero {
  margin-top: 6px;
  padding: 30px;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  right: -86px;
  top: -112px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(32, 98, 215, 0.18), rgba(32, 98, 215, 0));
  pointer-events: none;
}

.hero h2 {
  margin: 9px 0 0;
  max-width: 760px;
  font-family: "Sora", sans-serif;
  font-size: clamp(1.55rem, 3.1vw, 2.48rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.hero-text {
  margin: 14px 0 0;
  max-width: 720px;
  color: var(--muted);
}

.hero-tags {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.83rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.86);
}

.hero-actions {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 10px 15px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #2f7dff);
  box-shadow: 0 8px 20px rgba(32, 98, 215, 0.3);
}

.btn-outline {
  color: var(--ink);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
}

.btn:hover {
  transform: translateY(-2px);
}

.grid-two {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.grid-two .card {
  padding: 22px;
}

h3 {
  margin: 0 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Sora", sans-serif;
  font-size: 1.24rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #1a2437;
}

h3::before {
  content: "";
  width: 5px;
  height: 1.1em;
  border-radius: 999px;
  background: linear-gradient(180deg, #2f6fe4, #6fa0ff);
}

#projects {
  margin-top: 18px;
  padding: 22px;
}

.project-item + .project-item {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px dashed var(--line);
}

.project-title {
  margin: 0 0 10px;
  font-family: "Sora", sans-serif;
  font-size: 1.08rem;
  font-weight: 700;
}

.muted {
  color: var(--muted);
}

.list {
  margin: 0;
  padding-left: 18px;
}

.list li {
  margin: 10px 0;
}

.pub-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.pub-entry {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 16px 0;
  border-top: 1px dashed var(--line);
}

.pub-entry:first-child {
  padding-top: 0;
  border-top: 0;
}

.pub-thumb {
  flex-shrink: 0;
  width: 300px;
  height: 169px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 4px 16px rgba(31, 38, 51, 0.12);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.pub-thumb:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(31, 38, 51, 0.18);
}

.pub-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #fff;
}

.pub-thumb a {
  display: block;
  width: 100%;
  height: 100%;
}

.pub-thumb-empty {
  background: var(--line);
  opacity: 0.4;
}

.pub-body {
  flex: 1;
  min-width: 0;
}

.pub-title {
  margin: 2px 0 8px;
  font-family: "Manrope", sans-serif;
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.4;
}

.pub-authors {
  margin: 0 0 8px;
  font-size: 0.94rem;
  line-height: 1.45;
}

.pub-links {
  margin: 0;
}

.timeline {
  margin: 0;
  padding: 0 0 0 6px;
  list-style: none;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(180deg, rgba(47, 111, 228, 0.72), rgba(111, 160, 255, 0.24));
}

.timeline li {
  position: relative;
  margin: 0;
  padding: 0 0 18px 22px;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -4px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, #4b84eb, #7ea9ff);
  box-shadow: 0 0 0 3px rgba(47, 111, 228, 0.1);
}

.timeline li:last-child {
  padding-bottom: 0;
}

.line-title {
  margin: 4px 0 0;
  font-weight: 600;
  line-height: 1.38;
}

.line-title a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(32, 98, 215, 0.28);
  transition: color 0.18s ease, border-color 0.18s ease;
}

.line-title a:hover {
  color: var(--accent);
  border-color: currentColor;
}

.line-sub {
  margin: 0;
  color: #4d7fe0;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.footer {
  margin-top: 20px;
  text-align: center;
  color: var(--muted);
  font-size: 0.89rem;
}

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

.reveal {
  opacity: 0;
  transform: translateY(10px);
  animation: reveal 0.5s ease forwards;
}

.delay-1 {
  animation-delay: 0.07s;
}

.delay-2 {
  animation-delay: 0.14s;
}

.delay-3 {
  animation-delay: 0.21s;
}

.delay-4 {
  animation-delay: 0.28s;
}

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

@media (max-width: 980px) {
  .top-nav {
    top: 8px;
    padding: 10px 12px;
  }

  .top-nav-photo {
    width: 22px;
    height: 22px;
  }

  .top-nav-links {
    justify-content: flex-start;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .grid-two {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 24px;
  }
}

@media (max-width: 620px) {
  .page-shell {
    width: min(1280px, calc(100% - 16px));
    margin-top: 14px;
  }

  .top-nav-links a {
    font-size: 0.8rem;
    padding: 4px 9px;
  }

  .top-nav-brand span {
    display: none;
  }

  .profile-photo {
    width: 136px;
    height: 136px;
  }

  .headline {
    font-size: clamp(1.55rem, 8vw, 2.3rem);
  }

  .pub-entry {
    flex-direction: column;
  }

  .pub-thumb {
    width: 100%;
    height: auto;
    max-width: 360px;
  }

  .pub-thumb img {
    height: auto;
    aspect-ratio: 16 / 9;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .pub-thumb:hover {
    transform: none;
  }

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

  .btn {
    transition: none;
  }
}
