/* Shared styles for the bare "link-driven" pages (landing, notes, doodles). */

body {
  font: 14px/1.5 'Helvetica', 'Arial', sans-serif;
  max-width: 390px;
  margin: 50px;
  padding: 0 1rem;
  position: relative;
}

body.wide {
  max-width: none;
}

h1 {
  font-size: 18px;
}

h2 {
  font-size: 14px;
  margin: 1.5rem 0 0.5rem;
}

a {
  color: #22558e;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.crumb {
  font-size: 12px;
  margin-bottom: 1.5rem;
}

.about {
  margin-bottom: 2rem;
}

.photo {
  max-width: 390px;
  margin-bottom: 2rem;
}

img {
  /* natural size, but never wider than the window or a readable figure */
  max-width: min(100%, 700px);
  height: auto;
}

.photo p {
  font-style: italic;
  text-align: left;
  margin-top: 0.25rem;
  font-size: 12px;
}

ul.plain,
body.link-list ul,
.links ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

ul.plain li,
body.link-list li,
.links li {
  padding: 2px 0;
}

/* nested lists on link-list pages stay bullet-less but indent */
body.link-list ul ul {
  padding-left: 1.25rem;
}

/* Keep long display equations scrollable instead of overflowing the column. */
mjx-container {
  overflow-x: auto;
  overflow-y: hidden;
}

/* --- post content --- */

.post-date {
  font-style: italic;
  font-size: 12px;
  color: #555;
  margin-top: -0.5rem;
}

pre {
  overflow-x: auto;
}

div.highlight {
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
}

code {
  font-size: 13px;
}

blockquote {
  margin: 1rem 0;
  padding-left: 1rem;
  border-left: 3px solid #ddd;
  color: #555;
}

table {
  border-collapse: collapse;
}

th,
td {
  border: 1px solid #ddd;
  padding: 4px 8px;
}

/* Derivation (blue) / proof (green) boxes used inside posts. */
.details-block {
  padding: 0.6rem 1rem;
  border-radius: 6px;
  margin: 1rem 0;
}

.details-block > summary {
  cursor: pointer;
}

.details-block.derivation {
  border-left: 4px solid #1565c0;
  background: rgba(21, 101, 192, 0.08);
}

.details-block.proof {
  border-left: 4px solid #2e7d32;
  background: rgba(46, 125, 50, 0.08);
}

@media (max-width: 480px) {
  body {
    margin: 24px;
  }
}
