* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: #222;
  background: #fff;
}

header, main, footer {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 20px;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  padding: 24px 0;
  border-bottom: 1px solid #e5e5e5;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 20px;
}

a {
  color: #1a5fb4;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.site-name {
  font-weight: 600;
  font-size: 1.1rem;
  color: #222;
}

.intro {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  margin: 40px 0;
}

.headshot {
  width: 180px;
  height: 180px;
  object-fit: cover;
  object-position: center center;
  border-radius: 50%;
  flex-shrink: 0;
}

h1 {
  margin: 0 0 4px;
  font-size: 1.8rem;
}

h2 {
  margin-top: 40px;
  font-size: 1.3rem;
  border-bottom: 1px solid #e5e5e5;
  padding-bottom: 4px;
}

.tagline {
  margin-top: 0;
  color: #555;
}

/* Publications list with optional TOC graphic on the left */
.publications {
  padding-left: 0;
  list-style: none;
}

.publications li {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid #f0f0f0;
}

.publications li:last-child {
  border-bottom: none;
}

.pub-toc-link {
  flex-shrink: 0;
  display: block;
}

.pub-toc {
  width: 155px;
  height: 105px;
  object-fit: contain;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  padding: 4px;
  display: block;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pub-toc-link:hover .pub-toc {
  border-color: #1a5fb4;
  box-shadow: 0 2px 8px rgba(26, 95, 180, 0.12);
}

.pub-content {
  flex: 1;
  min-width: 0;
}

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

.pub-venue {
  font-style: italic;
}

.pub-links a {
  font-size: 0.9rem;
  margin-right: 10px;
}

/* Skills & Instruments grid and cards */
.skills-intro {
  color: #555;
  margin-bottom: 28px;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.skill-card {
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 18px 20px;
  background: #fafafa;
}

.skill-card h3 {
  margin: 0 0 10px;
  font-size: 1.05rem;
  color: #1a5fb4;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.skill-tags li {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 3px 9px;
  font-size: 0.88rem;
  color: #333;
}

footer {
  margin-top: 60px;
  padding-top: 20px;
  padding-bottom: 40px;
  border-top: 1px solid #e5e5e5;
  color: #777;
  font-size: 0.9rem;
}

@media (max-width: 600px) {
  .intro {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .publications li {
    flex-direction: column;
    gap: 12px;
  }

  .pub-toc {
    width: 100%;
    max-width: 240px;
    height: auto;
  }
}
