/* Tokens, the top bar, and the indexes (the blog and the papers). The room and
   the wall's colour are set in theme.css. */

:root {
  --paper: #fbfbf9;
  --ink: #161616;
  --ink-2: #5b5b58;
  --ink-3: #9c9c97;
  --hair: #e3e2de;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: var(--serif); /* labels are set in the text face too, in small capitals */
  --hand: "Reenie Beanie", "Bradley Hand", cursive;
  --wide: 1120px;
  --top: 52px;
  --global-bg-color: var(--paper);
  --global-text-color: var(--ink);
  --global-text-color-light: var(--ink-3);
  --global-divider-color: var(--hair);
}

html { font-size: 88%; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.62 var(--serif); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; text-decoration-color: var(--ink-3); }
a:hover { text-decoration-color: var(--ink); }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 400; }
img { display: block; max-width: 100%; }
.nw { white-space: nowrap; }
.lbl { font: 400 12px/1.5 var(--sans); letter-spacing: .005em; color: var(--ink-3); }

/* Top bar ------------------------------------------------------------------ */
.skip { position: absolute; left: 12px; top: -60px; z-index: 30; padding: 6px 10px; background: var(--paper); color: var(--ink); }
.skip:focus { top: 8px; }
.top { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: var(--top); padding: 0 28px; background: color-mix(in srgb, var(--paper) 90%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.top__name { font-size: 16px; text-decoration: none; letter-spacing: -.005em; }
.top__mid { font: 400 12px/1 var(--sans); color: var(--ink-3); opacity: 0; transition: opacity .3s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46vw; }
.top__mid.is-on { opacity: 1; }
.top__nav { justify-self: end; display: flex; gap: 22px; }
.top__nav a { font: 400 13px/1 var(--sans); text-decoration: none; color: var(--ink-2); transition: color .2s; }
.top__nav a:hover { color: var(--ink); }
.top__fill { position: absolute; left: 0; bottom: 0; height: 1px; width: 100%; background: var(--ink); transform-origin: left; transform: scaleX(0); }

/* Indexes -------------------------------------------------------------------- */
.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 28px; }
.sec { padding-top: 112px; scroll-margin-top: var(--top); }
.sec__head { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 14px; border-bottom: 1px solid var(--ink); }
.sec__head h2 { font-size: 15px; font-style: italic; }
.filter { padding: 14px 0 0; font-size: 17px; color: var(--ink-2); }
.filter b { font-weight: 400; color: var(--ink); }
.filter a { margin-left: 6px; color: var(--ink); white-space: nowrap; }

.index, .papers { list-style: none; margin: 0; padding: 0; }
.index > li, .papers > li { border-bottom: 1px solid var(--hair); }
.index a.row { display: grid; grid-template-columns: 132px 1fr 96px; align-items: baseline; gap: 24px; padding: 20px 0 22px; text-decoration: none; }
.row__title { font-size: 28px; line-height: 1.13; letter-spacing: -.015em; transition: transform .35s cubic-bezier(.3, .7, .2, 1); }
.row__sub { display: block; margin-top: 6px; font-size: 15px; font-style: italic; letter-spacing: 0; color: var(--ink-3); transition: color .25s; }
.row__end { text-align: right; }
.row__end .lang { display: block; }
.row__end .lang i { display: none; font-style: normal; }
.index a.row:hover .row__title { transform: translateX(10px); }
.index a.row:hover .row__sub { color: var(--ink-2); }

.papers > li { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 24px; padding: 16px 0 17px; }
.papers > li.is-more { display: none; }
.papers.is-all > li.is-more { display: grid; }
.papers__year { padding-top: 3px; color: var(--ink-2); }
.papers__title { display: block; max-width: 760px; font-size: 17px; line-height: 1.35; text-decoration: none; }
a.papers__title:hover { text-decoration: underline; }
.papers__by { max-width: 760px; margin-top: 4px; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.papers__by a { text-decoration-color: color-mix(in srgb, var(--ink) 22%, transparent); }
.papers__by a:hover { text-decoration-color: var(--ink); }
.papers__by .me { text-decoration: underline; text-decoration-color: var(--ink-3); text-decoration-thickness: 1px; text-underline-offset: .22em; }
.papers__by sup { font-size: .7em; line-height: 0; }
.papers__more { padding: 0; border: 0; background: none; font: inherit; color: var(--ink-3); cursor: pointer; }
.papers__more:hover { color: var(--ink); }
.papers__meta { margin-top: 5px; font-size: 13.5px; line-height: 1.5; }
.papers__meta > span + span::before { content: "\00a0\00b7\00a0"; color: var(--ink-3); font-style: normal; }
.papers__venue { white-space: nowrap; }
.papers__note { font-style: italic; color: var(--ink-3); }
.papers__award { font-style: italic; color: var(--ink); }
.papers__links { display: flex; flex-wrap: wrap; gap: 2px 16px; margin-top: 7px; }
.papers__links a, .papers__links button { padding: 0; border: 0; background: none; font: inherit; color: var(--ink-2); cursor: pointer; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .22em; text-decoration-color: color-mix(in srgb, var(--ink) 28%, transparent); transition: color .2s, text-decoration-color .2s; }
.papers__links a:hover, .papers__links button:hover, .papers__links [aria-expanded="true"] { color: var(--ink); text-decoration-color: var(--ink); }
.papers__panel { max-width: 760px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--hair); }
.papers__panel p { font-size: 14.5px; line-height: 1.6; color: var(--ink-2); }
.papers__panel pre { margin: 0; overflow-x: auto; font: 12px/1.6 ui-monospace, "SF Mono", Menlo, monospace; color: var(--ink-2); white-space: pre; }

/* One quiet line: the address and the few places to find me. */
.foot { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 120px; padding: 18px 0 40px; border-top: 1px solid var(--hair); font: 400 13px/1.5 var(--sans); }
.foot a { color: var(--ink-2); text-decoration-color: color-mix(in srgb, var(--ink) 25%, transparent); text-underline-offset: .22em; }
.foot a:hover { color: var(--ink); text-decoration-color: var(--ink); }
.foot__mail { margin-right: auto; }

/* Links that leave the site carry a small arrow, so a row of plain words still
   reads as a row of places to go. */
.room__links a, .papers__links a, .foot a { text-decoration-line: underline; text-decoration-thickness: 1px; text-underline-offset: .22em; text-decoration-color: color-mix(in srgb, var(--ink) 28%, transparent); transition: color .2s, text-decoration-color .2s; }
.room__links a:hover { text-decoration-color: var(--ink); }
.room__links a[href^="http"]::after, .papers__links a[href^="http"]::after, .foot a[href^="http"]::after { content: "\2197"; display: inline-block; margin-left: .14em; font: 400 .8em/1 var(--sans); color: var(--ink-3); text-decoration: none; }

@media (max-width: 760px) {
  .top { grid-template-columns: 1fr auto; padding: 0 16px; }
  .top__mid { display: none; }
  .top__nav { gap: 16px; }
  .top__nav .opt { display: none; }
  .wrap { padding: 0 16px; }
  .sec { padding-top: 72px; }
  .index a.row, .papers > li { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .row__title { font-size: 23px; }
  .row__end { text-align: left; order: 3; }
  .row__end .lang { display: inline; }
  .row__end .lang i { display: inline; }
  .index a.row:hover .row__title { transform: none; }
  .papers > li > :empty { display: none; }
  .foot__mail { flex-basis: 100%; }
}
