:root {
    color-scheme: light dark;
    accent-color: #7fc69b;
    --link: light-dark(#8cb99e, #8cb99e);
    --text: light-dark(#D7BA72, #D7BA72);
    --bg: light-dark(#2c3b34, #2c3b34);
    --header: light-dark(#1f0816, #1f0816);
    --header-trans: rgba(31, 8, 22, .7);
    --text-area: light-dark(#121C16, #121C16);
    --theme-switch: var(--bg);
    --shadow: rgb(0,0,0,.5);
    --selection: light-dark(#1f0816, #1f0816);
    --gold: light-dark(#7F510D, #7F510D);
    --text-shadow: light-dark(black, black);
    --h1-font: 'Signature', var(--h2-font);
    --h2-font: 'Playfair', Didot, 'Bodoni MT', 'Noto Serif Display', 'URW Palladio L', P052, Sylfaen, serif;;
} /* https://css-tricks.com/almanac/functions/l/light-dark/ */
/* https://1linelayouts.com/ */
/* https://github.com/system-fonts/modern-font-stacks */

@font-face {
  font-family: 'Signature';
  src: url("Brother\ Signature.otf");
}

@font-face {
  font-family: 'Playfair';
  src: url("Playfair_9pt-Light.ttf");
}

html, body {
    margin: 0;
    padding: 0;
    overflow-wrap: break-word;
}

body {
    font-family: Helvetica, Inter, Roboto, 'Helvetica Neue', 'Arial Nova', 'Nimbus Sans', Arial, sans-serif;;
    background-color: var(--bg);
    color: var(--text);
    min-height: 100vh;
    box-sizing: border-box;
    display: grid;
    grid-template-rows: auto 1fr auto;
    scrollbar-color: var(--gold) var(--text-area);
    background-image: url(images/botanical_bg2.svg);
    background-position: center;
    background-size: 100% auto;
}

body:has(.featured-image)
{background-image: none;}

body:has(.featured-gallery)
{background-image: none;}


/* Buttons and Links */
a {
    color: var(--link);
    text-underline-offset: .2em;
}

button {
font-family: var(--h2-font);
font-size:1.3em;
background: var(--header);
color: var(--text);
    border: 2px ridge var(--gold);
    display: inline-block;
    border-radius: 5px;
    padding: 4px 16px;
    &:hover, &:focus {
        background-color: var(--bg);
    }
    a {
    text-decoration: none;
    color: var(--text);
    }
}

.back, .next {
position: fixed;
top: 16px;
}

.back {
left: 16px;
}

.next {
right: 16px;
}

/* Selection & Focus */
::selection {color: var(--selection); background: var(--bg)}
*:focus-visible {outline: 2px solid var(--link)}
a:has(img):focus-visible {
    outline: none;
    img {
        outline-offset: 10px;
        outline: 2px solid var(--link);
    }
}


/* Main Layout */
header {
    max-width: 100vw;
    box-sizing:border-box;
    margin: 0;
    text-align: center;
    background: var(--header-trans);
    box-sizing: border-box;
    border-bottom: 5px double var(--gold);
    h1 {
    font-family: var(--h1-font);
    font-size: 5em;
    color: var(--text);
    text-shadow: 2px 2px 1px var(--text-shadow);
    margin: 0px 8px 16px 8px;
    }
    h1::after { content: url(images/R.svg); }
    h1::before { content: url(images/L.svg); }
}

/* Needs fixing! */
header h1:has(not:('Brother Signature')) {
.h2-hide {display: none}
}


h2 {font-family: var(--h2-font);
    font-size:1.5em
}

h2 a {color: var(--text);}

main {
    max-width: 100vw;
    box-sizing: border-box;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    background-color: var(--bg);
}

.sidebar {
    background: var(--text-area);
    max-width: 230px;
    min-width: 215px;
    height: 100%;
    padding: 32px;
    display: block;
    box-sizing: border-box;
    float: left;
    margin-right: 0px;
    border-right: 5px double var(--gold);
    h2 {
        font-size: 1.3em}
    img {width:100%; border: 8px ridge var(--gold);}
}

.image-gallery, .featured-gallery, .about {
    text-align: center;

    box-sizing: border-box;
    flex-grow: 1;
    padding: 16px;
    margin: 0;
}

.image-gallery, .featured-gallery {
    list-style: none;
    li {display: inline-block; margin: 0;
    img {
    border: 4px ridge var(--gold);
    margin: 16px;
    box-shadow: 2px 2px 3px var(--shadow);
    outline: 2px solid transparent;
    outline-offset: 10px;
    transition: .3s;
    transform: scale(.9);
        &:hover {transform: scale(1)}
    }
    a:focus img {transform: scale(1);}}
}

.image-gallery {
    overflow: auto;
    img {
    max-height: 150px;
    }
}

footer {    
    width: 100%;
    font-family: var(--h2-font);
    font-size: 1.1em;
    background: var(--header-trans);
    border-top: 5px double var(--gold);
    text-align: center;
    padding: 0;
    box-sizing: border-box;
        p {margin:  1em;}
        span {
        background: light-dark(var(--bg), var(--header));
        padding: .3em .4em;
        margin: 0;
        border-radius: .2em;
        }
        a {color: var(--text);}
    }

/* keeping the footer at the end of the page */
body:has(footer):not(:has(.sidebar)) {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    gap: 0;
}


/* Details and Toggles */
summary {
    color: var(--text);
    cursor: pointer;
    font-weight: bold;
    padding: 0em;
        &:hover, &:focus {
        color: var(--link);
        background: none;
        }
}

summary h2{
display:inline-block;
}

details {
    border: 0px solid transparent;
    &[open] {
        border-color: var(--link)
    }
    section {
        padding: 0;
    }
}


/* Lists */
li {margin: .5em 0;}

/* Horizontal Rule (for dividing text sections) */
hr {
    border-color: var(--gold);
    margin: 1.2em auto;
}


/* Filters Styles */
label {
    margin: .3em auto;
    display: inline-block;
    cursor: pointer;
    outline-offset: .2em;
    & input:focus {
        outline: none;
    }
    &:has(input:focus-visible) {
        outline: 2px solid var(--link);
    }
}

fieldset {
    border: none;
    padding: 0;
    margin: .5em 0;
    legend {font-weight: bold}
}

/* Individual Art Pages */
.subpage {
top: 10vh;
position: fixed;
height: 90vh;
margin: auto;
padding: 10vh;
width:100vw;
align-items: center;
display: flex;
flex-direction: row;
justify-content: space-around;

}

.featured-image, .featured-gallery {
    height: fit-content;
    flex-grow: 1;
    margin-right: 2.5vw;
    align-items: center;
    justify-content: right;

    

    .column {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
}

.featured-gallery {
    img {
    max-height: 100px;
    }
    img:only-child {margin: 8px}
}


.featured-image {

    img {
        max-width: 50vw;
        max-height:70vh;
        box-shadow: 2px 2px 3px var(--shadow);
        
        border:8px ridge var(--gold);
    }
    img:only-child {margin: 20px 0}
    }
.description {
    max-height: 90%;
    min-height: fit-content;
    flex-grow: 1;
    width: fit-content;
    margin-left: 2.5vw;
}

.about-box {
margin: 3vw;
text-align: left;
img {
    float:left; 
    margin-right: 20px; 
    margin-bottom: 10px;
    width: 33%;
    max-width:300px; 
    padding: 0px;
    border: 8px ridge var(--gold);
}
}

.description, .about-box {
    background: var(--text-area);
    box-shadow: 2px 2px 3px var(--shadow);
    padding: 10px 20px;
    box-sizing: border-box;
    overflow-y:scroll;
    border: 4px ridge var(--gold);
    border-radius: 5px;
    h1 { font-family: var(--h2-font);
        font-size:2em;
        text-decoration: underline;
        text-decoration-color: var(--gold);
    }
}

/* Lightbox
 https://www.geeksforgeeks.org/html/how-to-create-popup-box-using-html-and-css/ */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: auto;
    z-index: 2;
    img {
        max-width: 90vw;
        max-height: 90vh;
    }
    &:target {
        display: flex;
    }
}
.small {
    img {
    max-width: 60vw;
    max-height: 60vh;}
}

body:has(.lightbox:target) {
    overflow: hidden;
} /* disables underlying scrollbar when lightbox is open */

iframe {
width: 100%;
box-sizing: border-box;
height: 350px;
border: var(--text-area);
}

.divider {
width: 100%;
box-sizing: border-box;
text-align: center;
align-content: center;
img {width: 80%};
}

/* Blog Filter */
body:has(#traditional:checked) .image-gallery a:not(.traditional),
body:has(#mix:checked) .image-gallery a:not(.mix),
body:has(#water:checked) .image-gallery a:not(.water),
body:has(#ink:checked) .image-gallery a:not(.ink),
body:has(#emb:checked) .image-gallery a:not(.emb),
body:has(#burn:checked) .image-gallery a:not(.burn),
body:has(#whit:checked) .image-gallery a:not(.whit),
body:has(#crayon:checked) .image-gallery a:not(.crayon),

body:has(#digital:checked) .image-gallery a:not(.digital),
body:has(#pixel:checked) .image-gallery a:not(.pixel)
{display: none;}

/* Mobile Responsiveness */
@media (width < 916px) {
    header {
        h1::after { content: none; }
        h1::before { content: none; }
    }
}

@media (width < 875px) {
    main {
        height: fit-content;
        overflow: show;
    }
    .subpage {
        position:relative;
        height: fit-content;
        height: fit-content;
        top:15vh;
        margin: 0;
        padding: 16px;
        width:100vw;
        overflow: scroll;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
}

@media only screen and (width < 700px) {
    header {
        overflow: auto;
        padding-right: 12px;
        padding-top: 8px;
        h1 {
        font-size: 3em;
        }
        
    }

    main {
        flex-direction: column-reverse;
    }

    .sidebar {
        width: 100%;
        max-width: 100%;
        padding: 8px 32px 6px 32px;
        height: auto;
        float: none;
        border-right: 0px solid black;
        border-top: 5px double var(--gold);
        text-align: center;
        details {width:fit-content; text-align:left; margin: 0 auto;}
        img {width:70%; max-width: 250px; min-width: 200px;}
    }

    .image-gallery {
        width: 100%;
        text-align: center;
    }

    .image-gallery 
    li {img {
        max-height: 100px;
        margin: 0px;
        border: 4px ridge var(--gold);
    margin: 8px;
    }}

    .featured-image {
        img {
            max-width: 100%;
            box-sizing: border-box;
        }
    img:only-child {margin: 20px 0}
    }

    .description, .about-box {
        max-height: fit-content;
        width: 100%;
        box-shadow: 2px 2px 3px var(--shadow);
        box-sizing: border-box;
        h1 {
         font-size:1.5em;
        }
    }

    .description {
        margin: 0 4px 0 0;
    }

    .about-box {
        margin: 0 0 16px 0;
        img {
            width: 90%;
            height: auto;
            box-sizing: border-box;
        }
    }

    .lightbox {
    img {
        max-width: 100vw;
        max-height: 100vh;
    }
}
.small {
    img {
    max-width: 100vw;
    max-height: 100vh;}
}

    .iframe {margin: 0 -20px; padding: 0 -20px; width:100%; box-sizing:content-box}

body {
    background-size: 200% auto;
    background-repeat: no-repeat;
    background-position: left top;
    
}
}