:root {
  --purple: #543D7d;
  --purple-hover: #432f64;
  --text: #1a1a1a;
  --text-secondary: #555;
  --text-light: #888;
  --border: #e0e0e0;
  --bg-subtle: #f8f7fa;
  --max-width: 900px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: #fff;
  line-height: 1.6;
}

header {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 2rem 0;
  border-bottom: 3px solid var(--purple);
}

header h1 {
  font-size: 2rem;
  font-weight: 600;
  color: var(--purple);
  letter-spacing: -0.02em;
}

header h1 a {
  color: inherit;
  text-decoration: none;
}

header h1 a:hover {
  text-decoration: underline;
}

nav {
  margin-top: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

nav a {
  display: inline-block;
  margin-right: 1.5rem;
  padding-bottom: 0.6rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

nav a:hover,
nav a.active {
  color: var(--purple);
  border-bottom-color: var(--purple);
}

main {
  max-width: var(--max-width);
  margin: 3rem auto;
  padding: 0 2rem;
}

main > h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

section {
  margin-bottom: 2.75rem;
}

section h3 {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--purple);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.profile {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
}

.profile img {
  width: 168px;
  height: auto;
  flex-shrink: 0;
  border-radius: 4px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.profile-info h2 {
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.profile-info .title {
  font-size: 0.925rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

.profile-info .title .institution-gap {
  display: block;
  height: 0.4rem;
}

.contact {
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.contact a {
  color: var(--purple);
  text-decoration: none;
  font-weight: 500;
}

.contact a:hover {
  text-decoration: underline;
}

.pill-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pill-links a {
  font-size: 0.825rem;
  font-weight: 500;
  color: var(--purple);
  text-decoration: none;
  padding: 0.3rem 0.85rem;
  border: 1.5px solid var(--purple);
  border-radius: 999px;
  transition: background 0.15s, color 0.15s;
}

.pill-links a:hover {
  background: var(--purple);
  color: #fff;
}

.paper {
  margin-bottom: 1.5rem;
  padding-left: 1rem;
  border-left: 2px solid transparent;
  transition: border-color 0.15s;
}

.paper:hover {
  border-left-color: var(--purple);
}

.paper .citation {
  font-size: 0.925rem;
  line-height: 1.7;
}

.paper .citation a {
  color: var(--purple);
  text-decoration: none;
  font-weight: 500;
}

.paper .citation a:hover {
  text-decoration: underline;
}

.paper .note {
  font-size: 0.845rem;
  color: var(--text-secondary);
  margin-top: 0.3rem;
  padding-left: 1.5rem;
}

.paper .note a {
  color: var(--purple);
  text-decoration: none;
}

.paper .note a:hover {
  text-decoration: underline;
}

.paper .note + .note {
  margin-top: 0.15rem;
}

.content-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
}

.content-card p + p {
  margin-top: 1rem;
}

.content-card a,
.meta a,
.back-link,
.course a {
  color: var(--purple);
  text-decoration: none;
  font-weight: 500;
}

.content-card a:hover,
.meta a:hover,
.back-link:hover,
.course a:hover {
  text-decoration: underline;
}

.prose {
  font-size: 0.95rem;
}

.prose ul {
  margin: 0.75rem 0 0.75rem 1.25rem;
}

.prose li + li {
  margin-top: 0.35rem;
}

.course-grid {
  display: grid;
  gap: 1rem;
}

.course {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
}

.course h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.course .level {
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin-bottom: 0.4rem;
}

.course .terms {
  font-size: 0.9rem;
}

.advisor-grid {
  display: grid;
  gap: 1.25rem;
}

.advisor-group {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
}

.advisor-group h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--purple);
}

.advisor-group ul {
  margin-left: 1.1rem;
}

.advisor-group li + li {
  margin-top: 0.4rem;
}

.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--purple);
  margin-bottom: 0.65rem;
}

.meta {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.94rem;
}

.meta p + p {
  margin-top: 0.35rem;
}

.abstract-body {
  font-size: 0.95rem;
}

.abstract-body p + p {
  margin-top: 1rem;
}

.back-link {
  display: inline-block;
  margin-bottom: 1rem;
}

@media (max-width: 580px) {
  header h1 {
    font-size: 1.6rem;
  }

  .paper {
    padding-left: 0.75rem;
  }

  .profile {
    flex-direction: column;
  }

  .profile img {
    width: 140px;
  }

  .content-card,
  .meta,
  .course,
  .advisor-group {
    padding: 1rem;
  }
}
