/* MAIN CSS */

/* RESET.CSS OVERRIDES */

/* Change SIMPLE.css variable values for light/dark mode */

@import url('https://fonts.googleapis.com/css2?family=Caprasimo&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Titillium+Web:ital,wght@0,400;0,600;0,700;0,900;1,400;1,600;1,700&display=swap');

:root {
    --body-font: 'Titillium Web', sans-serif;
    --mono-font: Consolas, Menlo, Monaco, "Andale Mono", "Ubuntu Mono", monospace;
    /* Default (light) theme */
    --bg: #fff;
    --accent-bg: #f5f7ff;
    --text: #212121;
    --text-light: #585858;
    --border: #d8dae1;
    --accent: #004D40;
    --code: #795548;
    --preformatted: #444;
    --marked: #FFEE58;
    --disabled: #efefef;

}

/* Dark theme */
@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
        --bg: #212121;
        --accent-bg: #2b2b2b;
        --text: #dcdcdc;
        --text-light: #ababab;
        --border: #666;
        --accent: #00BCD4;
        --code: #EA80FC;
        --preformatted: #ccc;
        --disabled: #111;

    }

    img,
    video {
        opacity: 0.8;
    }
}

html {
    background: var(--bg);
    position: relative;
}

body {
    background: transparent;
    position: relative;
    z-index: 1;
    grid-template-columns: 1fr min(45rem, 90%) 1fr;
    min-height: 100vh;
}

/* Checkerboard fading after ~8 rows (8×20px = 160px) */
body::before{
  content:"";
  position:absolute;
  left:0; right:0; top:0;
  inset:0;
  height:200px;
  background-size:80px 40px; /* 20px squares */
  background-repeat: repeat;
  pointer-events:none;
  -webkit-mask-image:linear-gradient(to bottom, #000 0 40px, transparent 160px);
  mask-image:linear-gradient(to bottom, #000 0 40px, transparent 160px);
}

body::before {
  background-image:conic-gradient(#FBE64D 25%, #EBD848 0 50%, #FBE64D 0 75%, #EBD848 0);
}

@media (prefers-color-scheme: dark) {
  body::before {
    background-image:conic-gradient(#1E4BAA 25%, #173B9A 0 50%, #1E4BAA 0 75%, #173B9A 0);
  }
}

body > header {
    background-color: transparent;
    z-index: 100;
    padding: 5rem 0 2rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
    margin-top: 2rem;
    display: flex;
    flex-flow: column;
}

#header {
    display: flex;
    align-items: center;
    justify-content: center;
    column-gap: 3rem;
}

body > header h1 {
/*    border-top: 0.5rem solid var(--accent); */
    font-family: "Caprasimo";
    font-size: 6rem;
    margin: 0;
}

body > header p {
    font-size: 1.5rem;
    font-style: italic;
    font-weight: bold;
    color: var(--text-light);
}

header > nav ul,
header > nav ol,
header > #breadcrumbs {
    margin-top: 2rem;
    padding: 0;
    justify-content: center;
}

nav a:first-child {
    margin-left: 0;
}

h1, h2 {
    text-align: center;
}

h1 {
    font-family: "Caprasimo", serif;
}

h1 {
    font-size: 3rem;
}

h2, h3, h4, h5, h6 {
    font-family: 'Titillium Web', sans-serif;
}

h2 {
    font-size: 2rem;
}

h4, h5, h6 {
    font-size: 1.5rem;
}

h5 {
    color: var(--text-light);
}

h6 {
    font-size: 1.3rem;
}

header a,
footer a {
    text-decoration: none;
}

footer a:hover,
footer a:focus{
    text-decoration: underline;
}

body > footer {
    
    text-align: right;
}

article {
    border: none;
    line-height: 2rem;
}

article h2 {
/*    border-top: 5px solid var(--accent);*/
    padding-top: 1rem;
}

article h3 {
    color: var(--text-light);
    padding-bottom: 0.5rem;
}

/* fix for markdown render of img inside p tags */
p > img {
    object-fit: cover;
    min-width: 50%;
}

aside {
    font-size: 1rem;
    width: 30%;
    padding: 0 15px;
    float: left;
    position: relative;
    left: -35%;
    margin-right: -35%;
    text-align: right;
    border: none;
    background: none;
    color: var(--text-light);
}

/* Make aside full-width on mobile */
@media only screen and (max-width: 1080px) {
    aside {
        width: 100%;
        float: none;
        position: inherit;
        text-align: left;
        padding: 1rem;
        background-color: var(--accent-bg);
        border: 1px solid var(--border);
        margin-left: 0;
        color: var(--accent);
    }
}

form label + *:not(label,br) {
    margin-bottom: 1.2rem;
}

form input, select {
    width: 100%;
}

form div {
    margin-bottom: 1rem;
}

hr {
    height: 2rem;
    background: none;
    border: none;
    border-bottom: 1px solid var(--text-light);
    margin-top: 0;
    margin-bottom: 0;
    margin-left: 0;
    margin-right: 25vw;
}

.error {
    border: none;
}

.error > * {
    margin: 1rem;
}

.content-footer {
    text-align: right;
    padding-top: 3rem;
    color: var(--text-light);
    text-decoration: none;
}

/* CSS Override - Grav Pagination Plugin */
.pagination {
    text-align: left;
}

.pagination li {
    border: none;
    border-bottom: 1px solid var(--accent);
    margin-left: 0.5rem;
    margin-right: 0.5rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.pagination li:hover {
    border-bottom: 1px solid var(--accent-bg);
}

.pageflip {
    border: unset;
    display: flex;
    justify-content: space-between;
    margin: 1rem;
    padding: unset;
}

.pageflip a {
    font-size: 0.9rem;
    padding-top: 0;
    padding-bottom: 0;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    text-decoration: none;
}

.pageflip a:hover {
    text-decoration: underline;
}

/* CSS Override - Grav Breadcrumbs plugin */

#breadcrumbs {
/*    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);*/
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding-inline-start: unset;
/*    padding: 1rem;
    margin: 1rem;*/
    font-size: 0.9rem;
    line-height: unset;
    height: unset;
}

#breadcrumbs span{
    margin: unset;
    padding: unset;
    padding-left: 0.5rem;
    display: flex;
    flex-wrap: nowrap;
}

#breadcrumbs a>span{
    text-decoration: none;
}

#breadcrumbs a>span:hover {
    text-decoration: underline;
}
