:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --ink: #2f2f2f;
  --muted: #666666;
  --line: #e4e4e4;
  --accent: #2d5d8a;
  --accent-soft: #f4f8fb;
  --max-width: 1180px;
  --sidebar-width: 280px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
}

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

.site-shell {
  width: min(calc(100% - 40px), var(--max-width));
  margin: 28px auto;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  gap: 40px;
}

.sidebar {
  position: sticky;
  top: 24px;
  align-self: start;
}

.profile-card {
  padding: 24px;
  background: var(--surface);
  text-align: center;
}

.avatar-wrap {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 0 auto 18px;
}

.avatar-photo,
.avatar {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

.avatar-photo {
  display: block;
  object-fit: cover;
  background: #f3f6f9;
}

.avatar {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #eaf2f8, #f7fafc);
  color: var(--accent);
  font-size: 2rem;
  font-weight: 700;
}

.avatar-photo[src] + .avatar-fallback {
  display: none;
}

.profile-card h1,
.content-section h2,
.content-section h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
}

.profile-location-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
}

.profile-card h1 {
  font-size: 1.72rem;
  line-height: 1.16;
}

.profile-role,
.profile-location {
  margin: 8px 0 0;
  color: var(--muted);
}

.profile-location {
  text-align: left;
}

.profile-links,
.side-nav {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.profile-links {
  justify-items: start;
}

.profile-links a,
.side-nav a,
.link-row a {
  text-decoration: none;
}

.profile-links a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-start;
}

.content-section a {
  color: var(--accent);
  text-decoration: none;
}

.content-section a:hover {
  text-decoration: none;
}

.link-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 20px;
}

.link-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.github-icon {
  width: 16px;
  height: 16px;
}
.link-icon svg.github-icon {
  width: 16px;
  height: 16px;
}
.side-nav {
  margin-top: 24px;
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
}

.side-nav a {
  color: var(--ink);
}

.side-nav a:hover,
.profile-links a:hover,
.link-row a:hover {
  color: var(--accent);
}

.content {
  min-width: 0;
}

.content-section + .content-section {
  margin-top: 42px;
}

.content-section h2 {
  font-size: 1.6rem;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.content-section h3 {
  font-size: 1.28rem;
  line-height: 1.35;
}

.timeline-list,
.plain-list,
.skill-groups {
  display: grid;
  gap: 18px;
}

.timeline-item,
.research-item {
  display: grid;
  gap: 18px;
}

.timeline-item {
  grid-template-columns: 140px minmax(0, 1fr);
}

.timeline-meta,
.research-meta,
.research-authors {
  line-height: 1.35;
  margin-top: 4px;
  margin-bottom: 0;
}
.muted {
  color: var(--muted);
}

.research-item {
  grid-template-columns: 180px minmax(0, 1fr);
  align-items: start;
  column-gap: 22px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.research-thumb {
  position: relative;
  width: 180px;
  height: 110px;
  border: 1px solid var(--line);
  background: var(--accent-soft);
  overflow: hidden;
  flex: 0 0 180px;
}

.research-thumb img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.research-body {
  min-width: 0;
}

.research-body > * + * {
  margin-top: 8px;
}

.link-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.plain-list {
  padding-left: 20px;
}

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 500ms ease, transform 500ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 920px) {
  .site-shell,
  .timeline-item,
  .research-item {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }
}

@media (max-width: 640px) {
  .site-shell {
    width: min(calc(100% - 24px), var(--max-width));
    margin: 16px auto 28px;
  }

  .profile-card {
    padding: 18px;
  }

  .content-section h2 {
    font-size: 1.45rem;
  }
}

.education-list {
  display: grid;
  gap: 26px;
}

.education-item {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.education-head,
.education-row,
.education-detail {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}

.education-head {
  margin-bottom: 8px;
}

.education-row {
  margin-bottom: 8px;
}

.education-head span,
.education-row span,
.education-detail span {
  color: var(--muted);
  white-space: nowrap;
}

.education-detail {
  margin: 6px 0 0;
}

@media (max-width: 720px) {
  .education-head,
  .education-row,
  .education-detail {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}

.academic-education-list {
  gap: 18px;
}

.academic-education-item {
  padding-bottom: 0;
  border-bottom: none;
}

.academic-education-item + .academic-education-item {
  margin-top: 2px;
}

.academic-education-head {
  margin-bottom: 10px;
  align-items: baseline;
}

.academic-education-head h3 {
  font-size: 1.05rem;
  font-style: italic;
  font-weight: 600;
  color: #4a4a4a;
}

.internship-item .academic-education-head a,
.internship-item .academic-education-head a:hover {
  color: inherit;
  text-decoration: none;
}

.academic-education-head span {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.98rem;
  font-style: italic;
  color: #666666;
}

.academic-education-item p {
  margin: 0 0 6px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.98rem;
  line-height: 1.55;
  color: #555555;
}

.research-authors sup {
  font-size: 0.72em;
  line-height: 0;
}

.research-thumb,
.research-thumb img {
  max-width: 180px;
  max-height: 110px;
}

#publications .research-item:last-of-type {
  border-bottom: none;
}

#skills .skill-list-groups {
  display: grid;
  gap: 28px;
}

#skills .skill-group {
  display: grid;
  gap: 10px;
}

#skills .skill-group h3 {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.3;
}

#skills .skill-list {
  margin: 0;
  padding-left: 28px;
}

#skills .skill-list li {
  margin-bottom: 10px;
  color: #555555;
  line-height: 1.55;
}

#skills .skill-list li:last-child {
  margin-bottom: 0;
}

#skills .skill-list strong {
  color: #5a5a5a;
  font-weight: 600;
}
