/* Minimal research-page layout (text-first, fast) */

:root {
  --text: #222;
  --muted: #555;
  --link: #1040a0;
  --max: 46rem;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 17px;
}

body {
  font-family: Georgia, "Times New Roman", Times, serif;
  color: var(--text);
  background: #fafafa;
  line-height: 1.55;
}

.page {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
  background: #fff;
  min-height: 100vh;
  box-shadow: 0 0 0 1px #eee;
}

.masthead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #ddd;
}

.masthead-identity {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  flex: 1;
  min-width: 0;
}

.masthead-home {
  flex: none;
  line-height: 0;
}

.name-link {
  color: inherit;
  text-decoration: none;
}

.name-link:hover {
  text-decoration: underline;
  text-decoration-color: #ccc;
}

.site-nav {
  flex: none;
  padding-top: 0.15rem;
}

.site-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.45rem;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.site-nav-list a {
  color: var(--muted);
  text-decoration: none;
}

.site-nav-list a:hover {
  color: var(--link);
  text-decoration: underline;
}

.site-nav-list a[aria-current="page"] {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.section-index {
  margin-top: 0.25rem;
}

.section-heading {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 1.1rem;
}

.section-list {
  list-style: none;
}

.section-list li {
  margin-bottom: 0.7rem;
  line-height: 1.4;
}

.section-list a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: #bbb;
  text-underline-offset: 2px;
}

.section-list a:hover {
  text-decoration-color: var(--link);
  color: var(--link);
}

.section-list .muted {
  font-size: 0.92rem;
}

.entry-page {
  margin-top: 0.25rem;
}

.entry-page .entry {
  margin-bottom: 0;
}

.entry-page .entry-title {
  font-size: 1.2rem;
  margin-bottom: 0.85rem;
  line-height: 1.35;
}

.gh-block {
  margin-top: 2.5rem;
}

@media (max-width: 640px) {
  .masthead {
    flex-direction: column;
    align-items: stretch;
  }

  .site-nav {
    width: 100%;
    border-top: 1px solid #ddd;
    padding-top: 1rem;
  }

  .site-nav-list {
    align-items: flex-start;
    flex-flow: row wrap;
    gap: 0.65rem 1.25rem;
  }
}

.masthead h1 {
  font-size: 1.75rem;
  font-weight: normal;
  letter-spacing: 0.02em;
}

.photo {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
}

.lede {
  margin-top: 0.35rem;
  color: var(--muted);
  font-style: italic;
}

.contact {
  margin-top: 0.75rem;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.85rem;
}

.contact a {
  color: var(--link);
  margin-right: 1rem;
}

.prose code {
  font-family: Menlo, Consolas, monospace;
  font-size: 0.9em;
}

.block {
  margin-top: 2rem;
}

.block h2 {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 1rem;
}

.entry {
  margin-bottom: 1.5rem;
}

.entry-title {
  font-size: 1.05rem;
  font-weight: normal;
  margin-bottom: 0.4rem;
}

.entry-title a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: #ccc;
}

.muted {
  color: var(--muted);
  font-size: 0.92rem;
}

.prose {
  font-size: 0.98rem;
}

.prose p {
  margin-bottom: 0.75rem;
}

.prose .ol-group {
  margin: 0.25rem 0 0.65rem;
  margin-left: 1.5em;
}

.prose .ol-group + p {
  margin-top: 0.85rem;
}

.prose .ol-top {
  margin: 0.5rem 0 0.35rem;
  padding-left: 1.5em;
  text-indent: -1.5em;
}

.prose .ol-group .ol-top:first-child {
  margin-top: 0;
}

.prose .ol-sub {
  margin: 0 0 0.3rem;
  padding-left: 3em;
  text-indent: -1.5em;
}

.prose .ol-detail {
  margin: 0 0 0.45rem;
  padding-left: 1.5em;
}

.prose ul,
.prose ol {
  margin: 0.5rem 0 0.75rem 1.25rem;
}

.prose li {
  margin-bottom: 0.35rem;
}

.prose a {
  color: var(--link);
}

.timeline {
  list-style: square;
}

footer {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid #ddd;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.8rem;
  color: var(--muted);
}

footer a {
  color: var(--link);
}

.gh-caption {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.35rem;
}

#gh-graph {
  overflow-x: auto;
}

.gh-grid {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(7, 11px);
  gap: 2px;
  width: max-content;
}

.gh-day {
  width: 11px;
  height: 11px;
  border-radius: 2px;
  background: #ebedf0;
}

.gh-day.l1 { background: #9be9a8; }
.gh-day.l2 { background: #40c463; }
.gh-day.l3 { background: #30a14e; }
.gh-day.l4 { background: #216e39; }

@media (prefers-color-scheme: dark) {
  .gh-day { background: #161b22; }
  .gh-day.l1 { background: #0e4429; }
  .gh-day.l2 { background: #006d32; }
  .gh-day.l3 { background: #26a641; }
  .gh-day.l4 { background: #39d353; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #e8e8e8;
    --muted: #aaa;
    --link: #7eb6ff;
  }

  body {
    background: #111;
  }

  .page {
    background: #1a1a1a;
    box-shadow: none;
  }

  .masthead,
  footer,
  .site-nav {
    border-color: #333;
  }

}
