@import url('https://fonts.googleapis.com/css?family=PT+Sans');

:root {
    --main-color-pale: rgba(193, 0, 0, 0.75);
    --main-color-blood: rgba(193, 0, 0, 0.91);
    --color-silver: #828282;
    --color-article-meta: var(--color-silver);
    --color-article-meta-link: var(--color-silver);
    --article-code-background: #ffdddf;
    --transition: all 0.2s cubic-bezier(0.47, 0, 0.75, 0.72) 0s;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    position: relative;
    font-family: "Pt Sans", sans-serif;
    outline: none;
}

*:before,
*:after {
    box-sizing: border-box;
}

/* конец нормализации стилей*/

@view-transition {
    navigation: auto;
}

html {
    overflow: hidden;
    scroll-behavior: smooth;
}

body {
    background-color: var(--main-color-blood);
    text-rendering: optimizeLegibility;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    -moz-osx-font-smoothing: grayscale;
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
}

body.post-showed {
    overflow: hidden;
}

.slide {
    overflow-x: hidden;
    width: 100vw;
    height: 100dvh;
    max-width: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    scroll-snap-align: start;
    color: white;
}

.slide:nth-of-type(n + 2) {
    padding: 5vh 5vw;
}

[id^=section] {
    margin-bottom: 100%;
}

::selection {
    color: rgba(193, 0, 0, 0.99);
    background-color: rgba(255, 255, 255, 0.99);
}

.slide:nth-of-type(2n + 1) * {
    /* background-color: white; */
    color: white;
}

.slide:nth-of-type(2n) {
    background-color: white;
    color: #222;
}

.slide:nth-of-type(2n) *::selection {
    color: rgba(255, 255, 255, 0.99);
    background-color: rgba(193, 0, 0, 0.99);
}

.to-top.hidden {
    display: none;
}

.slide-content {
    width: 100%;
}

.slide .slide-header {
    font-family: Bebas Neue, sans-serif;
    font-weight: 400;
}

#inoyakaigor {
    font-family: plumblightclight, sans-serif;
    color: white;
    font-weight: 500;
    text-shadow: 0 1px 0 #000000, -1px 2px 0 #000000, -2px 3px 0 #000000, -3px 4px 0 #000000, -4px 5px 0 #000000, -5px 6px 0 #000000, -6px 7px 0 #000000;
    transform: skewX(10deg);
    font-size: 3.5rem;
    display: block;
    width: 100%;
    text-align: center;
    letter-spacing: -0.25rem;
    margin-top: 2rem;
}

.menu-wrapper {
    display: flex;
    align-items: center;
    margin-bottom: 7rem;
}

.menu {
    display: flex;
    flex-wrap: wrap;
    margin: 0 auto;
    align-content: stretch;
    align-items: stretch;
    justify-content: space-between;
    width: 90%;
}

.menu a {
    text-decoration: none;
    font-family: Bebas Neue;
    display: inline-block;
    line-height: 1.5;
    font-size: 2.5rem;
    font-weight: 300;
    width: 100%;
    text-align: right;
    color: white;
}

.posts {
    display: flex;
    flex-direction: column;
    /* flex-wrap: wrap; */
    justify-content: space-between;
    align-items: stretch;
    width: 100%;
    height: 100%;
}

.post {
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
    width: 100%;
    line-height: 1.3;
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    text-decoration: none;
}

.post h3 {
    display: flex;
}

.post h3 span {
    font-family: Bebas Neue, sans-serif;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    hyphens: auto;
    color: #222;
}

.post h3 .number {
    font-family: Bebas Neue;
    color: rgb(68, 68, 68);
    font-weight: 300;
    font-size: 4rem;
    float: left;
    line-height: 1.1;
    margin-right: 1rem;
}

.post h3 .number .number-sign {
    font-family: inherit;
    font-size: 0.8em;
}

.slide1 {
    justify-content: space-between;
}

.slide2 {
    flex-direction: row;
    flex-wrap: wrap;
    align-content: space-between;
}

.slide2 .slide-content {
    display: none;
}

.slide2 .slide-header {
    margin-bottom: 1rem;
}

a.social-network {
    text-decoration: none;
    color: #222;
}

a.social-network:hover {
    text-decoration: underline;
}

.projects {
    margin-left: 20px;
}

.projects ::marker {
    font-size: 11px;
}

.project {
    font-weight: 300;
    letter-spacing: 0.6px;
    font-family: 'Bebas Neue';
    text-decoration: none;
}

