/* JLSola — full site stylesheet
   Palette:
     Navy   #1B3D6D  — structural, dominant
     Gold   #EE9900  — intentional accent (6 roles)
     Purple #5A007E  — rare flair (2–3 roles)
*/

:root {
  --navy:        #1B3D6D;
  --navy-d:      #122a4d;
  --navy-pale:   #e7ecf4;
  --navy-tint:   #f4f7fc;
  --gold:        #EE9900;
  --gold-d:      #c37e00;
  --gold-pale:   #fdf2d7;
  --gold-tint:   #fffaed;
  --purple:      #5A007E;
  --purple-d:    #42005c;
  --purple-pale: #f5e8fb;
  --ink:         #1c1c1c;
  --rule:        #d9dee6;
  --rule-s:      #9fadc1;
  --muted:       #5f6b7c;
  --bg:          #ffffff;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink); }
body {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 16px;
  line-height: 1.55;
  font-feature-settings: "kern", "liga", "onum";
}

/* ---------- Links ---------- */
a { color: var(--navy); text-decoration: none; border-bottom: 1px solid rgba(27,61,109,.3); transition: color .15s, border-color .15s; }
a:hover { border-bottom-color: var(--gold); color: var(--navy-d); }        /* gold role #1 — hover underline */
a.ext { color: var(--navy); border-bottom-color: rgba(90,0,126,.28); }
a.ext:hover { color: var(--purple); border-bottom-color: var(--purple); }  /* purple role #1 — external/DOI hover */
strong { font-weight: 600; }
em { font-style: italic; }

/* ---------- Top bar ---------- */
.topline {
  background: var(--navy);
  color: #fff;
  padding: 16px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: "Source Sans 3", sans-serif;
  font-size: 13px;
  border-bottom: 3px solid var(--gold);
}
.topline .mark {
  font-family: "Source Serif 4", serif;
  font-size: 16px;
  font-weight: 500;
  color: #fff;
  border: none;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.topline .mark::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  display: inline-block;
}
.topline .mark:hover { color: #fff; border: none; }
nav.primary { display: flex; gap: 28px; }
nav.primary a {
  color: rgba(255,255,255,.78);
  border: none;
  font-weight: 500;
  font-size: 13px;
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
}
nav.primary a:hover { color: #fff; border-bottom-color: rgba(238,153,0,.5); }
nav.primary a.current {
  color: #fff;
  border-bottom-color: var(--gold);  /* gold role #2 — current-page indicator */
}

/* ---------- Main layout ---------- */
main { max-width: 1100px; margin: 0 auto; padding: 64px 48px 72px; }

/* ---------- Page title block ---------- */
.title {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 56px;
  padding-bottom: 36px;
  border-bottom: 2px solid var(--navy);
  margin-bottom: 40px;
}
.title.solo { display: block; }
.title h1 {
  font-family: "Source Serif 4", serif;
  font-weight: 400;
  font-size: 48px;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
  color: var(--navy);
  text-wrap: balance;
}
.title .affil {
  font-size: 18px;
  color: var(--muted);
  line-height: 1.45;
  margin-top: 8px;
  font-style: italic;
}
.title .affil a { color: var(--navy); border-bottom-color: transparent; }
.title .affil a:hover { border-bottom-color: var(--gold); }

/* ---------- Contact dl ---------- */
.contact {
  font-family: "Source Sans 3", sans-serif;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.75;
  padding-top: 8px;
}
.contact dl { margin: 0; display: grid; grid-template-columns: 56px 1fr; gap: 4px 16px; }
.contact dt { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; padding-top: 2px; color: var(--navy); font-weight: 600; }
.contact dd { margin: 0; }
.contact dd a { color: var(--ink); border-bottom: 1px solid transparent; }
.contact dd a:hover { border-bottom-color: var(--gold); color: var(--navy); }

/* ---------- Statement pull-quote ---------- */
.statement {
  background: var(--navy-tint);
  border-left: 3px solid var(--navy);
  padding: 24px 32px;
  max-width: 820px;
  margin-bottom: 48px;
  border-radius: 0 4px 4px 0;
  position: relative;
}
.statement p { font-size: 19px; line-height: 1.5; margin: 0; text-wrap: pretty; color: var(--ink); }
.statement .teaches {
  margin-top: 18px;
  font-family: "Source Sans 3", sans-serif;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}
.statement .teaches .k { color: var(--navy); font-weight: 600; }

/* ---------- Section headers ---------- */
.section-header {
  display: flex;
  align-items: baseline;
  gap: 14px;
  border-bottom: 1px solid var(--rule-s);
  padding-bottom: 10px;
  margin: 32px 0 20px;
}
.section-header h2 {
  font-family: "Source Serif 4", serif;
  font-weight: 400;
  font-size: 24px;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--navy);
}
.section-header .rule { flex: 1; height: 1px; background: var(--navy-pale); }
.section-header .eyebrow {
  font-family: "Source Sans 3", sans-serif;
  font-size: 10px;
  color: var(--gold-d);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 3px 8px;
  border: 1px solid var(--gold);
  background: var(--gold-tint);
  border-radius: 2px;
}

h3.sub {
  font-family: "Source Serif 4", serif;
  font-weight: 500;
  font-size: 19px;
  color: var(--navy);
  margin: 32px 0 12px;
  letter-spacing: -0.005em;
}

/* ---------- Publications list ---------- */
ol.pubs { list-style: none; padding: 0; margin: 0; }
ol.pubs > li {
  padding: 18px 8px;
  margin: 0 -8px;
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 48px 220px 1fr;
  gap: 24px;
  align-items: baseline;
  transition: background-color .15s;
}
ol.pubs > li:hover { background: var(--navy-tint); }
ol.pubs > li:last-child { border-bottom: none; }
ol.pubs .year {
  font-family: "Source Sans 3", sans-serif;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  color: var(--navy);
  font-weight: 700;
  padding-top: 3px;
  letter-spacing: 0.02em;
}
ol.pubs .pub-venue {
  font-family: "Source Sans 3", sans-serif;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  padding-top: 4px;
  border-left: 1px solid var(--navy-pale);
  padding-left: 16px;
  margin-left: -16px;
}
ol.pubs .pub-venue .venue-name {
  color: var(--navy);
  font-style: italic;
  font-family: "Source Serif 4", serif;
  font-size: 14px;
  display: block;
  margin-bottom: 2px;
  font-weight: 500;
}
ol.pubs .pub-title {
  font-size: 17px;
  color: var(--ink);
  line-height: 1.45;
  display: block;
  margin-bottom: 10px;
  font-style: italic;
}
ol.pubs .pub-title a { color: inherit; border-bottom: 1px solid rgba(27,61,109,.22); }
ol.pubs .pub-title a:hover { border-bottom-color: var(--gold); color: var(--navy); }
ol.pubs .pub-authors { font-size: 14px; color: var(--muted); line-height: 1.5; }
ol.pubs .pub-authors strong { color: var(--ink); font-weight: 600; }

/* Award — gold pill (gold role #3) */
ol.pubs .award {
  font-family: "Source Sans 3", sans-serif;
  font-size: 11px;
  color: var(--navy-d);
  background: var(--gold-pale);
  border: 1px solid var(--gold);
  padding: 3px 10px;
  border-radius: 2px;
  margin-top: 8px;
  display: inline-block;
  font-weight: 600;
  letter-spacing: 0.02em;
}
ol.pubs .award::before { content: "★  "; color: var(--gold-d); }

ol.pubs > li.invited { opacity: 0.7; }
ol.pubs > li.invited .pub-title { font-size: 15px; color: var(--muted); }
ol.pubs > li.invited .pub-title a { color: var(--muted); border-bottom-color: rgba(95,107,124,.3); }
ol.pubs > li.invited .pub-title a:hover { color: var(--navy); border-bottom-color: var(--gold); }
ol.pubs > li.invited .pub-authors { font-size: 13px; }
ol.pubs .invited-tag {
  font-family: "Source Sans 3", sans-serif;
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--rule-s);
  padding: 2px 7px;
  border-radius: 2px;
  font-weight: 500;
  margin-right: 8px;
  vertical-align: 1px;
}

/* DOI link indicator — uses purple for rare hyper-contrast (purple role #1 covers this through .ext) */
ol.pubs .doi-mark {
  font-family: "Source Sans 3", sans-serif;
  font-size: 11px;
  color: var(--muted);
  margin-left: 6px;
  letter-spacing: 0.02em;
}

/* ---------- Prose article (about / gun desirability body) ---------- */
article.prose {
  max-width: 720px;
  font-size: 17px;
  line-height: 1.65;
}
article.prose p { margin: 0 0 18px; text-wrap: pretty; }
article.prose p:first-of-type::first-letter {
  /* no drop cap — keeping restraint per user pref */
}
article.prose a { color: var(--navy); border-bottom: 1px solid rgba(27,61,109,.3); }
article.prose a:hover { color: var(--navy-d); border-bottom-color: var(--gold); }
article.prose em { color: inherit; }
article.prose ol, article.prose ul { padding-left: 24px; margin: 0 0 18px; }
article.prose ol li, article.prose ul li { margin-bottom: 8px; padding-left: 4px; }
article.prose ol li::marker { color: var(--gold-d); font-weight: 600; }   /* gold role #4 — list markers */
article.prose ul li::marker { color: var(--navy); }

article.prose h3 {
  font-family: "Source Serif 4", serif;
  font-weight: 500;
  font-size: 22px;
  color: var(--navy);
  margin: 40px 0 14px;
  letter-spacing: -0.01em;
  padding-top: 8px;
  border-top: 1px solid var(--rule);
}

/* Fellowships / awards strip inline in prose */
.fellowship-list {
  list-style: none;
  padding: 0;
  margin: 20px 0 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
}
.fellowship-list li {
  font-family: "Source Sans 3", sans-serif;
  font-size: 12px;
  color: var(--navy);
  border: 1px solid var(--navy-pale);
  background: var(--navy-tint);
  padding: 5px 11px;
  border-radius: 3px;
  line-height: 1.35;
  font-weight: 500;
  margin: 0;
}
.fellowship-list li.flagship {
  background: var(--purple-pale);
  border-color: var(--purple);
  color: var(--purple-d);
  font-weight: 600;
  position: relative;
  padding-left: 22px;
}
.fellowship-list li.flagship::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--purple);
}

