:root {
  --bg: #f7f8f6;
  --panel: #ffffff;
  --ink: #1f2a33;
  --muted: #64707a;
  --accent: #0a5d7a;
  --accent-soft: #dcebf1;
  --line: #d7dee3;
  --shadow: 0 18px 45px rgba(26, 40, 50, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Source Sans 3", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 0%, #f7fafb 0%, transparent 38%),
    radial-gradient(circle at 90% 25%, #faf6ee 0%, transparent 34%),
    var(--bg);
  min-height: 100vh;
}

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
  background-image:
    linear-gradient(to right, rgba(31, 42, 51, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(31, 42, 51, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at center, black 45%, transparent 100%);
}

.shell {
  width: min(1200px, 92vw);
  margin: 3rem auto;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1.5rem;
  position: relative;
  z-index: 1;
}

.profile-card {
  position: sticky;
  top: 1rem;
  align-self: start;
  background: linear-gradient(165deg, #ffffff 0%, #fbfcfd 100%);
  border: 1px solid #d7e0e5;
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 1.6rem;
}

.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.profile-photo {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  display: block;
  object-fit: cover;
  object-position: center 24%;
  border: 2px solid #d6e5ec;
  box-shadow: 0 8px 18px rgba(26, 40, 50, 0.14);
}

h1,
h2,
h3 {
  font-family: "Cormorant Garamond", serif;
  line-height: 1;
}

h1 {
  margin: 1.15rem 0 0.5rem;
  font-size: 2.1rem;
}

h2 {
  margin: 0.2rem 0 1rem;
  font-size: 2.1rem;
  color: #114d62;
}

.role {
  margin: 0;
  color: var(--accent);
  font-weight: 600;
}

.affiliation {
  color: var(--muted);
  margin-top: 0.8rem;
  line-height: 1.5;
}

.affiliation-line {
  white-space: nowrap;
  font-size: 0.96rem;
}

nav ul {
  list-style: none;
  padding: 0;
  margin: 1.4rem 0 1.1rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

nav li + li {
  border-top: 1px dashed var(--line);
}

nav a {
  display: block;
  padding: 0.72rem 0;
  text-decoration: none;
  color: var(--ink);
}

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

nav a[href^="#"] {
  transition: color 0.18s ease;
}

.quick-links {
  display: flex;
  gap: 0.35rem;
  flex-wrap: nowrap;
  justify-content: center;
  margin-top: 1rem;
}

.quick-links a {
  text-decoration: none;
  color: var(--accent);
  border: 1px solid #9fc0cc;
  background: rgba(10, 93, 122, 0.04);
  border-radius: 999px;
  padding: 0.25rem 0.55rem;
  font-size: 0.82rem;
  line-height: 1.1;
  white-space: nowrap;
}

.quick-links a:hover {
  background: rgba(10, 93, 122, 0.1);
}

.content {
  display: grid;
  gap: 1rem;
}

.panel {
  background: var(--panel);
  border: 1px solid #d5e2e7;
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 1.8rem;
}

p {
  line-height: 1.65;
}

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

.chips {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}

.chips li {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #0c455b;
}

.pub-list {
  margin: 0;
  padding-left: 1.2rem;
}

.pub-list li {
  margin-bottom: 1rem;
}

.apa-entry {
  margin: 0;
  line-height: 1.6;
}

.apa-authors,
.apa-year,
.apa-title,
.apa-source {
  color: var(--ink);
}

.pub-journal,
.pub-volume {
  font-style: italic;
}

.pub-meta,
.note {
  color: var(--muted);
}

.publications-content,
.current-projects-content {
  min-height: 80px;
}

.pub-group + .pub-group,
.projects-group + .projects-group {
  margin-top: 2rem;
  padding-top: 1.2rem;
  border-top: 1px solid #d7e6eb;
}

.pub-group h3,
.projects-group h3 {
  margin: 0.2rem 0 0.8rem;
  font-size: 1.65rem;
  color: #0f5b74;
}

.pub-list.full li,
.projects-list li {
  border-left: 2px solid #96bcc8;
  padding-left: 0.8rem;
}

.projects-list {
  margin: 0;
  padding-left: 1.2rem;
}

.projects-list li {
  margin-bottom: 1rem;
}

.project-title {
  display: block;
  color: var(--ink);
  line-height: 1.6;
}

.project-description {
  display: block;
  color: var(--muted);
  margin-top: 0.2rem;
  line-height: 1.55;
}

.project-status {
  display: inline-block;
  margin-top: 0.35rem;
  border: 1px solid #9fc0cc;
  border-radius: 999px;
  padding: 0.08rem 0.5rem;
  font-size: 0.78rem;
  color: #245a6f;
  background: rgba(10, 93, 122, 0.05);
}

.pub-links {
  display: inline-flex;
  margin-top: 0.3rem;
}

.pub-links a {
  text-decoration: none;
  border: 1px solid #9fc0cc;
  border-radius: 999px;
  padding: 0.16rem 0.6rem;
  font-size: 0.82rem;
}

.teaching-list {
  display: grid;
  gap: 0.7rem;
}

.teaching-list article {
  border: 1px solid #d5e2e7;
  border-radius: 14px;
  padding: 0.9rem 1rem;
  background: #fbfcfd;
}

.teaching-list h3 {
  margin: 0 0 0.55rem;
  font-size: 1.25rem;
  color: var(--accent);
}

.teaching-item {
  font-size: 0.97rem;
  line-height: 1.45;
  color: var(--ink);
}

.teaching-item + .teaching-item {
  margin-top: 0.35rem;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  animation: rise 0.7s ease forwards;
}

.reveal:nth-child(2) {
  animation-delay: 0.08s;
}

.reveal:nth-child(3) {
  animation-delay: 0.16s;
}

.reveal:nth-child(4) {
  animation-delay: 0.24s;
}

.reveal:nth-child(5) {
  animation-delay: 0.32s;
}

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

@media (max-width: 960px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .profile-card {
    position: static;
  }
}
