
/******************************************************************************
* MODULE     : notes-extra.css
* DESCRIPTION: CSS style sheet for TeXmacs blog/wiki
* COPYRIGHT  : (C) 2020  Massimiliano Gubinelli
*******************************************************************************
* This software falls under the GNU general public license version 3 or later.
* It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE
* in the root directory or <http://www.gnu.org/licenses/gpl-3.0.html>.
******************************************************************************/

/******************************************************************************
* Font setup
******************************************************************************/

@import url('./highlight-github.css?v=20261027');
@import url('./theme.css');

@font-face {
    font-family: 'Source Serif Pro';
    src: url('./fonts/source/SourceSerifPro-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Source Serif Pro';
    src: url('./fonts/source/SourceSerifPro-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Source Serif Pro';
    src: url('./fonts/source/SourceSerifPro-It.otf') format('opentype');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Source Serif Pro';
    src: url('./fonts/source/SourceSerifPro-BoldIt.otf') format('opentype');
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Source Sans Pro';
    src: url('./fonts/source/SourceSansPro-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Source Sans Pro';
    src: url('./fonts/source/SourceSansPro-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Source Sans Pro';
    src: url('./fonts/source/SourceSansPro-It.otf') format('opentype');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Source Sans Pro';
    src: url('./fonts/source/SourceSansPro-BoldIt.otf') format('opentype');
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Source Code Pro';
    src: url('./fonts/source/SourceCodePro-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Source Code Pro';
    src: url('./fonts/source/SourceCodePro-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Source Code Pro';
    src: url('./fonts/source/SourceCodePro-It.otf') format('opentype');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Source Code Pro';
    src: url('./fonts/source/SourceCodePro-BoldIt.otf') format('opentype');
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

/******************************************************************************
* Code syntax highlight
******************************************************************************/

/*@import url('https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.3.2/styles/default.min.css');*/

.hljs {
    display: block;
    overflow-x: auto;
    padding: 0.5em;
    background-color: initial ;
}

/******************************************************************************
* Main text properties
******************************************************************************/

:root {
    --main-family: 'Source Serif Pro', serif;
    --title-family: 'Source Sans Pro', sans-serif;
    --tt-family: 'Source Code Pro', monospace;
}

html {
    background-color: var(--color-background);
    font-size: 18px;
}

body {
    background-color: var(--color-background);
    color: var(--color-text);
    font-family: var(--main-family);
    text-align: left;
    line-height: 1.5;
    font-size: 0.95rem;
    border: 0px;
    box-sizing: border-box;
    padding: 3em 4em;
    margin: auto;
    margin-bottom: 0em;
    margin-top: 0em;
    width: 100%;
    max-width: 900px;
}

img {
    max-width: 100%;
    height: auto !important;
    background-color: var(--image-background);
}

pre, code {
    overflow-wrap: anywhere;
}

pre, .hljs {
    overflow-x: auto;
}

table {
    max-width: 100%;
}

.center {
    text-align: center;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
}

.unavailable-link {
    color: var(--color-muted);
    text-decoration: underline dotted;
    cursor: help;
}

:focus-visible {
    outline: 3px solid var(--color-title);
    outline-offset: 3px;
}

@media screen and (max-width: 799px) {
    body {
        padding: 1.5em 1.25em;
    }
}

.tmdoc-body {
    padding: 0px;
    margin: 0px 0px;
}

.mg-caption {
    text-align: right;
}

.mg-title {
    padding-top: 0;
    margin-top: 0.5em;
    margin-bottom: 0.15em;
    letter-spacing: -0.03em;
    font-family: var(--title-family);
    font-size: 1.85rem;
    text-align: left;
}

.mg-portrait img {
    width: 85%;
    height: auto;
}

/* Caption flush with the left edge of the portrait (85% wide, centred). */
.mg-hero .mg-caption {
    width: 85%;
    margin: 0 auto;
    text-align: left;
}

/* Main page: picture beside the name, stacked on narrow screens. */
@media screen and (max-width: 599px) {
    .mg-hero table,
    .mg-hero tbody,
    .mg-hero tr,
    .mg-hero td {
        display: block;
        width: 100% !important;
        padding: 0 !important;
    }
}

.mg-whats-new {
    border-left: 0.3em solid var(--color-title);
    padding: 0.6em 1em;
    margin: 1.5em 0;
    font-family: var(--title-family);
}

.mg-whats-new p {
    margin: 0;
}

.whats-new-item {
    margin: 1.2em 0;
    padding-left: 0.9em;
    border-left: 2px solid var(--color-muted);
}

.whats-new-item p {
    margin: 0.25em 0;
}

.notes-comments {
    display: none;
}

.notes-comments-section {
    margin-top: 3em;
    padding-top: 1em;
    border-top: 1px solid var(--color-muted);
}

.block-italic {
    font-style: italic;
}

.block-bold {
    font-weight: bold;
}

.block-monospace {
    font-family: var(--tt-family);
}

.wave-image  {
    width: 5.5rem;
    float: right;
}

.wave-image img {
    width: 5rem;
}

h1 {
    color: var(--color-title);
    font-family: var(--title-family);
    font-weight: bold;
    font-size: 1.6rem;
    margin-top: 1em;
    margin-bottom: 1em;
    text-align: center;
}

h2 {
    color: var(--color-title);
    font-family: var(--title-family);
    font-weight: bold;
    font-size: 1.2rem;
    margin-top: 1em;
    margin-bottom: 0.5em;
}

h3 {
    color: var(--color-title);
    font-family: var(--title-family);
    font-weight: bold;
    font-size: 1rem;
    margin-top: 1em;
    margin-bottom: 0.5em;
}

h4, h5, h6 {
    color: var(--color-title);
    font-family: var(--title-family);
    font-weight: bold;
    font-size: 1rem;
    margin-top: 0.5em;
    margin-bottom: 0em;
}

div {
    margin: 0px;
    padding: 0px;
}

p, center {
    margin: 0px;
    padding: 0px;
    padding-bottom: 0.17em;
    padding-top: 0.17em;
}

ul, ol, dl, di {
    margin-top: 0px;
    margin-bottom: 0px;
    padding-top: 0.35em;
    padding-bottom: 0.35em;
}

ul > p, ol > p, dl > p, di > p {
    padding-bottom: 0.1em;
    padding-top: 0.1em;
}

ul {
    color: var(--color-title);
    list-style: square;
    padding-inline-start: 1em;
}

li p {
    color: var(--color-text);
}

table {
    border-collapse: collapse;
}

tbody p {
    margin: 0px;
    padding: 0px;
}

td {
    padding: 0.2em;
    vertical-align: baseline;
}

a:link, a:visited {
    color: var(--color-link);
    text-decoration: none;
}

a:active, a:focus, a:hover {
    color: var(--color-title);
    text-decoration: underline;
}

.tmweb-obsolete, .tmweb-copyright {
    display: none;
}

/******************************************************************************
* Headers
******************************************************************************/

.notes-header img {
    vertical-align: middle;
}

.notes-header-name {
    float: right;
}

.notes-theorem {
    border-top: 1px solid var(--color-title);
    border-bottom: 1px solid var(--color-title);
    padding: 0.5em;
    margin: 1em 0;
    break-inside: avoid;
}

.notes-theorem > :first-child {
    margin-top: 0;
}

.notes-theorem > :last-child {
    margin-bottom: 0;
}

.notes-abstract {
    font-size: 90%;
    font-style: italic;
    margin-bottom: 2em;
}


.tmweb-pad-below {
    padding-bottom: 20px;
}

.tmweb-header {
    margin: 0px -5em;

    background-image: url("../images/sigma-224.svg"),
                      url("../images/uniform-224.png");
    background-position: bottom, top;
    background-repeat: repeat-x, repeat;
    
    padding-left: 20px;
    padding-right: 20px;
    padding-top: 10px;
    padding-bottom: 40px;
}

.tmweb-header a:link, .tmweb-header a:visited {
    color: #555;
}

.tmweb-header a:active, .tmweb-header a:focus, .tmweb-header a:hover {
    color: #D0343F;
    text-decoration: underline;
}

.tmweb-title-image {
    width: 60px;
    height: 60px;
    vertical-align: -27px;
    padding: 10px 10px;
}

.tmweb-title {
    height: 60px;
    font-weight: bold;
    font-size: 1.6rem;
}

.tmweb-top-menu {
    height: 60px;
    padding-top: 30px;
    float: right;
}

.tmweb-top-menu a {
    background-image: none;
    border-style: none;
    display: inline-block;
    text-align: center;
    padding-left: 10px;
    padding-right: 10px;
}

@media screen and (max-width: 1199px) {
    .tmweb-title-image {
        width: 50px;
        height: 50px;
        vertical-align: -23px;
        padding: 8px 8px;
    }

    .tmweb-title {
        height: 50px;
    }

    .tmweb-top-menu {
        height: 50px;
        padding-top: 25px;
    }
}

@media screen and (max-width: 799px) {
    .tmweb-header {
        margin: 0px -2em;
        padding: initial;
        padding-top: 5px;
        padding-bottom: 40px;
    }

    .tmweb-title-image {
        width: 40px;
        height: 40px;
        vertical-align: -18px;
        padding-top: 7px;
        padding-bottom: 7px;
        padding-left: 2em;
        padding-right: 0em;
    }

    .tmweb-title {
        height: 40px;
    }
    
    .tmweb-top-menu {
        height: initial;
        float: initial;
        position: relative;
        overflow: hidden;
        padding-top: 10px;
    }
    
    .tmweb-top-menu a {
        border-color: silver;
        border-style: solid none none none;
        border-width: thin;
        color: #555;
        display: block;
        padding: 5px 2em;
        text-align: left;
    }
}

/******************************************************************************
* Footers
******************************************************************************/

.tmweb-pad-above {
    padding-top: 20px;
}

.tmweb-footer {
    margin: 0px -5em;

    background-image: url("../images/sigma-224-rev.svg"),
                      url("../images/uniform-224.png");
    background-position: top, bottom;
    background-repeat: repeat-x, repeat;

    color: #555;
    padding-top: 40px;
    text-align: center;
}

.tmweb-footer a:link, .tmweb-footer a:visited {
    color: #777;
}

.tmweb-footer a:active, .tmweb-footer a:focus, .tmweb-footer a:hover {
    color: #D0343F;
    text-decoration: underline;
}

.tmweb-footer h1, .tmweb-footer h2, .tmweb-footer h3 {
    margin-top: 0em;
}

.tmweb-footer .tmweb-license, .tmweb-footer section {
    font-size: 18px;
    display: inline-block;
    margin-left: 1em;
    margin-right: 1em;
    text-align: left;
    vertical-align: top;
}

.tmweb-footer .tmweb-license {
    text-align: justify;
    width: 470px;
    margin-left: 1em;
    margin-right: 3em;
}

.tmweb-footer nav a {
    display: block;
    text-align: left;
}

.tmweb-footer nav .tmweb-obsolete {
    display: none;
}

@media screen and (max-width: 1339px) {
    .tmweb-footer .tmweb-license {
        width: 350px;
        margin-top: -0.5em;
        margin-left: 1em;
        margin-right: 2em;
    }
}

@media screen and (max-width: 1199px) {
    .tmweb-footer .tmweb-license {
        width: initial;
        display: block;
        margin-left: 5em;
        margin-right: 5em;
        margin-top: 0em;
        margin-bottom: 1em;
    }

    .tmweb-footer .tmweb-license, .tmweb-footer section {
        font-size: 15px;
    }
}

@media screen and (max-width: 799px) {
    .tmweb-footer {
        margin: 0px -2em;
    }

    .tmweb-footer .tmweb-license, .tmweb-footer section {
        font-size: 12px;
    }
}

/******************************************************************************
* Figures with captions
******************************************************************************/

.tmweb-caption-below {
    display: block;
    text-align: center;
}

.tmweb-caption-below .tmweb-figure {
    display: block;
    text-align: center;
}

.tmweb-caption-below .tmweb-caption {
    display: inline-block;
    text-align: center;
    position: relative;
    top: -1.5em;
    margin-bottom: -1.5em;

    background-color: #905465; /* #D03445; */
    border-radius: 0.4em;
    border-color: transparent;
    border-style: solid;
    color: white;
    font-size: 1.25em;
    font-weight: bold;
    padding: 0.2em 0.5em;
    text-shadow: 0.1em 0.1em 0px #604C4C; /* #A02C2C; */
    box-shadow: 0.1em 0.1em #604C4C; /* #A02C2C; */
}

/******************************************************************************
* Horizontal versus vertical splits
******************************************************************************/

.tmweb-split-car img {
    min-width: 60vw;
    max-width: 80vw;
}

.tmweb-split-car {
    margin-top: 0.5em;
    margin-bottom: 1em;
}

@media screen and (min-width: 1600px) {
    .tmweb-split {
        display: block;
        width: 100%;
        min-height: 58vh;
        margin-top: 4vw;
    }

    .tmweb-split-car {
        display: inline-block;
        width: 55%;
        vertical-align: middle;
        margin-top: -5vh;
        margin-left: -2.5em;
        margin-right: 2.5em;
    }

    .tmweb-split-car img {
        min-width: 40vw;
    }

    .tmweb-split-cdr {
        display: inline-block;
        width: 44%;
        vertical-align: middle;
        margin-top: -5vh;
    }
}

/******************************************************************************
* Galleries
******************************************************************************/

.tmweb-hlist {
    text-align: left;
}

.tmweb-hlist div {
    display: inline;
}

.tmweb-hlist .tmweb-caption-below {
    display: inline-block;
    width: 48%;
}

.tmweb-hlist .tmweb-caption-below .tmweb-figure {
    display: inline-block;
}

.tmweb-hlist .tmweb-caption-below .tmweb-caption {
    display: inline-block;
}
    
.tmweb-gallery img {
    display: inline;
    width: 95%;
    padding-top: 50px;
}

@media screen and (max-width: 1200px) {
    .tmweb-hlist .tmweb-caption-below {
        width: 95%;
    }
}

@media screen and (min-width: 1800px) {
    .tmweb-hlist .tmweb-caption-below {
        width: 30%;
    }
}

/******************************************************************************
* Video galleries
******************************************************************************/

.tmweb-hlist .tmweb-thumbnail {
    display: inline-block;
    text-align: left;
    vertical-align: top;
    max-width: 320px;
    padding-left: 0.6em;
    padding-right: 0.6em;
}

.tmweb-thumbnail-image {
    transition: transform .2s; /* Animation */
}

.tmweb-thumbnail-image:hover {
    transform: scale(1.2);
}

.tmweb-hlist .tmweb-thumbnail .tmweb-thumbnail-legend {
    font-size: 0.8em;
}

.tmweb-hlist .tmweb-youtube {
    display: inline-block;
    text-align: left;
    vertical-align: top;
    padding-left: 2em;
    padding-right: 2em;
}

.tmweb-youtube .tmweb-youtube-video {
    width: 72vw;
    height: 45vw;
    max-width: 1200px;
    max-height: 750px;
}

.tmweb-youtube .tmweb-youtube-legend {
    font-size: 1em;
}

/******************************************************************************
* Miscellaneous elements
******************************************************************************/

.tmweb-item-pic img {
    width: 2.5em;
    vertical-align: top;
}

/******************************************************************************
* Special markup
******************************************************************************/

.subsup {
    display: inline;
    vertical-align: -0.2em;
}

.subsup td {
    padding: 0px;
    text-align: left;
}

.fraction {
    display: inline;
    vertical-align: -0.8em;
}

.fraction td {
    padding: 0px;
    text-align: center;
}

.wide {
    position: relative;
    margin-left: -0.4em;
}

.accent {
    position: relative;
    margin-left: -0.4em;
    top: -0.1em;
}

.compact-block p, .compact-block center {
    margin: 0px;
    padding: 0px;
}

.left-tab {
    text-align: left;
}

.center-tab {
    text-align: center;
}

.right-tab {
    text-align: right;
    margin-top: -1.2em;
    /* Keep empty chunk navigation from collapsing the title row. */
    min-height: 1.2em;
}

tt, .verbatim {
    font-family: var(--tt-family);
    font-size: 90%;
}

/******************************************************************************
* Further hacks
******************************************************************************/
code {
    font-size: 80%;
    font-family: var(--tt-family);
}

.tmweb-code {
    font-size: 90%;
}
.tmweb-code-xx {
    font-size: 90%;
    color: #567b70;
    background-color: var(--color-surface);
    border-width: 1px;
    border-color: var(--code-blue);
    border-style: solid;
    padding: 0.3em 0.6em;
    margin: 0.5em 0em;
}

.tmweb-code p, .tmweb-code pre {
    margin: 0px;
    padding: 0px;
}

.tmweb-key {
    font-size: 84%;
    background-color: var(--color-surface);
    box-shadow: 0.1em 0.1em #506080;
    padding: 0.05em 0.1em;
    margin: 0em 0.05em;
    min-width: 0.6em;
}

.tmweb-menu {
    font-size: 92%;
}

.tmweb-markup {
    color: var(--code-blue);
    font-family: var(--title-family);
}


.tmweb-entry {
    border-top: 1px solid var(--color-border);
    padding: 1.05rem 0 0.95rem;
}

.tmweb-entry-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1.5rem;
    font-family: var(--title-family);
    line-height: 1.25;
}

.tmweb-entry-title {
    font-size: 1rem;
    font-weight: 600;
}

.tmweb-entry-title a {
    text-decoration-thickness: 0.06em;
    text-underline-offset: 0.16em;
}

.tmweb-entry-date {
    color: var(--color-muted);
    flex: 0 0 auto;
    font-family: var(--title-family);
    font-size: 0.68rem;
    font-style: normal;
    letter-spacing: 0.015em;
    white-space: nowrap;
}

.tmweb-entry-abstract {
    color: var(--color-secondary);
    display: block;
    font-size: 0.82rem;
    line-height: 1.45;
    max-width: 42rem;
    padding: 0.35rem 0 0;
}

.tmweb-entry-abstract p {
    font-size: inherit;
    padding: 0;
}

@media screen and (max-width: 599px) {
    .tmweb-entry-heading {
        display: block;
    }

    .tmweb-entry-date {
        display: block;
        margin-top: 0.25rem;
        white-space: normal;
    }
}

/* fixes for bibliography */

.compact-block dt {
    float: left;
}

.compact-block dd {
    margin-bottom: 0.2em;
    margin-inline-start: 25px;
}

.caption {
    font-size: 90%;
}
/******************************************************************************
* CV specific
******************************************************************************/

.tmweb-cv-body p {
    font-size: 0.9rem;
    margin-left: 85px;
    line-height: 1.2;
}

.tmweb-cv-section p {
    color: var(--color-title);
    font-family: var(--title-family);
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 1.5em;
    margin-bottom: 0.7em;
}

.tmweb-cv-subsection {
    font-family: var(--title-family);
    font-weight: 300;
    margin-left: 85px;
}

.tmweb-cv-section p:before {
    content: "";
    display: inline-block;
    margin-right: 8px!important;
    margin-inline-start: -95px;
    width: 80px;
    height: 1px;
    background-color: var(--color-title);
    background-position: 0 100%;
    }
    
.tmweb-cv-timeline {
    float: left;
    width: 85px;
    margin-right: 8px!important;
    margin-inline-start: -100px;
    padding-top: 0.1em;
    text-align: right;
    font-size: 0.8rem;
    font-family: var(--title-family);
} 

.tmweb-bib-year {
    float: left;
    width: 85px;
    margin-right: 8px!important;
    margin-inline-start: -120px;
    padding-top: 0.2em;
    text-align: right;
    font-size: 0.7rem;
    font-weight: bold;
    font-family: var(--title-family);
    color: var(--color-title);
}

/* Marked terms inside MathJax formulas (\marked, notes.ts). */
.tm-marked { background-color: var(--color-surface); border-radius: 2px; }