/* Headshot layout */
.headshot-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 48px;
  align-items: start;
  max-width: 1060px;
}
.headshot-layout .headshot-frame {
  position: relative;
  margin-top: 4px;
  isolation: isolate;
}
.headshot-layout .headshot-frame img,
.headshot-layout .headshot-frame > div {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--rule);
  position: relative;
  z-index: 1;
}
.headshot-layout .headshot-frame::before {
  content: "";
  position: absolute;
  top: 14px;
  left: -14px;
  right: 14px;
  bottom: -14px;
  background: var(--gold);
  z-index: 0;
  opacity: 0.95;
}  /* gold role #5 — headshot accent block */
.headshot-layout .headshot-cap {
  margin-top: 12px;
  font-family: "Source Sans 3", sans-serif;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

/* ---------- Code blocks ---------- */
pre.code {
  background: #1a1f2b;
  color: #e5e9f0;
  border-left: 3px solid var(--gold);   /* gold role #6 — code-block accent */
  padding: 18px 22px;
  font-family: "JetBrains Mono", "SF Mono", Menlo, monospace;
  font-size: 13px;
  line-height: 1.6;
  overflow-x: auto;
  margin: 18px 0 24px;
  border-radius: 0 3px 3px 0;
}
pre.code .tok-k { color: #c3a3ff; }   /* purple-ish for keywords — rare flair */
pre.code .tok-s { color: #f7c77a; }
pre.code .tok-c { color: #7a8499; font-style: italic; }
pre.code .tok-p { color: #9fb3dc; }

code.inline {
  font-family: "JetBrains Mono", "SF Mono", Menlo, monospace;
  font-size: 0.88em;
  background: var(--navy-tint);
  border: 1px solid var(--navy-pale);
  padding: 1px 6px;
  border-radius: 2px;
  color: var(--navy-d);
}

/* Figure / image-with-caption */
figure.fig { margin: 24px 0 28px; }
figure.fig img { width: 100%; height: auto; display: block; border: 1px solid var(--rule); }
figure.fig figcaption {
  margin-top: 10px;
  font-family: "Source Sans 3", sans-serif;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  padding-left: 10px;
  border-left: 2px solid var(--navy-pale);
}

/* Gun desirability — asset thumbs */
.asset-thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 20px 0 28px;
}
.asset-thumbs .thumb {
  border: 1px solid var(--rule);
  padding: 16px 12px 12px;
  text-align: center;
  background: #fafbfc;
}
.asset-thumbs .thumb .placeholder {
  height: 110px;
  background: repeating-linear-gradient(45deg, var(--navy-pale) 0 6px, var(--navy-tint) 6px 12px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
  font-family: "Source Sans 3", sans-serif;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 10px;
}
.asset-thumbs .thumb img {
  display: block;
  width: 100%;
  height: 110px;
  object-fit: contain;
  margin-bottom: 10px;
}
.asset-thumbs .thumb .label {
  font-family: "Source Sans 3", sans-serif;
  font-size: 12px;
  color: var(--navy);
  font-weight: 600;
  margin-bottom: 2px;
}
.asset-thumbs .thumb .pct {
  font-family: "Source Sans 3", sans-serif;
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  color: var(--gold-d);
  font-weight: 600;
}

/* Step callout for gun_desirability steps (1)(2)(3) */
.step-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 40px 0 16px;
  padding-top: 8px;
  border-top: 1px solid var(--rule);
}
.step-head .num {
  font-family: "Source Sans 3", sans-serif;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  background: var(--navy);
  padding: 4px 9px;
  border-radius: 2px;
  font-weight: 700;
}
.step-head h3 {
  font-family: "Source Serif 4", serif;
  font-weight: 500;
  font-size: 21px;
  color: var(--navy);
  margin: 0;
  border: none;
  padding: 0;
  letter-spacing: -0.01em;
}

/* Drum-roll: active projects enumerated block */
.projects {
  list-style: none;
  padding: 0;
  margin: 20px 0 32px;
  display: grid;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.projects li {
  background: #fff;
  padding: 14px 18px;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 14px;
  font-size: 15px;
  line-height: 1.5;
}
.projects li .n {
  font-family: "Source Sans 3", sans-serif;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--gold-d);
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* Small-caps callout */
.callout-purple {
  display: inline-block;
  font-family: "Source Sans 3", sans-serif;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--purple);
  background: var(--purple-pale);
  border: 1px solid var(--purple);
  padding: 2px 8px;
  border-radius: 2px;
  font-weight: 600;
  vertical-align: 2px;
}  /* purple role #2 — flagship fellowship / distinction marker */

/* ---------- Footer ---------- */
footer.foot {
  margin-top: 56px;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
  font-family: "Source Sans 3", sans-serif;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}
footer.foot::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 72px;
  height: 2px;
  background: var(--gold);
}
footer.foot a { color: var(--navy); border: none; }
footer.foot a:hover { border-bottom: 1px solid var(--gold); }
footer.foot .sigil {
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--gold);
  border-radius: 50%;
  vertical-align: 1px;
  margin: 0 8px;
}

/* Fields tag strip (About page) */
.fields {
  list-style: none;
  padding: 0;
  margin: 14px 0 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-family: "Source Sans 3", sans-serif;
}
.fields li {
  font-size: 11px;
  color: var(--navy);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 3px 9px;
  border: 1px solid var(--navy-pale);
  background: #fff;
  border-radius: 2px;
}

/* Code block header bar */
.code-wrap { margin: 18px 0 24px; }
.code-wrap .code-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--navy);
  color: rgba(255,255,255,0.85);
  font-family: "JetBrains Mono", "SF Mono", Menlo, monospace;
  font-size: 11px;
  padding: 7px 16px;
  border-left: 3px solid var(--gold);
  letter-spacing: 0.04em;
}
.code-wrap .code-head .lang { color: var(--gold); font-weight: 600; }
.code-wrap pre.code { margin: 0; border-radius: 0; }

/* Focus rings — purple for rare flair */
:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 2px;
  border-radius: 2px;
}

@media (max-width: 900px) {
  .topline { padding: 14px 24px; flex-direction: column; gap: 10px; align-items: flex-start; }
  nav.primary { flex-wrap: wrap; gap: 14px 20px; }
  main { padding: 40px 24px 60px; }
  .title { grid-template-columns: 1fr; gap: 24px; }
  .title h1 { font-size: 36px; }
  ol.pubs > li { grid-template-columns: 1fr; gap: 6px; }
  ol.pubs .pub-venue { border-left: none; padding-left: 0; margin-left: 0; padding-top: 0; }
  .headshot-layout { grid-template-columns: 1fr; }
  .asset-thumbs { grid-template-columns: 1fr 1fr; }
}
