/* ---------- Base ---------- */
body {
  background: #ffffff;
  color: #000000;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  line-height: 1.55;
}

body a {
  color: #212529 !important;
}

main a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

main a:hover,
main a:focus-visible {
  text-decoration-thickness: 2px;
}

/* ---------- Accessibility: skip link + focus ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 0.75rem 1rem;
  background: #212529;
  color: #ffffff !important;
  z-index: 1000;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #0b5ed7;
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---------- Portfolio cover + TOC ---------- */
.cover h1 {
  line-height: 1.2;
}

.toc-list .list-group-item {
  border-left: 0;
  border-right: 0;
  background: transparent;
}

.toc-list .list-group-item:first-child {
  border-top: 0;
}

.toc-list .list-group-item a {
  font-size: 1.05rem;
}

/* ---------- Paper / document pages ---------- */
.doc {
  max-width: 100%;
}

.doc h2 {
  margin-top: 2.25rem;
}

.doc h3 {
  margin-top: 1.75rem;
}

.doc p {
  margin-bottom: 1rem;
}

.doc blockquote {
  border-left: 3px solid #212529;
  padding: 0.25rem 0 0.25rem 1rem;
  margin: 1rem 0 1rem 0;
  color: #333;
}

/* ---------- Course tables ---------- */
.transcript-table th,
.transcript-table td {
  padding: 0.55rem 0.75rem;
  vertical-align: top;
}

.transcript-table caption {
  caption-side: top;
  padding: 0.5rem 0;
  color: #495057;
  font-weight: 600;
}

.term-heading {
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

/* ---------- PDF viewer ---------- */
.pdf-embed {
  width: 100%;
  height: 85vh;
  border: 1px solid #dee2e6;
}

/* ---------- Footer ---------- */
footer a {
  text-decoration: none !important;
}

/* ---------- Print (downloadable version) ---------- */
@media print {
  body {
    font-size: 11pt;
    color: #000;
    background: #fff;
  }
  nav,
  .skip-link,
  footer .social-media-icons,
  .no-print {
    display: none !important;
  }
  a {
    color: #000 !important;
    text-decoration: none !important;
  }
  a[href^="http"]::after,
  a[href^="mailto:"]::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    color: #444;
  }
  h1, h2, h3 {
    page-break-after: avoid;
  }
  .doc p,
  .doc li {
    orphans: 3;
    widows: 3;
  }
  .pdf-embed {
    display: none;
  }
}
