/* Taylor N. Trummel — academicpages-style layout */

:root {
  --text: #494e52;
  --heading: #414141;
  --link: #2f6f9f;
  --link-hover: #205070;
  --border: #f2f3f3;
  --border-dark: #dcdcdc;
  --muted: #7a8288;
  --band: #f4eee0;
  --band-border: #e4d9c3;
  --max: 1100px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

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

body {
  margin: 0;
  color: var(--text);
  overflow-wrap: break-word;
  background: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1em;
  line-height: 1.6;
}

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }

/* ---------- masthead ---------- */

.masthead {
  background: var(--band);
  border-bottom: 1px solid var(--band-border);
}
.masthead-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.9em 1em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.4em 1.5em;
}
.site-title {
  font-size: 1.25em;
  font-weight: 700;
  color: var(--heading);
}
.site-title:hover { text-decoration: none; color: var(--link); }
.site-subtitle {
  display: block;
  font-size: 0.72em;
  font-weight: 400;
  color: var(--muted);
}
nav.greedy {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4em;
  font-size: 0.95em;
}
nav.greedy a { color: var(--heading); padding: 0.3em 0; }
nav.greedy a:hover { color: var(--link); text-decoration: none; }
nav.greedy a[aria-current="page"] {
  color: var(--link);
  border-bottom: 2px solid var(--link);
}

/* ---------- layout: sidebar + content ---------- */

.page-wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2em 1em 3em;
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 2.5em;
  align-items: start;
}

/* content on the left, sidebar on the right (regardless of DOM order) */
.content { order: 1; }
.sidebar {
  order: 2;
  font-size: 0.85em;
  position: sticky;
  top: 1.5em;
}
.author-avatar {
  width: 175px;
  max-width: 100%;
  border-radius: 50%;
  display: block;
  margin-bottom: 0.8em;
}
.author-name {
  font-size: 1.25em;
  font-weight: 700;
  color: var(--heading);
  margin: 0 0 0.2em;
}
.author-bio { color: var(--muted); margin: 0 0 0.8em; }
.author-detail { margin: 0.1em 0; color: var(--text); }
.author-links {
  list-style: none;
  margin: 1em 0 0;
  padding: 0;
}
.author-links li { margin: 0.35em 0; }
.author-links a { color: var(--text); }
.author-links a:hover { color: var(--link); }
.author-links .icon {
  display: inline-block;
  width: 1.2em;
  color: var(--muted);
}

@media (max-width: 760px) {
  /* masthead: title on top, nav wrapping below */
  .masthead-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5em;
  }
  nav.greedy { gap: 0.9em 1.3em; }

  /* stack into one column: content first, sidebar at the bottom */
  .page-wrap {
    grid-template-columns: 1fr;
    gap: 1.6em;
    padding: 1.5em 1.2em 2.5em;
  }
  .content { order: 1; }
  .content h1 { margin-top: 0; }
  .sidebar {
    order: 2;
    position: static;
    padding-top: 1.4em;
    border-top: 1px solid var(--border-dark);
  }
  .author-avatar { width: 130px; }
}

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

.content h1 {
  font-size: 1.9em;
  color: var(--heading);
  margin: 0 0 0.6em;
  line-height: 1.2;
}
.content h2 {
  font-size: 1.3em;
  color: var(--heading);
  margin: 1.6em 0 0.6em;
  padding-bottom: 0.4em;
  border-bottom: 1px solid var(--border);
}
.content h3 {
  font-size: 1.05em;
  color: var(--heading);
  margin: 1.2em 0 0.3em;
}
.content p { margin: 0 0 1em; }
.content ul { margin: 0 0 1.2em; padding-left: 1.3em; }
.content li { margin: 0.35em 0; }
.content li ul { margin: 0.2em 0 0.4em; }
.content li ul li { font-size: 0.92em; color: var(--muted); }
.role { font-style: italic; color: var(--muted); margin: 0.2em 0 0.5em; }

.btn {
  display: inline-block;
  background: var(--link);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.95em;
  padding: 0.5em 1em;
  border-radius: 4px;
  margin: 0.4em 0 1em;
}
.btn:hover { background: var(--link-hover); color: #ffffff; text-decoration: none; }

/* ---------- footer ---------- */

.page-footer {
  background: var(--band);
  border-top: 1px solid var(--band-border);
  margin-top: 2em;
}
.page-footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.2em 1em 2em;
  font-size: 0.85em;
  color: var(--muted);
}
