/*Max Ehrengruber*/

/*------------------------------------*\
  Fonts
\*------------------------------------*/

@supports (font-variation-settings: normal) {
    @font-face {
        font-family: "Social";
        src:
            url("./fonts/ABCSocialPlusVariableEdu.woff2") format("woff2"),
            url("./fonts/ABCSocialPlusVariableEdu.woff") format("woff");
        font-display: swap;
    }

    @font-face {
        font-family: "Diatype Mono";
        src:
            url("./fonts/ABCDiatypeMonoVariableEdu.woff2") format("woff2"),
            url("./fonts/ABCDiatypeMonoVariableEdu.woff") format("woff");
        font-display: swap;
    }
}

@supports not (font-variation-settings: normal) {
    /* Social */
    @font-face {
        font-family: "Social";
        src:
            url("./fonts/ABCSocialExtendedEdu-Book.woff2") format("woff2"),
            url("./fonts/ABCSocialExtendedEdu-Book.woff") format("woff");
        font-weight: 400;
        font-style: normal;
        font-display: swap;
    }
    @font-face {
        font-family: "Social";
        src:
            url("./fonts/ABCSocialExtendedEdu-BookItalic.woff2") format("woff2"),
            url("./fonts/ABCSocialExtendedEdu-BookItalic.woff") format("woff");
        font-weight: 400;
        font-style: italic;
        font-display: swap;
    }
    @font-face {
        font-family: "Social";
        src:
            url("./fonts/ABCSocialExtendedEdu-Bold.woff2") format("woff2"),
            url("./fonts/ABCSocialExtendedEdu-Bold.woff") format("woff");
        font-weight: 700;
        font-style: normal;
        font-display: swap;
    }
    @font-face {
        font-family: "Social";
        src:
            url("./fonts/ABCSocialExtendedEdu-BoldItalic.woff2") format("woff2"),
            url("./fonts/ABCSocialExtendedEdu-BoldItalic.woff") format("woff");
        font-weight: 700;
        font-style: italic;
        font-display: swap;
    }

    /* Diatype Mono */
    @font-face {
        font-family: "Diatype Mono";
        src:
            url("./fonts/ABCDiatypeMonoEdu-Light.woff2") format("woff2"),
            url("./fonts/ABCDiatypeMonoEdu-Light.woff") format("woff");
        font-weight: 300;
        font-style: normal;
        font-display: swap;
    }
    @font-face {
        font-family: "Diatype Mono";
        src:
            url("./fonts/ABCDiatypeMonoEdu-LightItalic.woff2") format("woff2"),
            url("./fonts/ABCDiatypeMonoEdu-LightItalic.woff") format("woff");
        font-weight: 300;
        font-style: italic;
        font-display: swap;
    }
    @font-face {
        font-family: "Diatype Mono";
        src:
            url("./fonts/ABCDiatypeMonoEdu-Regular.woff2") format("woff2"),
            url("./fonts/ABCDiatypeMonoEdu-Regular.woff") format("woff");
        font-weight: 400;
        font-style: normal;
        font-display: swap;
    }
    @font-face {
        font-family: "Diatype Mono";
        src:
            url("./fonts/ABCDiatypeMonoEdu-RegularItalic.woff2") format("woff2"),
            url("./fonts/ABCDiatypeMonoEdu-RegularItalic.woff") format("woff");
        font-weight: 400;
        font-style: italic;
        font-display: swap;
    }
}

/*------------------------------------*\
  Body & Typography
\*------------------------------------*/

body {
    color: #222;
    background: #fff;
    font-family: "Social", Helvetica, sans-serif;
    font-variation-settings:
        "wght" 600,
        "wdth" 5;
    font-feature-settings: "calt", "liga", "rlig", "rvrn", "kern", "rclt";
    line-height: 1.5;
    margin: 0em 4em 1em;
}

body i,
em,
.italic {
    font-variation-settings:
        "wght" 600,
        "wdth" 5,
        "ital" 9;
    font-style: normal;
}

h1,
h2,
h3 {
    font-family: "Social", Helvetica, sans-serif;
    line-height: 1.2;
}

h1 {
    font-variation-settings:
        "wght" 700,
        "wdth" 7;
    font-size: 24px;
    letter-spacing: 0.2px;
    line-height: 1;
    margin: 1.5em 0 1.5em 0;
}

h2 {
    font-variation-settings:
        "wght" 700,
        "wdth" 7;
    font-size: 20px;
    margin: 1em 0 1em 0;
}

h4,
figcaption {
    font-family: "Diatype Mono", Mono, "Roboto Mono", monospace;
    font-size: 13px;
    font-weight: normal;
    color: grey;
    letter-spacing: 0;
    margin-top: 0;
}

h4 {
    font-variation-settings:
        "wght" 300,
        "ital" 0;
}
h4 i,
.italic {
    font-variation-settings:
        "wght" 300,
        "ital" 9;
    font-style: normal;
}

p {
    margin: 0 0 1em;
    max-width: 32em;
    font-size: 20px;
    line-height: 26px;
}

p a {
    color: #222;
}

a {
    color: grey;
    text-decoration: none;
    transition: all 0.2s ease-in;
}

a:hover {
    color: #222;
    text-decoration: line-through;
}

