body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.1em;
  line-height: 1.6;
  max-width: 750px;
  margin: 0 auto;
  padding: 2rem 4%;
  color: #374151;
  background: #fafafa;
}

h1, h2, h3, h4 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: normal;
  color: #1f2937;
}

h1 {
  font-size: 2em;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
  font-style: italic;
  display: block;
  transform: skewX(-8deg);
}

h1.name {
  font-size: 3.25em;
  letter-spacing: -0.03em;
  border-bottom: none;
  color: #111827;
  font-style: italic;
  display: block;
  transform: skewX(-8deg);
}

h2 {
  font-style: italic;
  font-size: 1.5em;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  display: block;
  transform: skewX(-8deg);
}

h3 {
  margin-top: 2rem;
  font-style: italic;
  display: block;
  transform: skewX(-8deg);
}

h4 {
  margin-top: 1.5rem;
  color: #4b5563;
  font-style: italic;
  display: block;
  transform: skewX(-8deg);
}

p {
  margin-bottom: 1rem;
}

a {
  color: #2563eb;
  text-decoration: underline;
  text-decoration-color: #93c5fd;
  text-underline-offset: 2px;
}

a:hover {
  text-decoration-color: #2563eb;
}

/* Remove link styling from anchor headings */
a[id] {
  color: inherit;
  text-decoration: none;
}

blockquote {
  border-left: 3px solid #d1d5db;
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  margin-left: 0;
  color: #6b7280;
  font-style: italic;
  text-align: justify;
  hyphens: auto;
}

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

/* Bio section layout */
.bio {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.bio-text {
  flex: 1;
  text-align: justify;
  hyphens: auto;
}

.bio-text p:first-child {
  margin-top: 0;
}

.bio-photo {
  flex: 0 0 200px;
}

.bio-photo img {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Responsive: stack on mobile */
@media (max-width: 600px) {
  .bio {
    flex-direction: column-reverse;
  }
  .bio-photo {
    flex: none;
    width: 150px;
    margin: 0 auto;
  }
}

ul {
  list-style: none;
  padding-left: 1.5rem;
}

ul li {
  margin-bottom: 0.5rem;
  position: relative;
}

ul li::before {
  content: "⬩";
  position: absolute;
  left: -1.5rem;
  font-size: 0.8em;
  top: 0.2em;
}

ol.toc {
  padding-left: 1.5rem;
}

ol.toc li {
  margin-bottom: 1rem;
}

section {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-top: 1px solid #e5e7eb;
  padding-top: 2rem;
  position: relative;
}

section.nav {
  margin-top: 3rem;
}

section::before {
  content: "❦";
  position: absolute;
  left: 50%;
  top: -0.7em;
  transform: translateX(-50%);
  background: #fafafa;
  padding: 0 0.25rem;
  font-size: 0.7em;
  color: #e5e7eb;
}

section:last-child {
  border-bottom: none;
}

table.teaching td {
  padding-right: 1rem;
  padding-bottom: 0.5rem;
}

table.overview td {
  padding-right: 1rem;
}

table.schedule {
  border-collapse: collapse;
  width: 95%;
}

table.schedule td, th {
  border: 1px solid #e5e7eb;
  padding: 8px;
  text-align: left;
  vertical-align: top;
}

table.schedule tr td:nth-child(2) {
  white-space: nowrap;
}
