/*
 * Contents
 *
 * Body resets
 * Wrapper
 * Sidebar
 * - Slide effect*
 * - Overlay sidebar*
 * Masthead
 * Container
 * Pages*
 * Headings*
 * Links*
 * Lists*
 * Quotes*
 * Images*
 * Tables*
 * Misc*
 * Special*
 * - LaTeX package name*
 * - LaTeX Logo
 * Themes
 */



/*
 * Fonts
 */

@font-face {
  font-family: 'Junicode';
  font-style: normal;
  src: url('../fonts/Junicode-Regular.otf');
}
@font-face {
  font-family: 'Junicode';
  font-style: italic;
  src: url('../fonts/Junicode-Italic.otf');
}



/*
 * Box sizing
 */

* {
  -webkit-box-sizing: border-box;
     -moz-box-sizing: border-box;
          box-sizing: border-box;
}



/*
 * Global settings
 */

html,
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

html {
  font-family: "Junicode", "Georgia", serif;
  font-variant-numeric: oldstyle-nums;
  font-size: 16px;
  line-height: 1.3;
}
@media (min-width: 38em) {
  html {
    font-size: 20px;
  }
}

body {
  color: #000000;
  background-color: #fff;
  -webkit-text-size-adjust: 100%;
      -ms-text-size-adjust: 100%;
}



/*
 * Wrapper
 *
 * The wrapper is used to position site content when the sidebar is toggled. We
 * use an outter wrap to position the sidebar without interferring with the
 * regular page content.
 */

.wrap {
  position: relative;
  width: 100%;
  z-index: 0;
}



/*
 * Sidebar
 *
 * The sidebar is the drawer, the item we are toggling with our handy hamburger
 * button in the corner of the page.
 *
 * This particular sidebar implementation was inspired by Chris Coyier's
 * "Offcanvas Menu with CSS Target" article, and the checkbox variation from the
 * comments by a reader. It modifies both implementations to continue using the
 * checkbox (no change in URL means no polluted browser history), but this uses
 * `position` for the menu to avoid some potential content reflow issues.
 *
 * Source: http://css-tricks.com/off-canvas-menu-with-css-target/#comment-207504
 */

/* Style and "hide" the sidebar */
.sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  left: -18rem;
  width: 18rem;
  visibility: hidden;
  overflow-y: auto;
  z-index: 1;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 1rem;
  color: rgba(255,255,255,.6);
  background-color: #1f1f1f;
  -webkit-transition: all .3s ease-in-out;
          transition: all .3s ease-in-out;
}
@media (min-width: 30em) {
  .sidebar {
    font-size: .9rem;
  }
}

/* Sidebar content */
.sidebar a {
  font-weight: normal;
  color: #fff;
}
.sidebar-item {
  padding: 1rem;
}
.sidebar-item p:last-child {
  margin-bottom: 0;
}

/* Sidebar nav */
.sidebar-nav {
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.sidebar-nav-item {
  display: block;
  padding: .5rem 1rem .5rem 0rem;
  border-top: 1px solid rgba(255,255,255,.1);
  text-align: right;
}
.sidebar-nav-item.active,
a.sidebar-nav-item:hover,
a.sidebar-nav-item:focus {
  text-decoration: none;
  background-color: rgba(255,255,255,.1);
  border-color: transparent;
}

.sidebar-nav-item-hassub {
  padding-bottom: .1rem;
}
.sidebar-nav-item-sub {
  padding: .1rem 2rem .1rem 0rem;
  border-top: 0;
  font-size: 85%;
}
.sidebar-nav-item-lastsub {
  padding: .1rem 2rem .5rem 0rem;
  border-top: 0;
  font-size: 85%;
}


@media (min-width: 48em) {
  .sidebar-item {
    padding: 1rem;
  }
  .sidebar-nav-item {
    padding-right: 1rem;
  }
  .sidebar-nav-item-sub {
    padding-right: 1.75rem;
  }
  .sidebar-nav-item-lastsub {
    padding-right: 1.75rem;
  }
}

/* Hide the sidebar checkbox that we toggle with `.sidebar-toggle` */
.sidebar-checkbox {
  position: absolute;
  opacity: 0;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

/* Style the `label` that we use to target the `.sidebar-checkbox` */
.sidebar-toggle {
  position: absolute;
  top:  .5rem;
  left: .5rem;
  display: flex;
  align-items: center;
  padding: .25rem .25rem;
  color: #3f3f3f;
  background-color: #fff;
  cursor: pointer;
}

.sidebar-toggle::before {
  display: inline-block;
  width: 32px;
  height: 32px;
  content: "";
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='%23000' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' d='M 3 11.5h 10v 1h -10zM 3 7.5h 10v 1h -10zM 3 3.5h 10v 1h -10z' clip-rule='evenodd'/%3E%3C/svg%3E") no-repeat;
}

.sidebar-toggle:active,
#sidebar-checkbox:focus ~ .sidebar-toggle,
#sidebar-checkbox:checked ~ .sidebar-toggle {
  color: #fff;
  background-color: #3f3f3f;
}

.sidebar-toggle:active:before,
#sidebar-checkbox:focus ~ .sidebar-toggle::before,
#sidebar-checkbox:checked ~ .sidebar-toggle::before {
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='%23fff' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' d='M 3 11.5h 10v 1h -10zM 3 7.5h 10v 1h -10zM 3 3.5h 10v 1h -10z' clip-rule='evenodd'/%3E%3C/svg%3E") no-repeat;
}

