/* ============================================================
   Thesis page styles
   ============================================================ */

/* Thesis hero with TOC */
.thesis-hero .page-hero__lead {
  max-width: 720px;
}

/* Table of contents */
.thesis-toc {
  margin-top: 40px;
  padding: 24px 32px;
  background: var(--surface-sunken);
  border-radius: var(--radius-xl);
  display: inline-block;
}

.thesis-toc__label {
  display: block;
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--text-subtle);
  margin-bottom: 12px;
}

.thesis-toc__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.thesis-toc__list li {
  counter-increment: toc;
}

.thesis-toc__list a {
  font-size: var(--text-sm);
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.thesis-toc__list a::before {
  content: counter(toc) ". ";
  color: var(--reef-500);
}

.thesis-toc__list a:hover {
  color: var(--text-body);
}

/* Thesis sections */
.thesis-section {
  padding: 80px var(--gutter);
  scroll-margin-top: 80px;
}

.thesis-section__header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

.thesis-section__num {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--reef-500);
  margin-top: 0.15em; /* Optical alignment with heading */
}

.thesis-section__header h2 {
  margin: 0;
}

.thesis-section__body {
  max-width: 720px;
}

.thesis-section__body p {
  font-size: var(--text-md);
  line-height: var(--leading-relaxed);
  color: var(--text-body);
  margin: 0 0 24px;
}

.thesis-section__body h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  letter-spacing: 0.035em;
  color: var(--text-strong);
  margin: 40px 0 16px;
}

.thesis-list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
}

.thesis-list li {
  font-size: var(--text-md);
  line-height: var(--leading-relaxed);
  color: var(--text-body);
  padding-left: 24px;
  position: relative;
  margin-bottom: 16px;
}

.thesis-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--reef-500);
}

.thesis-list li strong {
  color: var(--text-strong);
}

/* Muted sections */
.thesis-section.section--muted {
  background: var(--surface-sunken);
}

/* Responsive */
@media (max-width: 768px) {
  .thesis-toc {
    padding: 20px 24px;
  }

  .thesis-toc__list {
    flex-direction: column;
    gap: 8px;
  }

  .thesis-section {
    padding: 56px var(--gutter);
  }

  .thesis-section__header {
    flex-direction: column;
    gap: 8px;
  }
}
