/* === Custom Properties === */
:root {
  --color-accent: #6a1b5e;
  --color-accent-hover: #4a1242;
  --color-text: #1a1a1a;
  --color-secondary: #555;
  --color-bg: #fafafa;
  --color-card: #f0f4f8;
  --color-nav-bg: #ffffff;
  --color-border: #e0e0e0;
  --font-heading: 'Lora', Georgia, 'Times New Roman', serif;
  --font-body: 'Atkinson Hyperlegible', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --max-width: 960px;
  --max-width-inner: 720px;
}

/* === Reset & Base === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  color: var(--color-accent-hover);
  text-decoration: underline;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  line-height: 1.3;
  font-weight: 600;
}

h1 { font-size: 2rem; margin-bottom: 0.25rem; }
h2 { font-size: 1.5rem; margin-top: 2rem; margin-bottom: 0.75rem; }
h3 { font-size: 1.15rem; margin-top: 1.5rem; margin-bottom: 0.5rem; }

p { margin-bottom: 0.75rem; }

ul, ol { padding-left: 1.5rem; }
li { margin-bottom: 0.4rem; }

img { max-width: 100%; height: auto; }

/* === Navigation === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-nav-bg);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.nav-bar {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
}

.nav-logo {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--color-text);
  text-decoration: none;
}

.nav-logo:hover {
  color: var(--color-accent);
  text-decoration: none;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  color: var(--color-secondary);
  font-size: 0.95rem;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
  text-decoration: none;
}

/* === Page Content === */
.page-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

.inner-page {
  max-width: var(--max-width-inner);
}

/* === Home Page Grid === */
.home-grid {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 3rem;
  align-items: start;
}

/* === Home: Intro === */
.intro .subtitle {
  font-size: 1.15rem;
  color: var(--color-secondary);
  margin-bottom: 0.25rem;
}

.intro .affiliation {
  font-size: 0.95rem;
  color: var(--color-secondary);
  margin-bottom: 1.25rem;
}

/* === Home: Sections === */
.research-blurb,
.affiliations-section,
.contact-section,
.highlights-section,
.background-section {
  margin-bottom: 1.75rem;
}

.affiliations-section ul,
.background-section ul {
  list-style: none;
  padding-left: 0;
}

.affiliations-section li::before {
  content: "- ";
  color: var(--color-secondary);
}

.background-section ul {
  margin-bottom: 1rem;
}

.background-section li {
  margin-bottom: 0.6rem;
  padding-left: 0;
}

/* === Highlights Card === */
.highlights-card {
  background: var(--color-card);
  border-left: 3px solid var(--color-accent);
  padding: 1.25rem 1.5rem;
  border-radius: 4px;
  margin-top: 0.5rem;
}

.highlights-card ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}

.highlights-card li {
  margin-bottom: 0.5rem;
}

.highlights-card li:last-child {
  margin-bottom: 0;
}

.highlights-archive {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.9rem;
}

.highlights-archive a {
  font-weight: 600;
}

/* === Sidebar === */
.sidebar {
  position: sticky;
  top: 5rem;
}

.profile-photo {
  width: 100%;
  border-radius: 6px;
  margin-bottom: 1.5rem;
}

.external-links ul {
  list-style: none;
  padding: 0;
}

.external-links li {
  margin-bottom: 0.5rem;
}

.external-links a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-secondary);
  font-size: 0.95rem;
  text-decoration: none;
}

.external-links a:hover {
  color: var(--color-accent);
  text-decoration: none;
}

.external-links svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  fill: currentColor;
}

/* === Research Page === */
.publications ol {
  padding-left: 2.5rem;
}

.publications li {
  margin-bottom: 1rem;
  line-height: 1.55;
}

.paper-title {
  font-weight: 600;
}

.paper-info {
  display: block;
  color: var(--color-text);
  font-size: 0.95rem;
  margin-top: 0.15rem;
}

.journal-name {
  color: #5c4a6b;
}

.paper-info-small {
  font-size: 0.82rem;
}

.paper-arxiv {
  display: block;
  font-size: 0.85rem;
  color: var(--color-secondary);
  margin-top: 0.1rem;
}

/* === Collaborators === */
.collaborator-list {
  list-style: none;
  padding-left: 0;
}

.collaborator-list li {
  margin-bottom: 0.3rem;
  font-size: 0.95rem;
}

.collaborator-note {
  font-size: 0.85rem;
  color: var(--color-secondary);
  margin-top: 0.75rem;
}

/* === Teaching Page === */
.course {
  margin-bottom: 2.5rem;
}

.course p:last-child {
  margin-bottom: 0;
}

/* === Students Page === */
.student-list {
  list-style: none;
  padding-left: 0;
}

.student-list li {
  margin-bottom: 0.75rem;
}

.project-keywords {
  color: var(--color-secondary);
  font-size: 0.95rem;
}

.student-cta {
  color: #1a4a2e;
  margin-top: 2.5rem;
  margin-bottom: 1.5rem;
}

/* === Blog Post === */
.blog-post {
  margin-top: 1rem;
}

.blog-subtitle {
  font-size: 1.1rem;
  color: var(--color-secondary);
  margin-bottom: 1rem;
}

.blog-byline {
  font-size: 0.9rem;
  color: var(--color-secondary);
  margin-bottom: 1.5rem;
}

.blog-figure {
  margin: 1.5rem 0;
  text-align: center;
}

.blog-figure img {
  max-width: 100%;
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.blog-figure-row {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.blog-figure-row img {
  max-width: 48%;
}

.blog-table-figure {
  margin: 1.5rem 0;
  overflow-x: auto;
}

.blog-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.blog-table caption {
  text-align: left;
  font-size: 0.85rem;
  color: var(--color-secondary);
  margin-bottom: 0.5rem;
  font-style: italic;
}

.blog-table th,
.blog-table td {
  padding: 0.45rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.blog-table thead th {
  font-weight: 600;
  border-bottom: 2px solid var(--color-accent);
  white-space: nowrap;
}

.blog-table tbody tr:hover {
  background: var(--color-card);
}

.blog-table-highlight td {
  font-weight: 600;
  background: #f5eef5;
}

.blog-table-small {
  font-size: 0.82rem;
}

.blog-table-small td,
.blog-table-small th {
  padding: 0.35rem 0.6rem;
}

.phantom-tags {
  font-size: 0.92rem;
  color: var(--color-secondary);
  line-height: 1.8;
}

@media (max-width: 768px) {
  .blog-figure-row {
    flex-direction: column;
    align-items: center;
  }

  .blog-figure-row img {
    max-width: 100%;
  }

  .blog-table-small {
    font-size: 0.75rem;
  }
}

/* === Past Highlights === */
.back-link {
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.highlight-year {
  margin-bottom: 2rem;
}

.highlight-year ul {
  list-style: none;
  padding-left: 0;
}

/* === Footer === */
.site-footer {
  text-align: center;
  padding: 1.5rem;
  font-size: 0.85rem;
  color: var(--color-secondary);
  border-top: 1px solid var(--color-border);
  margin-top: 2rem;
}

/* === Responsive === */
@media (max-width: 768px) {
  .home-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    order: -1;
    position: static;
    text-align: center;
    margin-bottom: 1rem;
  }

  .profile-photo {
    max-width: 180px;
    margin: 0 auto 1rem;
  }

  .external-links ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1.25rem;
  }

  .nav-bar {
    flex-direction: column;
    gap: 0.5rem;
  }

  .nav-links {
    gap: 1rem;
  }

  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.3rem; }
}
