  html, body {
    background: #fff;
    color: #111;
    height: 100%;
  }

  body {
    font-family: 'Lora', 'Palatino', 'Palatino Linotype', 'Book Antiqua', serif;
    font-size: 12pt;
    line-height: 1.25;            /* relatively tight leading */
    margin: 3.5em auto;           /* visual top/bottom breathing room */
    max-width: 46em;
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
  }

  /* Paragraphs: indentation, no vertical spacing */
  p {
    text-indent: 1.5em;
    margin: 0 0 0.6em 0;
  }

  /* Headings: numbered */
  /* section numbering with CSS counters */
  h1, h2, h3, h4 {
    page-break-after: avoid;
    margin: 1.2em 0 0.6em 0;
    font-weight: 700;
    font-variant: small-caps;
    letter-spacing: .02em;
  }

  /* Setup counters */
  body { counter-reset: section; }

  h1 {
    font-size: 1.6em;
    text-align: center;
    margin-bottom: 0.2em;
  }

  /* Section numbering */
  h2 {
    counter-increment: section;
    font-size: 1.4em;
  }
  h2::before { content: counter(section) ". "; }

  h3 { font-size: 1.2em; margin-left: 0.5em; }
  h3::before { content: counter(section) "." counter(subsection, decimal) " "; }

  /* Create subsection counter whenever an h3 appears after h2 */
  h2 { counter-reset: subsection; }
  h3 { counter-increment: subsection; }

  /* links */
  a:link {
    color: #000000;
    text-decoration: none;
    border-bottom: 1px solid;
    }

  a:visited {
    color: #000000;
    text-decoration: none;
    border-bottom: 1px solid;
    }

  a:hover {
    color: #ff0080;
    }

  /* Title block */
  .title {
    text-align: center;
    margin-bottom: 0.6em;
  }
  .title h1 { margin: 0; }
  .author {
    margin-top: 0.2em;
    font-variant: small-caps;
    font-size: 0.95em;
  }
  .contact {
    margin-top: 0.4em;
    font-size: 0.9em;
    text-align: center;
    font-style: italic;
    line-height: 1.3;
    white-space: pre-line;
    color: #333;
  }
  .date {
    font-size: 0.85em;
    margin-top: 0.2em;
    color: #333;
  }

  /* Abstract environment */
  .abstract {
    border-left: 4px solid #ddd;
    padding: 0.6em 1em;
    margin: 0.8em 0 1em 0;
    background: rgba(0,0,0,0.01);
    font-style: italic;
    font-size: 0.95em;
  }

  .portrait {
    text-align: center;
    margin: 0.8em 0 0.4em 0;
  }

  .portrait img {
    width: 220px;
    height: auto;
    border: 1px solid #ddd;    /* subtle border */
    border-radius: 4px;        /* soft corners; set 0 for square */
    padding: 2px;
    background: rgba(0,0,0,0.01);
  }

  /* Theorem-like box */
  .theorem {
    border: 1px solid #ddd;
    padding: 0.75em 1em;
    margin: 0.8em 0;
    background: rgba(0,0,0,0.01);
  }
  .theorem .name {
    font-weight: 700;
    font-style: italic;
    display: block;
    margin-bottom: 0.4em;
  }

  /* Bibliography */
  .bibliography {
    margin-top: 1.2em;
    padding-left: 1.1em;
    list-style: none;
    counter-reset: revcount 10; /* +1 publication */
  }
  .bibliography li {
    margin-bottom: 0.5em;
    counter-increment: revcount -1; /* count down */
  }
  .bibliography li::before{
    content: counter(revcount) ". ";
    font-weight: bold;
  }

  .other-list {
    margin-top: 1.2em;
    padding-left: 1.1em;
    list-style: none;
  }
  .other-list li {
    margin-bottom: 0.5em;
  }
  .other-list-dots {
    margin-top: 1.2em;
    padding-left: 1.1em;
    list-style-type: disc;
  }
  .other-list-dots li {
    margin-bottom: 0.5em;
  }
  .dotline {
    border: none;
    border-top: 1px dotted #ddd; /* dotted top border only */
    margin: 1em 0;
  }

  /* Footer */
  .footnote {
    font-size: 0.85em;
    color: #333;
    border-top: 1px dashed #ddd;
    margin-top: 1.2em;
    padding-top: 0.6em;
  }
  .pink {
    color: #ff0080;
    }
  .black {
      color: #000;
  }
  .gray0 {
    color: #333;
  }
  .gray {
    color: #ddd;
    }
  .gray2 {
      color: rgba(0, 0, 0, 0.01);
  }
  .white {
    color: #ffffff;
    }

  /* Responsive small screens */
  @media (max-width: 520px) {
    body { margin: 1em; font-size: 14px; }
    .title h1 { font-size: 1.4em; }
  }