@media (min-width: 30.1em) {
  .sidebar-toggle {
    position: fixed;
  }
}

@media print {
  .sidebar-toggle {
    display: none;
  }
}

/* Slide effect
 *
 * Handle the sliding effects of the sidebar and content in one spot, seperate
 * from the default styles.
 *
 * As an a heads up, we don't use `transform: translate3d()` here because when
 * mixed with `position: fixed;` for the sidebar toggle, it creates a new
 * containing block. Put simply, the fixed sidebar toggle behaves like
 * `position: absolute;` when transformed.
 *
 * Read more about it at http://meyerweb.com/eric/thoughts/2011/09/12/.
 */

.wrap,
.sidebar,
.sidebar-toggle {
  -webkit-backface-visibility: hidden;
      -ms-backface-visibility: hidden;
          backface-visibility: hidden;
}
.wrap,
.sidebar-toggle {
  -webkit-transition: -webkit-transform .3s ease-in-out;
          transition: transform .3s ease-in-out;
}

#sidebar-checkbox:checked + .sidebar {
  z-index: 10;
  visibility: visible;
}
#sidebar-checkbox:checked ~ .sidebar {
  -webkit-transform: translateX(18rem);
      -ms-transform: translateX(18rem);
          transform: translateX(18rem);
  box-shadow: .25rem 0 .5rem rgba(0,0,0,.1);
}
#sidebar-checkbox:checked ~ .sidebar-toggle {
  -webkit-transform: translateX(18rem);
      -ms-transform: translateX(18rem);
          transform: translateX(18rem);
  box-shadow: 0 0 0 .25rem #fff;
}



/*
 * Masthead
 */

.masthead {
  -webkit-box-sizing: content-box;
     -moz-box-sizing: content-box;
          box-sizing: content-box;
  padding-top:    0;
  padding-bottom: 0;
  margin-bottom: 3rem;
  height:3.5em;
  border-bottom: 1px solid #dfdfdf;
  text-align: right;
  width: 100%;
}



/*
 * Container
 *
 * Center the page content.
 */

.container {
  max-width: 28rem;
  padding-left:  1rem;
  padding-right: 1rem;
  margin-left:  auto;
  margin-right: auto;
}
@media (min-width: 38em) {
  .container {
    max-width: 32rem;
  }
}
@media (min-width: 56em) {
  .container {
    max-width: 38rem;
  }
}



/*
 * Pages
 *
 * Each page is wrapped in `.page` and is only used on the page layout.
 */

.page {
  margin-bottom: 4em;
}

.page-title {
  margin-top: 0;
}



/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-weight: 400;
  color: #b30000;
  letter-spacing: -.025rem;
  margin-bottom: .5rem;
  line-height: 1.2;
  text-rendering: optimizeLegibility;
}
h1 {
  font-size: 2rem;
}
h2 {
  margin-top: 1rem;
  font-size: 1.5rem;
}
h3 {
  margin-top: 1.5rem;
  font-size: 1.25rem;
}
h4, h5, h6 {
  margin-top: 1rem;
  font-size: 1rem;
}



