:root {
    --main-text: #0b0b0b;
    --main-bg: #fefefe;
    --sub-text: #7d7d7d;
    --sub-bg: #f0f0f0;
    --h1-size: 32px;
    --h2-size: 24px;
    --body-size: 18px;
    --main-hover: #7d1e3f;
}
@media (prefers-color-scheme: dark) {
    :root {
        --main-text: #cdcdcd;
        --main-bg: #000000;
        --sub-text: #a0a0a0;
        --sub-bg: #1a1a1a;
    }
}
@media screen and (max-width:480px) {
    :root {
        --h1-size: 26px;
        --h2-size: 20px;
        --body-size: 16px;
    }
}

body {
    color: var(--main-text);
    background-color: var(--main-bg);
    line-height: 1.8em;
    font-size: var(--body-size);
    max-width: 800px;
    margin: 2em auto;
    padding: 0 1em;
    font-family: Arial, Helvetica, sans-serif;
    transition: .5s;
}

h1 {
    color: var(--main-text);
    line-height: 1.3em;
    font-size: var(--h1-size);
}

h2 {
    color: var(--main-text);
    line-height: 1.3em;
    font-size: var(--h2-size);
}

p {
    padding-left: 0.5em;
    max-width: 720px;
}

ul {
    color: var(--main-text);
    padding-left: 2em;
}

li {
    list-style-type: none;
    line-height: 1.8em;
    color: var(--main-text);
    position: relative;
}

li:before {
    opacity: 70%;
    content: "-";
    font-weight: normal;
    font-size: 1.8em;
    vertical-align: middle;
    position: absolute;
    left: -0.5em;
}

a,a:link,a:visited {
    color: var(--main-text);
    font-weight: bold;
    margin-right: 0.1em;
    margin-left: 0.1em;
}

a:hover,a:active {
    color: var(--main-hover);
    font-weight: bold;
}

img {
    max-width: 100%;
    max-height: 30vh;
}

figcaption {
    font-size: 0.7em;
    color: var(--main-text);
    text-align: left;
}

code {
    display: inline-block;
    color: #c9d1d9;
    line-height: 1em;
    padding-left: 0.3em;
    padding-right: 0.3em;
    border-radius: 3px;
    background-color: #0d1117;
}

pre > code {
    width: 95%;
    padding: 1em;
    border-radius: 5px;
    background: #0d1117;
    color: #c9d1d9;
    overflow: scroll;
    white-space: pre-wrap;
}

.talking {
    height: 12vh;
    width: 100vw;
    white-space: nowrap;
}

.talking a {
    text-decoration: none;
}

.bold {
    font-weight: bold;
}

.talking a img {
    vertical-align: top;
    height: 100%;
    width: auto;
    object-fit: cover;
    aspect-ratio: attr(width) / attr(height);
}

.talking textarea {
    vertical-align: top;
    background-color: var(--main-bg);
    font-size: var(--text-size);
    color: var(--main-text);
    resize: none;
    height: 100%;
    width: 50%;
    border: none;
    outline: none;
    text-align: left;
    font-weight: bold;
    transition: .5s;
}

h2 a,h2 a:hover,h2 a:active {
    color: var(--main-text);
    font-weight: bold;
    text-decoration: none;
}

.nodecoration {
    text-decoration: none;
}

.handlename {
    color: var(--main-bg);
    font-weight: bold;
    display: inline-block;
}

.handlename:hover::before {
    color: var(--sub-text);
    content: "Yuto Takahashi";
    font-weight: bold;
}

.fade-anime-container {
    display: inline-flex;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.fade-anime-text-old {
    opacity: 0;
    position: relative;
}

.fade-anime-text-new {
    opacity: 1;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
}

@supports (animation: name) {
    .fade-anime-text-old {
        opacity: 1;
        animation: fade-anime-hide-text 1.2s forwards;
    }

    .fade-anime-text-new {
        opacity: 0;
        animation: fade-anime-show-text 1.2s forwards;
    }

    .fade-anime-mask {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: var(--main-text);
        transform: translateY(100%);
        animation: fade-anime-mask-slide 1.2s forwards;
    }

    @keyframes fade-anime-mask-slide {
        0% { transform: translateY(105%); }
        50% { transform: translateY(0%); }
        100% { transform: translateY(-105%); }
    }

    @keyframes fade-anime-hide-text {
        50% { opacity: 1; }
        51%, 100% { opacity: 0; }
    }

    @keyframes fade-anime-show-text {
        49% { opacity: 0; }
        50%, 100% { opacity: 1; }
    }
}

@media (prefers-reduced-motion: reduce) {
    .fade-anime-text-old {
        opacity: 0 !important;
    }
    .fade-anime-text-new {
        opacity: 1 !important;
    }
    .fade-anime-mask {
        display: none !important;
    }
}