.mail {
    /*
  font-family: Mono, 'Roboto Mono', monospace;
  font-variation-settings: 'wght' 300;
  font-size: 18px;
*/
    color: #222;
}

hr {
    border-top: 0;
    border-bottom: 1px solid #222;
    margin-top: 2em;
    margin-bottom: 2em;
}

/*------------------------------------*\
  Images & Figures
\*------------------------------------*/

img {
    max-width: 100%;
    box-shadow: var(--shadow-elevation-low);
}

figcaption {
    font-variation-settings:
        "wght" 300,
        "wdth" 5;
    line-height: 1.2;
    margin: 2em 0 2em;
}

figcaption strong {
    font-family: "Social", Helvetica, sans-serif;
    font-variation-settings:
        "wght" 600,
        "wdth" 5;
    font-size: 16px;
    letter-spacing: 0.2px;
    color: black;
}

figcaption i {
    font-family: "Social", Helvetica, sans-serif;
    font-variation-settings:
        "wght" 600,
        "wdth" 5,
        "ital" 9;
    font-style: normal;
}

figcaption strong::after {
    content: "";
    display: block; /* line break after strong */
    margin-bottom: 0em;
}

/*------------------------------------*\
  Grid Layout
\*------------------------------------*/

.grid {
    max-width: 60em;
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    grid-auto-rows: minmax(2em, auto);
    grid-gap: 2em;
}

.full-width {
    grid-column: 1 / -1;
}
.center {
    grid-column: 2 / -2;
}
.left-large {
    grid-column: 1 / -3;
}
.right-large {
    grid-column: 3 / -1;
}
.left-small {
    grid-column: 1 / -5;
}
.right-small {
    grid-column: 5 / -1;
}

.grid figure {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 0; /* removes default browser margins */
}

.grid figure img {
    width: 100%;
    height: auto;
    display: block;
}

.grid figure figcaption {
    width: 100%;
}

/*------------------------------------*\
  Navigation
\*------------------------------------*/

.header {
    background-color: #fff;
    position: fixed;
    width: 100%;
    z-index: 3;
    margin-bottom: 1em;
}

.navbar {
    align-items: center;
    background-color: #fff;
}

.sticky {
    position: sticky;
    top: 0;
    z-index: 1;
}

.header ul {
    margin: 0;
    padding: 0;
    list-style: none;
    overflow: hidden;
    border-top: 1px solid #222;
    border-bottom: 1px solid #222;
}

.header li a {
    display: block;
    padding: 2em 2em 2em 0;
    text-decoration: none;
}
.header .logo {
    float: left;
    text-decoration: none;
    color: #222;
}

/* Menu */
.menu,
.header .menu {
    font-family: "Diatype Mono", Mono, monospace;
    font-size: 13px;
    font-variation-settings:
        "wght" 300,
        "ital" 0;
    clear: both;
    max-height: 0;
    transition: max-height 0.2s ease-out;
}

.header .menu a {
    color: #222;
}
.header .menu a:hover,
.header .menu .active a {
    text-decoration: line-through;
}

.header .menu-icon {
    cursor: pointer;
    display: inline-block;
    float: right;
    padding: 40px 20px 24px 20px;
    position: relative;
    user-select: none;
}

.header .menu-icon .navicon {
    background: #333;
    display: block;
    height: 2px;
    position: relative;
    transition: background 0.2s ease-out;
    width: 18px;
}
.header .menu-icon .navicon:before,
.header .menu-icon .navicon:after {
    content: "";
    display: block;
    height: 100%;
    width: 100%;
    position: absolute;
    background: #333;
    transition: all 0.2s ease-out;
}
.header .menu-icon .navicon:before {
    top: 5px;
}
.header .menu-icon .navicon:after {
    top: -5px;
}

.header .menu-btn {
    display: none;
}
.header .menu-btn:checked ~ .menu {
    max-height: 400px;
}
.header .menu-btn:checked ~ .menu-icon .navicon {
    background: transparent;
}
.header .menu-btn:checked ~ .menu-icon .navicon:before {
    transform: rotate(-45deg);
}
.header .menu-btn:checked ~ .menu-icon .navicon:after {
    transform: rotate(45deg);
}
.header .menu-btn:checked ~ .menu-icon:not(.steps) .navicon:before,
.header .menu-btn:checked ~ .menu-icon:not(.steps) .navicon:after {
    top: 0;
}

/*responsive*/

@media only screen and (min-width: 769px) {
    .header li {
        float: left;
    }
    .header li a {
        padding: 1em 2em;
    }
    .header .menu {
        max-height: none;
    }
    .header .menu-icon {
        display: none;
    }
}

@media only screen and (max-width: 768px) {
    body {
        margin-left: 1em;
        margin-right: 1em;
    }

    h1 {
        font-size: 20px;
    }

    h2,
    h3 {
        font-size: 100%;
    }

    .navbar {
        margin-bottom: 1em;
    }

    .full-width {
        grid-column: 1 / -1;
    }

    .center {
        grid-column: 1 / -1;
    }

    .left-large {
        grid-column: 1 / -1;
    }

    .right-large {
        grid-column: 1 / -1;
    }

    .left-small {
        grid-column: 1 / -1;
    }

    .right-small {
        grid-column: 1 / -1;
    }
}