/* Body text */
p {
  margin-top: 0;
  margin-bottom: 1rem;
}

strong {
  color: #303030;
}



/* Links */

a {
  color: #0066b3;
  text-decoration: none;
}
a strong {
  color: inherit;
}
/* `:focus` is linked to `:hover` for basic accessibility */
a:hover,
a:focus {
  text-decoration: underline;
}



/* Lists */
ul, ol, dl {
  margin-top: 0;
  margin-bottom: 1rem;
}

dd {
  margin-bottom: .5rem;
}



/* Quotes */
blockquote {
  padding: .5rem 1rem;
  margin: .8rem 0;
  color: #7a7a7a;
  border-left: .25rem solid #e5e5e5;
}
blockquote p:last-child {
  margin-bottom: 0;
}
@media (min-width: 30em) {
  blockquote {
    padding-right: 5rem;
    padding-left: 1.25rem;
  }
}



/* Tables */
table {
  margin-bottom: 1rem;
  width: 100%;
  border: 0px;
  border-collapse: collapse;
}
td,
th {
  border: 0px;
}

.idtable td:first-child {
  text-align:right;
  white-space: nowrap;
  font-family:Verdana,Arial,sans-serif;
  font-size:.75rem;
  padding: .1rem .5rem .1rem 0rem;
}
.idtable td:last-child {
  width:100%;
  font-family:"Noto Sans Mono", Monaco, "Courier New", monospace;
  font-size:.75rem;
  padding: .1rem;
}




/* Misc */
hr {
  position: relative;
  margin: 1.5rem 0;
  border: 0;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #fff;
}

abbr {
  font-variant-caps: all-small-caps;
  letter-spacing: 0.1em;
}



/* Grid layouts */
.grid-container {
  display: grid;
  gap: 10px;
  background-color: white;
}

.grid-book-citation {
  grid-area: 1 / 1 / 1 / span 2;
}

.grid-book-variants {
  grid-area: 2 / 1;
}

.grid-book-cover {
  grid-area: 2 / 2 / span 2 / 2;
  display: block-inline;
}

.grid-book-description {
  grid-area: 3 / 1;
}

@media only screen and (max-width: 38em) {
  .grid-book-citation {
    grid-area: 1 / 1;
  }
  .grid-book-variants {
    grid-area: 2 / 1;
  }
  .grid-book-cover {
    grid-area: 3 / 1;
  }
  .grid-book-description {
    grid-area: 4 / 1;
  }
}

.book-cover {
  display: block;
  margin-left: auto;
  margin-right: auto;
  width:300px;
}
.book-cover-border {
  border-style: solid;
  border-width: 1px;
  border-color: #bfbfbf
}

.book-author {
  text-transform: lowercase;
  font-variant: small-caps;
  font-size:1.1rem;
}
.book-title {
  margin-bottom: 0;
  margin-top: 0;
}

.book-subtitle {
  font-size:1.25rem;
}

.book-note {
  font-size:.9rem;
}
.book-publication {
  font-size:.8rem;
}

dl.book-variants {
  padding-top: 2rem;
}
.book-variants dd {
  font-size: .9rem;
}


dt.publication-title {
  margin-bottom: 0;
  line-height: 1.2;
}
.publication-details {
  line-height: 1.2;
}
.publication-doi, .publication-url, .publication-arxiv {
  font-size: 80%;
  padding-top: .2em;
}
.publication-doi, .publication-url, .publication-arxiv a {
  font-family: Menlo, Monaco, "Courier New", monospace;
}





/* Special */

/* LaTeX package name */
.latex-pkg {
  font-size:85%;
  font-family: Menlo, Monaco, "Courier New", monospace;
}



/* For LaTeX logo */
.tex sub, .latex sub, .latex sup {
  text-transform: uppercase;
}

.tex sub, .latex sub {
  vertical-align: bottom;
  position: relative;
  bottom: -.45ex;
  margin-left: -0.1667em;
  margin-right: -0.1em;
}

.tex, .latex, .tex sub, .latex sub {
  font-size: 1em;
}

.latex sup {
  font-size: 0.8em;
  vertical-align: top;
  position: relative;
  top: 0ex;
  margin-left: -0.36em;
  margin-right: -0.15em;
}
