/* noto serif, serif typeface*/
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif&display=swap');
/* roboto, sans serif typeface*/
@import url('https://fonts.googleapis.com/css2?family=Roboto&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* light mode palette */
    --grey: #f8f8f8;
    /*#0d2518*/
    --dark-green: #1f3832;
    --red: #c25c5f;
    /* TODO: decide if visited links need another color */
    --dark-red: #c25c5f;
    /* dark mode palette */
    --dm-grey: #c8b9b9;
    --dm-dark-green: #12231e;
    --dm-darker-green: #0d1912;

    --color-primary: var(--dark-green);
    --color-secondary: var(--grey);
    --color-accent: var(--red);
    --color-accent-dark: var(--dark-red);
    --color-button: var(--red);
    --color-portrait-background: var(--dark-green);
    --color-footer-bg: var(--color-primary);
    --color-footer-text: var(--color-secondary);
    --color-color-mode-icon: var(--dark-green);

    & body[data-color-scheme=""],
    & body[data-color-scheme="light"] {
        --color-primary: var(--dark-green);
        --color-secondary: var(--grey);
        --color-portrait-background: var(--dark-green);
        --color-footer-bg: var(--color-primary);
        --color-footer-text: var(--color-secondary);
        --color-color-mode-icon: var(--dark-green);
    }

    & body[data-color-scheme="dark"] {
        --color-primary: var(--dm-grey);
        --color-secondary: var(--dm-dark-green);
        --color-portrait-background: var(--dm-grey);
        --color-footer-bg: var(--dm-darker-green);
        --color-footer-text: var(--color-primary);
        --color-color-mode-icon: var(--dm-grey);
    }

    /*2.986rem*/
    --font-size-h1: 2.906rem;
    /*2.328*/
    --font-size-h2: 2.128rem;
    --font-size-h3: 2.074rem;
    /*
    --font-size-h4: 1.728rem;
    --font-size-h5: 1.44rem;
    --font-size-h6: 1.2rem;
    */
    --font-size-a: 1rem;
    --font-size-button: 1.2rem;

    /*1rem*/
    --font-size-p: 1.44rem;
    /*0.833rem*/
    --font-size-small: 0.833rem;
    /*0.694rem*/
    --font-size-very-small: 0.694rem;

}

body {
    background-color: var(--color-secondary);
    color: var(--color-primary);
    margin-inline: auto;
    width: fit-content;
    height: 100vh;
    display: flex;
    flex-direction: column;
    transition: color .1s ease-in-out, background-color .1s ease-in-out;
}

h1 {
    font-size: var(--font-size-h1);
}

h2 {
    font-size: var(--font-size-h2);
    margin-bottom: 28px;
}

h3 {
    font-size: var(--font-size-h3);
}

p {
    font-size: var(--font-size-p);
}

a {
    font-size: var(--font-size-a);
}

button {
    font-size: var(--font-size-button);
    cursor: pointer;
}

.button_standard {
    padding: 8px 8px;
    background-color: var(--color-button);
    color: var(--color-secondary);
    border: none;
    border-radius: 5px;
}

.button_icon {
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    border: none;
    opacity: .5;
    transition: opacity .1s linear;
}

.button_icon:hover {
    opacity: 1;
}

small {
    font-size: var(--font-size-small);
}

h1,
h2,
h3,
a {
    font-family: "Noto Serif", serif;
    font-optical-sizing: auto;
    font-weight: 600;
    font-style: normal;
    font-variation-settings:
        "wdth" 100;
}

p,
span,
li {
    font-family: "Roboto", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    font-variation-settings:
        "wdth" 100;
}

a {
    color: var(--color-accent);
    font-weight: bold;
}

a:visited {
    color: var(--color-accent-dark);
}

section {
    flex: auto;
    /*margin-bottom was 50px previously*/
    margin-bottom: 36px;
}

section:first-of-type,
footer {
    /*flex: 1;*/
}

section,
main,
footer {
    padding-inline: 10px;
}

#hero {
    /* old value 20px */
    margin-top: 8px;
}

#page-loader {
    background-color: var(--color-accent);
    color: var(--color-secondary);
    position: absolute;
    inset: 0;
    align-content: center;
    z-index: 99999;
}

#page-loader p {
    text-align: center;
}

#page-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#page-controls-lang {}

#page-controls-lang>* {
    padding: 4px;
}

#color-mode-button {}

#color-mode-button-light,
#color-mode-button-dark {}

body[data-color-scheme="dark"] #color-mode-button-light {
    display: none;
}

body[data-color-scheme=""] #color-mode-button-dark,
body[data-color-scheme="light"] #color-mode-button-dark {
    display: none;
}

#hero>h1,
#hero>h2 {
    text-align: center;
}

#hero>h1 {
    text-shadow: 2px 3px 0 var(--color-secondary);
    transition: text-shadow .4s ease-in-out 1s;
}

#hero-btn {
    width: fit-content;
    align-self: center;
}


main {
    flex: auto;
}

footer {
    background-color: var(--color-footer-bg);
    color: var(--color-footer-text);
}

#footer-top {
    padding-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#footer-top>div {
    display: flex;
    align-items: baseline;
    gap: 14px;
}

#footer-top>div>div>a {
    padding: 4px;
}

#footer-top>button {
    height: fit-content;
}

footer>p {
    text-align: center;
    font-size: var(--font-size-small);
}

#back-to-top-button {
    width: 40px;
    height: 40px;
}


body[data-color-scheme="dark"] {
    & .project__card::after {
        background-image: url("data:image/svg+xml,<svg id='patternId' width='100%' height='100%' xmlns='http://www.w3.org/2000/svg'><defs><pattern id='a' patternUnits='userSpaceOnUse' width='10' height='10' patternTransform='scale(1.8) rotate(0)'><rect x='0' y='0' width='100%' height='100%' fill='%2311221800'/><path d='M 10,-2.55e-7 V 20 Z M -1.1677362e-8,10 H 20 Z'  stroke-width='0.5' stroke='%23c2c2c2ff' fill='none'/></pattern></defs><rect width='800%' height='800%' transform='translate(0,0)' fill='url(%23a)'/></svg>");

    }
}

@media screen and (width >=500px) {

    #hero,
    main {
        max-width: 800px;
        justify-self: center;
    }

    #hero>h1,
    #hero>h2 {
        text-align: left;
    }

    #about__body {
        /*rethink this flex direction*/
        /*flex-direction: row;*/
    }

    #about__body>* {
        flex: 1;
    }

    footer {
        border-radius: 20px 20px 0px 0px;
    }
}

@media screen and (width>=700px) {
    section {
        margin-bottom: 40px;
    }

    #about-flex-temp {
        display: flex;
        flex-direction: row-reverse;
        gap: 3rem;
    }

    #about-image-wrapper {

        flex: none;
    }
}

@media screen and (width >=1200px) {
    body {
        max-width: 1200px;
    }


}