/* general.css */
:root {
    --default-border-radius: 16px;
    --default-body-font-family: 'Tinos', 'Nerd Font';
    --default-code-font-family: '0xProtoNL', 'Agave', 'Nerd Font';
    --default-font-size: 20px;
    --h1-font-size: 32px;
}

@media screen and (max-width: 900px) {
    :root {
        --default-font-size: 18px;
        --h1-font-size: 24px;
    }
}

/* FONT-FACE */
/* Nerd Font */
@font-face {
    font-family: 'Nerd Font';
    src: url("../fonts/NerdFont/SymbolsNerdFont-Regular.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
}


/* Tinos */
@font-face {
    font-family: 'Tinos';
    src: url("../fonts/Tinos/Tinos-Regular.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Tinos';
    src: url("../fonts/Tinos/Tinos-Italic.ttf") format("truetype");
    font-weight: normal;
    font-style: italic;
}

@font-face {
    font-family: 'Tinos';
    src: url("../fonts/Tinos/Tinos-Bold.ttf") format("truetype");
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'Tinos';
    src: url("../fonts/Tinos/Tinos-BoldItalic.ttf") format("truetype");
    font-weight: bold;
    font-style: italic;
}

/* 0xProtoNL */
@font-face {
    font-family: '0xProtoNL';
    src: url("../fonts/0xProtoNL/0xProto-Regular-NL.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: '0xProtoNL';
    src: url("../fonts/0xProtoNL/0xProto-Italic-NL.ttf") format("truetype");
    font-weight: normal;
    font-style: italic;
}

@font-face {
    font-family: '0xProtoNL';
    src: url("../fonts/0xProtoNL/0xProto-Bold-NL.ttf") format("truetype");
    font-weight: bold;
    font-style: normal;
}

/* Agave */
@font-face {
    font-family: 'Agave';
    src: url("../fonts/Agave/Agave-Regular.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Agave Nerd Font';
    src: url("../fonts/Agave/Agave-Bold.ttf") format("truetype");
    font-weight: bold;
    font-style: normal;
}

/* Amiri */
@font-face {
    font-family: Amiri;
    src: url("../fonts/Amiri/Amiri-Regular.ttf") format("truetype");
    font-weight: normal;
}

/* RTL */

.rtl {
    direction: rtl;
    text-align: right;
}

/* LAYOUT DESGINATION */

.inlineblock {
    display: inline-block;
}

/* TEXT LAYOUT */
body {
    background-color: var(--background-color);
}

* {
    transition-property: all;
    transition-duration: 500ms;
}

body * {
    font-family: var(--default-body-font-family);
    color: var(--text-color);
    font-size: var(--default-font-size);
}

*::selection {
    background-color: var(--selection-bg-color-1);
    color: var(--text-color-reversed-1);
}

em,
i {
    font-style: italic;
}

strong {
    font-weight: bold;
}

p,
em,
i,
strong,
a {
    margin: 0 0 0.5em 0;
}

blockquote {
    border-left: 4px solid var(--weak-text-color);
    margin: 0.5em;
    padding-left: 1em;
}

@media screen and (max-width: 900px) {
    blockquote {
        border-left: 3px solid var(--weak-text-color);
        padding-left: 0.5em;
    }

    quote {
        margin: 0.3em;
    }
}

blockquote * {
    color: var(--weak-text-color);
    font-style: italic;
}

quote {
    display: inline;
    margin: 0.5em;
    font-style: italic;
    color: var(--weak-text-color);
}

h1 {
    font-size: 1.45em;
}

h2 {
    font-size: 1.25em;
}

code {
    font-family: var(--default-code-font-family);
    box-sizing: content-box;
    margin: 0 0.2em;
    padding: 0.1em 0.2em;
    display: inline-block;
    background-color: var(--emphasis-bg-color-1);
    border-radius: 6px;
    transition-property: all;
    transition-duration: 400ms;
}

code em,
code i {
    font-family: var(--default-code-font-family);
}

code::selection,
code em::selection,
code i::selection {
    background-color: var(--selection-bg-color-reversed-1);
    color: var(--text-color);
}

code:hover {
    background-color: var(--emphasis-bg-color-2);
}

a {
    color: var(--link-color);
    text-decoration: underline;
}

h1.headTitle {
    display: block;
    position: sticky;
    background-color: var(--background-color);
    top: 0;
    padding: 0.2em 0 0.2em 0;
    margin-top: 0;
    font-size: var(--h1-font-size);
    transition-duration: 500ms;
}

h1.headTitle>a {
    color: inherit;
    font-size: inherit;
    text-decoration: inherit;
}

h1.headTitle.is-sticky {
    text-align: center;
    margin-top: 0;
    padding: 0.3em 0 0.2em 0;
    /*padding-top设置为0.3em的时候，抖动最轻*/
    border-bottom: 4px solid var(--text-color);
    box-shadow: 0 2px 5px var(--text-color);
    font-size: calc(var(--h1-font-size)*0.9);
}

@media screen and (max-width: 900px) {
    h1.headTitle.is-sticky {
        padding: 0.3em 0 0.3em 0;
        border-bottom: 3px solid var(--text-color);
        box-shadow: 0 1px 3px var(--text-color);
        font-size: calc(var(--h1-font-size)*0.8);
    }
}

h1.headTitle:hover {
    text-decoration: underline;
    cursor: pointer;
}

h1.headTitle.folded:hover::before {
    content: "\eaf3 ";
}

h1.headTitle.unfolded:hover::before {
    content: "\eaf4 ";
}

h1.headTitle.latest::after {
    content: " \f0394";
    font-weight: 100;
    font-size: 1em;
}

p.topicArea {
    margin: 0.5em 0 0 0;
}

span.topic {
    color: var(--topic-color);
    margin-right: 1em;
    transition-property: all;
}

span.topic:hover {
    text-decoration: underline;
    cursor: pointer;
}

span.topic::before {
    content: "\f4df";
    color: var(--topic-color);
}

span.topic:hover::before {
    content: "\e273";
}

a[href="https://github.com/QuartzQuincy2019"]::before,
a[href="https://quartzquincy2019.github.io/SPWTT/Home.html"]::before,
a[href="https://quartzquincy2019.github.io/OTFWC/OTFWC.html"]::before,
a[href="https://quartzquincy2019.github.io/SVBOD/index.html"]::before,
a[href="https://quartzquincy2019.github.io/TEBOS/index.html"]::before,
a[href="https://quartzquincy2019.github.io/AGHGC/IGE.html"]::before,
a[href="https://quartzquincy2019.github.io/AGHGC/AGHGC.html"]::before {
    content: "\f408  ";
}

/* TABLE LAYOUT */
table {
    margin: 0.5em;
}

table,
table th,
table td {
    border: 1px solid var(--text-color);
    border-collapse: collapse;
    text-align: center;
}

table th,
table td {
    padding: 0.5em;
}

tfoot {
    font-weight: bold;
}

.zebtable tr:nth-of-type(2n) {
    background-color: var(--emphasis-bg-color-1);
}

button {
    background-color: var(--emphasis-bg-color-2);
}

#pageButtonArea {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    transition-property: all;
    transition-duration: 300ms;
}

#pageButtonArea button {
    font-size: var(--h1-font-size);
    padding: 0.4em 0.7em;
    margin: 0.3em;
    background-color: var(--button-bg-color);
    border-radius: 7px;
    border: none;
}

#pageButtonArea button:hover {
    background-color: var(--emphasis-bg-color-2);
    cursor: pointer;
}

#pageButtonArea button.currentPageButton {
    background-color: var(--button-bg-color-selected);
    cursor: default;
}