.project:hover {
    border-bottom: 1px dotted white;
}

@media screen and (min-width: 768px) {
    .posts {
        flex-direction: row;
        align-items: stretch;
        flex-wrap: wrap;
    }

    .post {
        width: 45%;
    }
}

@media screen and (min-width: 1024px) {
    .to-top {
        position: fixed;
        z-index: 1;
        bottom: 3rem;
        right: 1rem;
        background-color: rgba(193, 0, 0, 0.75);
        color: white;
        padding: 0.5rem 1.6rem;
        text-decoration: none;
        text-transform: uppercase;
    }

    .slide:nth-of-type(n + 2) {
        padding: 0;
    }

    .slide-content {
        padding-left: 4.3rem;
    }

    .slide .slide-header {
        font-size: 3.5em;
        padding-top: 2rem;
        margin-left: -0.2rem;
    }

    #inoyakaigor {
        font-size: 80px;
        letter-spacing: normal;
    }

    .menu-wrapper {
        height: 80%;
        margin: initial;
    }

    .menu {
        width: 35vw;
    }

    .menu a {
        font-size: 3em;
        line-height: 1.4;
        letter-spacing: 1.3px;
        width: 50%;
        text-align: left;
    }

    .menu a:nth-child(even) {
        text-align: right;
    }

    .posts {
        flex-wrap: wrap;
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
        flex-wrap: nowrap;
        padding-left: 4rem;
        height: initial;
    }

    .post {
        outline: medium none #fff;
        height: 160px;
        outline-offset: 5px;
        padding: 0.5rem;
        width: 240px;
        font-size: 1rem;
        border-width: 1px;
        border-style: solid;
        border-color: transparent;
        margin: 3px;
        overflow-y: hidden;
    }

    .post:first-of-type {
        display: none;
    }

    .post:hover {
        border-image: linear-gradient(45deg, #c10000 4%, white 4%, white 96%, #c10000 96%) 1 1 1 1;
    }

    .post h3 {
        font-size: 1.5rem;
        display: initial;
    }

    .post h3 .number {
        height: 3rem;
        font-size: 3.9rem;
        letter-spacing: -2px;
        margin-right: 0.7rem;
        line-height: 1.05;
    }

    .post:hover h3 .number,
    .post:hover h3 .number .number-sign {
        color: #c10000;
    }

    .post h3 .number .number-sign {
        font-size: 1em;
    }

    .slide1 {
        justify-content: initial;
    }


    .slide2 .slide-content {
        display: initial;
    }

    .slide2 .slide-header {
        margin-bottom: 2rem;
    }

    .single-post {
        background-color: #c10000;
        bottom: 2.5%;
        color: white;
        height: 3px;
        left: 2.5%;
        opacity: 0;
        position: fixed;
        transform: rotateZ(-50deg);
        transition-duration: 0.5s;
        width: 30%;
    }

    .popup-post {
        position: fixed;
        z-index: 10;
        background: white;
        transform: perspective(1000px) rotateX(-10deg) scale(0.9);
        transform-origin: 50% 0%;
        transform-style: preserve-3d;
        opacity: 0;
        transition: ease-in-out 0.5s;
        top: 10vh;
        left: 0vw;
        width: 100vw;
        min-height: 100vh;
        padding: 1.5vh 1vw;
        pointer-events: none;
        will-change: perspective, rotateX, scale;
        box-shadow: 0 0 20px silver;
    }

    .popup-post.is-showed {
        top: 0vh;
        opacity: 1;
        transform: perspective(10000000px) rotateX(0deg) scale(1);
        pointer-events: initial;
    }

    .close {
        position: absolute;
        top: 0;
        right: 0;
        background-color: var(--main-color-blood);
        width: 36px;
        height: 36px;
        border: none;
        cursor: pointer;
    }

    .fullpost {
        width: 70vw;
    }

    .fullpost .text {
        margin-top: 1em;
    }

    .slide .fullpost p:not([class]) {
        font-family: "PT Sans", sans-serif;
        font-size: 1.1rem;
    }

    .tags {
        margin-top: 1em;
    }

    .fullpost .tags a {
        color: var(--color-article-meta-link);
        font-family: monospace;
    }

    .projects ::marker {
        font-size: initial;
    }

    .project {
        font-size: 1.7rem;
    }

    .social-network.other > div {
        color: #888;
    }
}
