/* mjperson.net — conservative, professional, responsive.
   No animation, no external dependencies. */

:root {
  --ink: #222426;
  --muted: #5a5f63;
  --accent: #1f4e6b;       /* muted deep blue */
  --accent-dark: #15384e;
  --rule: #d9dde0;
  --bg: #fdfdfb;
  --bg-soft: #f3f1ec;
  --maxw: 820px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 1.0625rem/1.65 Georgia, "Times New Roman", serif;
}

/* Headings & UI text use a sans stack */
h1, h2, h3, nav, .meta, .tag, footer {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

h1 { font-size: 1.9rem; line-height: 1.2; margin: 0; }
h2 {
  font-size: 1.3rem;
  margin: 2.4rem 0 0.8rem;
  padding-bottom: 0.3rem;
  border-bottom: 2px solid var(--rule);
  color: var(--accent-dark);
}
h3 { font-size: 1.05rem; margin: 1.4rem 0 0.4rem; }

a { color: var(--accent); text-decoration: none; }
a:hover, a:focus { color: var(--accent-dark); text-decoration: underline; }

/* Keyboard focus visibility */
a:focus-visible, .skip:focus {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* Skip link for screen-reader / keyboard users */
.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 0.9rem;
  z-index: 10;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }

/* ---- Site header / nav ---- */
.site-header {
  border-bottom: 1px solid var(--rule);
  background: #fff;
}
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 1rem;
  padding-bottom: 1rem;
  gap: 0.5rem 1rem;
}
.brand { font-weight: 700; font-size: 1.15rem; color: var(--ink); }
.brand:hover { text-decoration: none; }
nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
  margin: 0;
  padding: 0;
  font-size: 0.97rem;
}
nav a[aria-current="page"] { font-weight: 700; color: var(--accent-dark); }

/* ---- Intro block ---- */
.intro {
  display: flex;
  gap: 1.8rem;
  align-items: flex-start;
  margin-top: 2rem;
}
.intro .portrait {
  flex: 0 0 auto;
  width: 220px;
  max-width: 38%;
}
.intro .portrait img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  border: 1px solid var(--rule);
}
.intro .lead { flex: 1 1 0; min-width: 0; }
.titles {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1rem;
}

main { padding-bottom: 2.5rem; }

p { margin: 0.7rem 0; }

ul.clean { list-style: none; padding-left: 0; }
ul.spaced li { margin-bottom: 0.45rem; }

/* Course / project rows */
.course .code { font-weight: 700; color: var(--accent-dark); }
.course .term {
  display: inline-block;
  font-size: 0.82rem;
  color: var(--muted);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 0.05rem 0.6rem;
  margin-left: 0.4rem;
  vertical-align: middle;
}

/* Figure (teaching photo) */
figure { margin: 1.5rem 0; }
figure img { width: 100%; height: auto; border-radius: 4px; border: 1px solid var(--rule); }
figcaption { font-size: 0.9rem; color: var(--muted); margin-top: 0.4rem; }
.figure-center { max-width: 460px; margin-left: auto; margin-right: auto; }
.credit { display: block; font-size: 0.85em; font-style: italic; margin-top: 0.1rem; }

/* Contact / link cards */
.links-inline { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; padding-left: 0; list-style: none; }

/* Publications */
ol.pubs { padding-left: 1.4rem; }
ol.pubs li { margin-bottom: 0.7rem; }
.pubs .title { font-style: italic; }
.status { color: var(--muted); font-size: 0.92rem; }
.note {
  background: var(--bg-soft);
  border-left: 3px solid var(--accent);
  padding: 0.8rem 1rem;
  margin: 1.2rem 0;
  font-size: 0.97rem;
}

footer {
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.88rem;
  padding: 1.5rem 0 2.5rem;
}

/* Personal facts (description list) */
.facts { margin: 1.2rem 0 0.5rem; }
.facts > div {
  display: flex;
  gap: 0.9rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--rule);
}
.facts dt {
  flex: 0 0 9.5rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-dark);
  padding-top: 0.1rem;
}
.facts dd { margin: 0; flex: 1 1 0; min-width: 0; }
.facts blockquote {
  margin: 0;
  font-style: italic;
}
.facts blockquote cite { font-style: normal; color: var(--muted); font-size: 0.92rem; }

/* Game listings */
.games h3 { color: var(--accent-dark); }
.games .sub {
  margin: 0.1rem 0 0.3rem;
  color: var(--muted);
  font-size: 0.92rem;
  font-style: italic;
}
.games ul { margin-top: 0.3rem; }
.game-name { font-weight: 600; }

/* ---- Responsive ---- */
@media (max-width: 560px) {
  .intro { flex-direction: column; }
  .intro .portrait { width: 60%; max-width: 220px; align-self: center; }
  h1 { font-size: 1.6rem; }
  .facts > div { flex-direction: column; gap: 0.1rem; }
  .facts dt { flex-basis: auto; }
}