#pageButtonArea button.left-border {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-left: 5px double var(--text-color);
}

#pageButtonArea button.right-border {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: 5px double var(--text-color);
}

#pageButtonArea button.left-end {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-left: 5px solid var(--border-end-color);
}

#pageButtonArea button.right-end {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: 5px solid var(--border-end-color);
}

#PageInfo {
    text-align: center;
    margin: 0.5em;
    font-size: var(--default-font-size);
    color: var(--weak-text-color);
    min-height: 6em;
}

@media screen and (max-width: 900px) {
    #PageInfo {
        min-height: auto;
    }

    #PageInfoTitles {
        display: none;
    }
}

/* UNIVERSAL */

.body_hr1 {
    margin: 0.05em 0 1.2em 0;
    border: none;
    border-top: 4px solid var(--text-color);
    transition-property: all;
    transition-duration: 500ms;
}

.body_hr2 {
    margin: 1em 0 0 0;
    border: none;
    border-top: 2px solid var(--text-color);
    transition-property: all;
    transition-duration: 500ms;
}

.alert {
    color: var(--independent-alert-color);
    text-shadow: 1px 1px 2px #9f9f9f;
}

.emphasis {
    color: var(--independent-emphasis-color);
    text-shadow: 1px 1px 2px #ffffff;
}

.weak,
.weak * {
    color: var(--weak-text-color);
}



/* SPECIAL FONT */

.arabic,
.ara,
.arabic *,
.ara * {
    font-family: sans-serif, 'Segoe UI';
}

.naskh {
    font-family: Amiri;
    font-size: calc(var(--default-font-size)*1.2);
}

.agave {
    font-family: 'Agave';
}

code *,
code {
    font-family: var(--default-code-font-family) !important;
}