/* Base styles for the site */
body {
  font-family: 'Open Sans', sans-serif;
  margin: 0;
  background-color: #ffffff;
  color: #333333;
  line-height: 1.6;
  font-size: 16px;
}

.container {
  width: 90%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header styles
   The header uses flexbox to position the site name on the left and the
   navigation on the right, similar to Luke Olson's site. The background
   remains light with a subtle bottom border. */
.site-header {
  background-color: #ffffff;
  border-bottom: 1px solid #e5e5e5;
  padding: 0.75rem 0;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header .brand {
  font-size: 1.5rem;
  font-weight: 700;
  text-decoration: none;
  color: #00538a;
}

/* Navigation styles
   Display navigation items horizontally with spacing and pill-like hover
   effects. On hover, invert the colours to provide visual feedback. */
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.75rem;
}

.site-nav a {
  text-decoration: none;
  color: #00538a;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.site-nav a:hover,
.site-nav a:focus {
  background-color: #00538a;
  color: #ffffff;
}

.nav-toggle {
  display: none;
}

.nav-toggle-label {
  display: none;
  width: 40px;
  height: 32px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid #00538a;
  border-radius: 4px;
}

.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
  display: block;
  background-color: #00538a;
  height: 2px;
  width: 18px;
  border-radius: 2px;
  position: relative;
  transition: transform 0.2s ease;
  content: '';
}

.nav-toggle-label span::before {
  position: absolute;
  top: -6px;
  left: 0;
}

.nav-toggle-label span::after {
  position: absolute;
  top: 6px;
  left: 0;
}

.nav-toggle:checked + .nav-toggle-label span {
  transform: rotate(45deg);
}

.nav-toggle:checked + .nav-toggle-label span::before {
  transform: rotate(90deg);
  top: 0;
}

.nav-toggle:checked + .nav-toggle-label span::after {
  transform: rotate(90deg);
  top: 0;
}

/* Content area spacing */
.site-content {
  padding: 2rem 0;
}

/* Section styling with subtle separators */
section {
  margin-bottom: 2rem;
}

section + section {
  border-top: 1px solid #e5e5e5;
  padding-top: 2rem;
}

.site-attribution {
  font-size: 0.95rem;
  color: #666666;
}

.site-attribution p {
  margin: 0;
}

/* Hero section */
.hero {
  margin-bottom: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
}

.hero h1 {
  font-size: 2.4rem;
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: #00538a;
}

.hero p {
  font-size: 1.05rem;
  max-width: 65ch;
  color: #555555;
}

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

.affiliations-list li {
  margin-bottom: 0.5rem;
}

.hero-content {
  flex: 1 1 320px;
}

.hero-media {
  flex: 0 0 220px;
}

.hero-photo {
  width: 100%;
  max-width: 240px;
  border-radius: 6px;
  border: 1px solid #e5e5e5;
  display: block;
}

@media (max-width: 640px) {
  .hero {
    gap: 1.25rem;
  }

  .hero-media {
    flex-basis: 100%;
  }
}

@media (max-width: 720px) {
  .site-header .container {
    flex-wrap: wrap;
  }

  .nav-toggle-label {
    display: inline-flex;
  }

  .site-nav {
    width: 100%;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding-top: 0.75rem;
    display: none;
  }

  .nav-toggle:checked ~ .site-nav ul {
    display: flex;
  }
}

/* Quick links
   Display quick links as buttons similar to Luke's site. Use a lighter
   border and highlight on hover for better contrast. */
.quick-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.quick-links a {
  background-color: #00538a;
  color: #ffffff;
  padding: 0.4rem 0.75rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  display: inline-block;
  transition: background-color 0.2s ease;
}

.quick-links a:hover,
.quick-links a:focus {
  background-color: #003f6c;
}

/* Publications */
.pub-list {
  list-style: none;
  padding: 0;
}

.publication {
  margin-bottom: 0.75rem;
}

.publication .pub-title {
  font-style: normal;
}

.publication .pub-authors {
  font-weight: 600;
}

.publication .pub-date,
.publication .pub-venue,
.publication .pub-editor,
.publication .pub-publisher,
.publication .pub-note {
  color: #555555;
}

.publication .pub-link {
  margin-left: 0.4rem;
  font-weight: 600;
  color: #00538a;
}

/* Projects */
.project-list {
  list-style: none;
  padding: 0;
}

.project {
  margin-bottom: 1.5rem;
}

.project-link {
  font-weight: 600;
  color: #00538a;
  margin-left: 0.5rem;
}

.project-link:hover {
  text-decoration: underline;
}

.project-coauthors {
  margin-top: 0.5rem;
  color: #555555;
}

.project-coauthors a {
  color: #00538a;
  font-weight: 600;
}

/* Teaching */
.course {
  margin-bottom: 2rem;
}

.course h2 {
  margin-bottom: 0.25rem;
}

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

.course-item {
  margin-bottom: 0.75rem;
}

.course-item a {
  font-weight: 600;
  color: #00538a;
}

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

.course-description {
  color: #555555;
}

.course-materials {
  margin-top: 0.2rem;
  color: #555555;
  font-size: 0.95rem;
}

.course-materials a {
  font-weight: 600;
  color: #00538a;
}

/* Footer */
.site-footer {
  background-color: #f5f5f5;
  border-top: 1px solid #e0e0e0;
  padding: 1rem 0;
  text-align: center;
}

.site-footer .analytics-notice {
  font-size: 0.85rem;
  color: #666666;
  margin-top: 0.5rem;
}
