/* ------------------------------------------------------------------
   sangmino.github.io
   Masthead, left rail, 660px column. IBM Plex Serif for structure and
   titles, IBM Plex Sans for everything else.

   ONE RULE GOVERNS COLOUR: navy means clickable. Nothing that is not a
   link may take --navy, or links stop reading as links.
   ------------------------------------------------------------------ */

:root {
  --navy:   #1A3A5C;
  --ink:    #1C1C1C;
  --text:   #333333;
  --body:   #555555;
  --soft:   #757575;   /* clears 4.5:1 on white */
  --faint:  #757575;
  --rule:   #E6E8EB;
  --award:  #CD643C;
  --note:   #4A90C2;
  --serif: 'IBM Plex Serif', Georgia, serif;
  --sans:  'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0; background: #fff; color: var(--body);
  font-family: var(--sans); font-size: 14.5px; line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- shell ---------- */
.shell { max-width: 1000px; margin: 0 auto; padding: 0 20px 70px; }
.masthead { padding: 26px 0 0; }
.masthead .name {
  font-family: var(--serif); font-size: 30px; font-weight: 600; color: var(--navy);
  letter-spacing: -.012em; line-height: 1.08; margin: 0;
}
.masthead .name a { color: inherit; }
.masthead .name a:hover { text-decoration: none; }
.masthead .role { font-size: 12.5px; color: var(--soft); margin: 6px 0 0; }
.masthead .contact { margin: 9px 0 0; font-size: 13px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.masthead .icons { display: inline-flex; gap: 9px; align-items: center; }
.masthead .icons a { width: 17px; height: 17px; color: #8795A5; display: block; }
.masthead .icons a:hover { color: var(--navy); }
.masthead .icons svg { width: 17px; height: 17px; display: block; fill: currentColor; }
.rule { height: 2px; background: var(--navy); margin: 17px 0 0; }

.cols {
  display: grid; grid-template-columns: 216px minmax(0, 660px) minmax(0, 1fr);
  gap: 0 44px; padding-top: 18px; align-items: start;
}

/* ---------- rail ---------- */
.rail { position: sticky; top: 18px; align-self: start; }
.rail ul { list-style: none; margin: 0; padding: 0; }
.rail li { margin: 0 0 12px; }
.rail a { font-size: 14px; font-weight: 500; color: var(--soft); display: block; }
.rail a:hover { color: var(--navy); text-decoration: none; }
.rail a.here { color: var(--navy); font-weight: 700; }
.rail .onpage-label { font-size: 9.5px; font-weight: 600; letter-spacing: .2em;
  text-transform: uppercase; color: #9A9A9A; margin: 20px 0 10px; }
.rail .onpage a { font-size: 12.5px; font-weight: 400; color: #757575; }
.rail .onpage a.on { color: var(--navy); font-weight: 600; }
.rail .onpage li { margin: 0 0 9px; }
.rail .onpage a:hover { color: var(--navy); text-decoration: none; }
/* the rail is sticky, so a long contents list must scroll inside it */
.rail .onpage { max-height: calc(100vh - 260px); overflow-y: auto; scrollbar-width: none; }
.rail .onpage::-webkit-scrollbar { display: none; }

/* ---------- content ---------- */
.main > :first-child { margin-top: 0; }
.main h3, .main > h2 {
  font-family: var(--serif); font-size: 18px; font-weight: 400; color: var(--navy);
  letter-spacing: -.005em; margin: 32px 0 13px; padding-bottom: 7px;
  border-bottom: 1px solid var(--rule); scroll-margin-top: 16px;
}
/* a section heading needs air ABOVE it, or it reads as part of the list it follows.
   The page's first child resets to 0 via the rule further up. */
.main > :first-child { margin-top: 0; }
/* a parenthetical under a heading, not a label. Keeps Simon's small caps. */
.subnote { color: #6E6E6E; font-variant: small-caps; font-size: 13px; margin: -6px 0 13px; }

.main h4 { font-family: var(--sans); font-size: 12.5px; font-weight: 600; color: var(--soft); margin: 14px 0 5px; }
.main section + section, .main .sec + .sec { margin-top: 22px; }
.main p:not([class]) { margin: 0 0 14px; }
.main p.intro { font-size: 15px; color: #3A3A3A; line-height: 1.52; }
.main strong, .main b { color: var(--ink); font-weight: 600; }
.main ul { list-style: none; margin: 0 0 14px; padding: 0; }
.main ul > li { position: relative; padding-left: 16px; margin: 0 0 9px; line-height: 1.5; }
.main ul > li::before { content: ''; position: absolute; left: 1px; top: 9px; width: 4px; height: 4px; background: #CBD2D9; }

/* a nested list is a footnote to its parent, not a sibling: quieter mark,
   smaller type, tighter indent. Found on the live Teaching page. */
.main ul ul { margin: 3px 0 0; }
.main ul ul > li { font-size: 13px; color: var(--soft); margin: 0 0 4px; padding-left: 13px; line-height: 1.45; }
.main ul ul > li::before { width: 3px; height: 3px; top: 8px; background: #DDE2E7; }
.main ul ul a { color: #4F7392; }

/* numbered entry: Research, Discussions */
.entries { list-style: none; margin: 0; padding: 0; counter-reset: item var(--from, 0); }
.entries > li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 0 9px; margin: 0 0 13px; padding-left: 0; }
.entries > li::before { content: counter(item) "."; counter-increment: item;
  font-family: var(--serif); font-size: 15px; color: #A8B2BC; font-variant-numeric: tabular-nums; padding-top: 1px; }
/* an entry's blocks space themselves from the top only, never the bottom */
.hd, .jl, .abs, .award, .supersede, .meta, .dt, .by, .at { margin-bottom: 0; }

.hd { font-family: var(--serif); font-size: 15.5px; line-height: 1.3; margin: 0;
  color: #757575; font-weight: 400; letter-spacing: -.003em; }
.hd .t { color: var(--navy); font-weight: 700; }
.hd .date { color: #8F9CA8; }
.jl { font-family: var(--serif); font-size: 14.5px; color: #757575; margin: 2px 0 0; line-height: 1.35; }
.jl .journal, .jl b { color: var(--ink); font-weight: 600; }
.jl .journal { text-decoration: underline; text-underline-offset: 2px;
               text-decoration-thickness: 1px; }
.abs { font-size: 15px; color: #3A3A3A; margin: 5px 0 0; line-height: 1.3; }
.award { font-size: 12.5px; color: var(--award); font-weight: 600; margin: 2px 0 0; line-height: 1.4; }
.supersede { font-size: 12.5px; color: var(--note); font-weight: 500; margin: 2px 0 0; line-height: 1.4; }
/* Presentations and Coverage: small, but it still has to be readable. 11.5px at
   #A2A2A2 was not. */
.meta { font-size: 12px; color: #757575; margin: 3px 0 0; line-height: 1.42; padding-left: 10px; }
.meta a { color: #5A7391; }

/* dated row: Notebook, CV, Presentations */
.dated { display: grid; grid-template-columns: minmax(0, 1fr) 104px; gap: 0 18px; align-items: baseline; }
.dated .t { font-family: var(--serif); font-size: 14px; font-weight: 400; color: var(--text); line-height: 1.4; padding: 3px 0; }
.dated .t b { font-weight: 600; color: var(--ink); }
.dated .t .under { display: block; font-family: var(--sans); font-size: 13px; color: var(--soft); line-height: 1.4; }
.dated .t .tag { font-family: var(--sans); font-size: 12.5px; font-weight: 500; margin-left: 6px; }
.dated .t .tag::before { content: '['; color: #B4BCC4; }
.dated .t .tag::after  { content: ']'; color: #B4BCC4; }
.dated .d { font-size: 13px; color: #757575; font-variant-numeric: tabular-nums;
  text-align: right; white-space: nowrap; padding: 3px 0; line-height: 1.4; }

/* title + description pair: Public Goods */
.pair { padding: 3px 0 7px; }
.pair .t { font-family: var(--serif); font-size: 14px; font-weight: 600; line-height: 1.4; }
.pair .d { font-size: 13.5px; color: #6E6E6E; line-height: 1.45; }

/* role chip: Presentations. Outline, inline, two states. */
.chip { font-family: var(--sans); font-size: 10.5px; font-weight: 600; letter-spacing: .07em;
  text-transform: uppercase; white-space: nowrap; display: inline-block; line-height: 1;
  padding: 4px 8px; border-radius: 3px; margin-left: 8px; vertical-align: 1px;
  background: transparent; box-shadow: inset 0 0 0 1px #DEE2E6; color: var(--soft); }
.chip.presenter, .chip.seminar, .chip.panel { box-shadow: inset 0 0 0 1px #B9CAD9; color: var(--navy); }

/* Work in Progress: the entry shape without numbers */
.main ul.wip { list-style: none; margin: 0; padding: 0; }
.main ul.wip > li { padding-left: 16px; margin: 0 0 13px; max-width: none; }
.main ul.wip > li::before { top: 11px; }

/* Discussions: reversed, leading zero, counted by the browser */
.main ol.numbered-rev { list-style: decimal-leading-zero; margin: 0; padding-left: 34px; }
.main ol.numbered-rev > li { margin: 0 0 11px; }
.main ol.numbered-rev > li::marker {
  font-family: var(--serif); font-size: 13px; color: #A8B2BC; font-variant-numeric: tabular-nums;
}
/* Discussions: a 25-row list, so entries sit at list weight, not paper weight.
   Navy means the slides exist; ink means the talk has not happened yet. */
.dt { font-family: var(--serif); font-size: 14px; font-weight: 600; color: var(--text);
      line-height: 1.4; margin: 0; }
.dt a { color: var(--navy); font-weight: 600; }
.by { font-size: 13px; color: #6E6E6E; line-height: 1.4; margin: 1px 0 0; }
.at { font-size: 13px; color: #757575; line-height: 1.4; margin: 0; }

/* ---------- phones ---------- */
@media (max-width: 720px) {
  .shell { padding: 0 20px 56px; }
  .cols { grid-template-columns: 1fr; gap: 20px; padding-top: 16px; }
  .rail { position: static; }
  .rail ul { display: flex; flex-wrap: wrap; gap: 0 16px; }
  .rail li { margin: 0 0 8px; }
  .rail .onpage { display: none; }
  .masthead .name { font-size: 25px; }
  .dated { grid-template-columns: 1fr; }
  .dated .d { text-align: left; padding: 0 0 6px; }
  .entries > li { grid-template-columns: 22px minmax(0, 1fr); }
}
