@font-face {
    font-family: 'HanSans';
    src: url('./fonts/SourceHanSansJP-Heavy.otf') format('opentype');
}
@font-face {
    font-family: 'HanSansLight';
    src: url('./fonts/SourceHanSansJP-Light.otf') format('opentype');
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    display: none;
    font-family: 'sans serif';
}
#btn-home-btn {
    display: none;
}
button {
    border: none;
    background-color: #00000000;
}
a {
    text-decoration: none;
    color: rgb(0, 0, 0);
}
header {
    flex-direction: column;
    align-items: center;
}
header a {
    text-align: center;
    font-family: 'Roboto';
    font-weight: bold;
    text-shadow: 0 0 10px #fff,0 0 2px #fff,0 0 2px #fff;
    transition: .4s;
}
header a:hover {
    color: #000;
    text-shadow: 0 0 10px #fff,0 0 2px #fff,0 0 30px #ffffff;
    transform: translateY(-3px);
}
nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}
#nav-works,
#btn-back {
    display: none;
    transition: .3s;
}
#nav-works {
    flex-direction: column;
    gap: 20px;
}
footer {
    bottom: 2%;
}
small {
    font-family: 'x14y24pxHeadUpDaisy';
    font-size: 10px;
}
.mail {
    display: none;
}
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    align-items: center; /* 垂直方向中央揃え */
    justify-content: center; /* 水平方向中央揃え */
}
.modal-content {
    margin: auto;
    display: block;
    max-width: 90%; /* 最大幅 */
    max-height: 87%; /* 最大高さ */
    width: auto; /* 自動幅 */
    height: auto; /* 自動高さ */
    z-index: 1002;
}
.prev,
.next,
.close {
    font-family: 'BIZ UDPゴシック';
    font-weight: bold;
}
.prev {
    left: 0;
}
.next {
    right: 0;
}

.main-item {
    display: none;
}
@media screen and (min-width: 768px) {
    .modal {
        background-color: rgba(0, 0, 0, 0);
    }
    .close,
    .prev,
    .next {
        font-size: 20px;
        z-index: 1001;
    }
    .close {
        position: absolute;
        display: flex;
        justify-content: center;
        color: #fff;
        bottom: 2vh;
        padding: 0 50px;
    }
    .close:hover,
    .close:focus {
        cursor: pointer;
        span {
            color: #fff;
        }
    }
    .prev,
    .next {
        cursor: pointer;
        position: absolute;
        width: auto;
        color: #fff;
        padding: 100vh 25% 5vh 25%;
        z-index: 0;
        background: linear-gradient(90deg, rgba(0, 0, 0, .8), rgba(0, 0, 0, .8));
    }

    .prev:hover {
        background: linear-gradient(90deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, .8));
    }

    .next:hover {
        background: linear-gradient(90deg, rgba(0, 0, 0, .8), rgba(0, 0, 0, .9));
    }
    .close:hover {
        color: rgba(255, 255, 255, 0.4);
    }
    .main-item {
        padding: 10vh 0 13vh 26vw;
        flex-direction: column;
    }
    canvas {
        position: fixed;
        top: 0;
        left: 0vw;
        width: 100%;
        height: 100%;
        max-width: 100vw;
        max-height: 100vh;
        z-index: 1;
    }
    footer {
        position: fixed;
        display: flex;
        bottom: 20px;
    }
    header {
        position: fixed;
        display: flex;
        height: 100%;
        width: 20vw;
        transition: background-image 1s ease;
        background-image: url('./img/home/home-back.jpg');
        background-position: left bottom;
        background-size: 100vw auto;
        height: 100vh;
        z-index: 1000;
        align-items: center;
    }
    header a {
        width: 100px;
        font-size: 20px;
        background-color: #ffffffd2;
        padding: 5px;
    }
    nav {
        height: 80%;
        width: 100%;
        padding-top: 40%;
        align-items: center;
    }
    #btn-open-head {
        display: none;
    }
    #btn-home {
        width: 70px;
        margin-bottom: 30px;
        background-color: #ffffff00;
        padding: 0;
    }
    .kinro-home {
        width: 70px;
        height: 70px;
        background-image: url(./img/home/kinro-box.png);
        background-size: cover;
        box-shadow: 0 0 15px #00000021;
    }
    .nav-sns a {
        font-size: 16px;
        margin: .5em;
    }
    body #btn-back {
        display: none;
    }
    #home {
        background-image: url('./img/home/home-back.jpg');
        background-size: cover;
        background-position: left bottom;
        height: 100vh;
    }
    #about p,
    .copy-mail {
        letter-spacing: .1em;
        font-size: 13px;
    }
    #about p {
        padding: 0em 3em;
        background: linear-gradient(90deg, #000, #929292 30%, #000);
        background: -webkit-linear-gradient(0deg,  #000, #929292 30%, #000);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }
    #about h1 {
        font-size: 23px;
        font-family: SanHansLight;
        letter-spacing: .5em;
        font-weight: normal;
        color: #000;
        text-shadow: 0 0 5px #c2c2c2;
    }
    #about h2 {
        letter-spacing: .88em;
        font-size: 12px;
        font-weight: normal;
        padding: 1em 0 3vh .05em;
    }
    #about h3 {
        padding: 3em 0 1vh 0; 
        font-size:16px;
        font-weight: normal;
        color: #000;
    }
    .cv-item {
        padding: .4vh 0;
    &::before {
    content: attr(date-is);
        color: #000;
        font-size: 13px;
        padding: .2em 2em;
    }}
    #news article {
        
        display: none;
        align-items: center;
        width: 85%;
        border: 1px solid;
        border-image: linear-gradient(to right, #000000, #3d3d3d) 1;
        flex-direction: column;
        gap: 30px;
    }
    #news article h1,
    #news article h2 {
        font-weight: 100;
    }
    #news article h1 {
        margin-top: 3em;
        font-size: 18px;
    }
    #news article h2 {
        margin-bottom: 3em;
        font-size: 12px;
    }
        #news article section {
        display: flex;
        align-items: center;
        flex-direction: column;
        gap: 30px;
    }

    #news article section .gal-img {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 40vw;
        height: 36vh;
    }
    #news article section .gal-img img {
        width: 40vw;
        height: 36vh;
        object-fit: cover;
        transition: all 0.3s ease;
    }
    #news article section h3,
    #news article section p {
        font-weight: 100;
        margin-bottom: 2em;
        font-size: 12px;
        width: 35vw;
        text-align: start;
    }
    #news article section p {
        margin-bottom: 7em;
    }
    .nav-digital {
        display: flex;
        flex-direction: column;
        gap: 0;
    }
    .nav-artwork {
        display: flex;
        flex-wrap: wrap;
        gap: 100px;
    }
    .nav-digital .gal-img {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 65vw;
        height: 17vh;
        gap: 30px;
        margin: 0;
    }
    .nav-digital .gal-img img {
        width: 65vw;
        height: 13vh;
        object-fit: cover;
        transition: all 0.3s ease;
    }
    .nav-digital .gal-img img:hover {
        width: 65vw;
        height: 17vh;
        cursor: pointer;
    }
    .gal-nav-item {
        width: 315px;
        height: 300px;
        display: flex;
        border-radius: 8%;
        overflow: hidden;
        justify-content: center;
        align-items: center;
    }
    .gal-nav-item img{
        width: 315px;
        height: 300px;
        border-radius: 8%;
        object-fit: cover;
        transition: all 0.5s ease;
    }
    .gal-nav-item img:hover {
        width: 290px;
        height: 280px;
        opacity: .7;
    }
    .gallery div{
        display: none;
        width: 80%;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
    .gallery div p,
    .gallery div h2,
    .gallery div h3,
    .gallery div h4 {
        width: 80%;
        text-align: start;
        color: #000;
        text-shadow: none;
        margin: 0;
        padding: 0 0 1em 0;
        letter-spacing: .1em;
        font-size: 12px;
        text-align: start;
        letter-spacing: .1em;
        font-weight: normal;
    }
    .gallery div h3{
        transform: translate(-8px,10px);
    }
    .gallery div p {
        padding-top: 1em;
        border-top: 1px solid #000000;
    }
    .gallery div .h4-span {
        height: 2em;
        vertical-align: middle;
        padding: 0 0 1em 0;
        display: flex;
        width: 80%;
    }
    .gallery div .h4-span .h4-right {
        text-align: end;
        font-size: 10px;
        padding-right: 1em;
    }
    iframe {
        width: 80%;
        height: 63vh;
        margin-bottom: 50px;
    }
    .gal-img {
        height: 100%;
        width: 100%;
        margin-bottom: 15vh;
        display: flex;
        justify-content: center;
        align-items: center;
        position: relative;
        cursor: pointer;
    }
    .gal-img img {
        object-fit: contain;
        width: 100%; /* コンテナの幅に合わせる */
        height: 100%; /* コンテナの高さに合わせる */
        max-height: 85vh;
        object-fit: contain; /* 画像をコンテナ内に収め、アスペクト比を維持する */
    }
    body.digital-penmanship-bg{  
        background-image: url('./img/works/DigitalPenmanship/KIBO.jpg');
        background-position: center right;
        background-repeat: no-repeat;
        background-size: 65vw auto;
    }
}

@media screen and (max-width: 768px) {
    
    #news article {
        display: none;
        align-items: center;
        width: 100%;
        border: 1px solid;
        border-image: linear-gradient(to right, #000000, #3d3d3d) 1;
        flex-direction: column;
    }
    #news article h1,
    #news article h2 {
        font-weight: 100;
    }
    #news article h1 {
        margin-top: 3em;
        font-size: 18px;
    }
    #news article h2 {
        margin-bottom: 3em;
        font-size: 12px;
    }
        #news article section {
        display: flex;
        align-items: center;
        flex-direction: column;
        gap: 30px;
    }

    #news article section .gal-img {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 60vw;
        height: 32vh;
    }
    #news article section .gal-img img {
        width: 60vw;
        height: 32vh;
        object-fit: cover;
        transition: all 0.3s ease;
    }
    #news article section h3,
    #news article section p {
        font-weight: 100;
        font-size: 12px;
        width: 55vw;
        text-align: start;
    }
    #news article section p {
        margin-bottom: 7em;
    }
    canvas {
        position: fixed;
        top: 0;
        right: 0px;
        width: 100%;
        height: 100%;
        max-width: 100vw;
        max-height: 100vh;
        z-index: 1;
    }
    #btn-open-head {
        position: fixed;
        display: flex;
        left: 50%;
        transform: translate(-50%, 100%);
        flex-direction: column;
        width: 23px;
        height: 32px;
        gap: 5px;
        z-index: 1000;
    }
    #btn-open-head span {
        width: 100%;
        height: 3px;
        background: #000000;
        transition: all .5s ease;
    }
    footer {
        padding-top: 20px;
        padding-bottom: 20px;
    }
    .kinro-home {
        height: 40px;
        width: 40px;
        background-image: url('./img/home/kinro-btn.png');
        background-size: cover;
        margin-bottom: 40px;
        cursor: pointer;
        animation: kurukuru 3s linear infinite;
    }
    @keyframes kurukuru {
        0% {
            transform: translate(0px, 0px);
        }
        12.5% {
            transform: translate(10px, 0px);
        }
        37.5% {
            transform: translate(10px, 20px);
        }
        62.5% {
            transform: translate(-10px, 20px);
        }
        87.5% {
            transform: translate(-10px, 0px);
        }
        100% {
            transform: translate(0px, 0px);
        }
    }
    header,
    nav {
        align-items: center;
        width: 70%;
        height: 66vh;
    }
    header {
        display: none;
        position: fixed;
        top: 10vh;
        left: 50%;
        transform: translateX(-50%);
        background-color: #fff;
        z-index: 1000;
    }
    nav {
        display: flex;
        padding-top: 6vh;
        z-index: 1000;
    }
    header a {
        font-size: 30px;
    }
    .nav-sns {
        display: flex;
        gap: 30px;
    }
    .nav-sns a {
        font-size: 23px;
    }
    .main-item {
        padding: 16vh 40px 8vh 40px;
        flex-direction: column;
    }
    #home {
        background-image: url('./img/home/home-back-768.jpg');
        background-size: cover;
        background-position: center;
        height: 100vh;
    }
    
    #about p,
    .copy-mail {
        letter-spacing: .1em;
        font-size: 13px;
    }
    #about p {
        padding: .1em .5em;
        background: linear-gradient(90deg, #000, #000 30%, #6d6d6d);
        background: -webkit-linear-gradient(0deg,   #000, #000 30%, #6d6d6d);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }
    #about h1 {
        font-size: 23px;
        font-family: SanHansLight;
        letter-spacing: .1em;
        font-weight: normal;
        color: #000;
    }
    #about h2 {
        letter-spacing: .1em;
        margin: 0 0 0 .5em; 
        font-size: 13px;
        font-weight: normal;
        padding: .3em 0 3vh .05em;
    }
    #about h3 {
        margin: 3em 0 1em 0; 
        font-size:15px;
        font-weight: bold;
        font-family: 'Roboto';
        color: #000;
    }
    .cv-item {
        padding: .4vh 0;
    &::before {
    content: attr(date-is);
        color: #000;
        font-size: 13px;
        padding: .2em 0em;
    }}
    .nav-artwork {
        display: flex;
        flex-wrap: wrap;
        gap: 60px;
        justify-content: center;
        flex-direction: column;
        align-content: center;
    }
    .nav-digital {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .nav-digital .gal-img {
        margin-bottom: 30px;
    }
    .nav-digital .gal-img {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 80vw;
        height: 7vh;
    }
    .nav-digital .gal-img img {
        width: 80vw;
        height: 7vh;
        object-fit: cover;
        transition: all 0.3s ease;
    }
    .gal-nav-item {
        width: 180px;
        height: 170px;
        display: flex;
        border-radius: 15%;
        overflow: hidden;
        justify-content: center;
        align-items: center;
    }
    .gal-nav-item img{
        width: 180px;
        height: 170px;
        border-radius: 15%;
        object-fit: cover;
        transition: all 0.5s ease;
    }
    .gal-nav-item img:hover {
        width: 290px;
        height: 280px;
        opacity: .7;
    }
    .gallery #btn-back {
        display: none;
        margin-top: 50px;
        justify-content: center;
        font-size: 38px;
        font-weight: normal;
    }
    .gallery div{
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
    .gallery .gal-img {
        width: 80%;
        max-width: 80%;
        margin-bottom: 50px;
        display: flex;
        justify-content: center;
        align-items: center;
        position: relative;
        overflow: hidden;
        margin-bottom: 10vh;
    }
    .gal-img img {
        width: auto;
        height: auto;
        max-width: 100%;
        max-height: 100%;
    }
    .gallery div p,
    .gallery div h2,
    .gallery div h3,
    .gallery div h4 {
        width: 90%;
        color: #000;
        text-shadow: none;
        margin: 0;
        padding: 0 0 1em 0;
        letter-spacing: .1em;
        font-size: 12px;
        text-align: start;
        letter-spacing: .1em;
        font-weight: normal;
    }
    .gallery div h3{
        transform: translate(-8px,10px);
    }
    .gallery div p {
        padding-top: .5em;
        border-top: 1px solid #000000;
    }
    .gallery div .h4-span {
        height: 2em;
        vertical-align: middle;
        padding: 0 0 1em 0;
        display: flex;
        width: 90%;
    }
    .gallery div .h4-span .h4-right {
        text-align: end;
        font-size: 10px;
        padding-right: 1em;
    }
    iframe {
        width: 90%;
        height: 40vh;
        margin-bottom: 50px;
    }
    .modal {
        background-color: rgba(0, 0, 0, 0);
    }
    .close,
    .prev,
    .next {
        z-index: 1001;
    }
    .close {
        position: absolute;
        display: flex;
        justify-content: center;
        color: #fff;
        font-weight: normal;
        font-size: 38px;
        bottom: 1vh;
        padding: 0 50px;
    }
    .prev,
    .next {
        cursor: pointer;
        position: absolute;
        width: auto;
        color: #fff;
        padding: 100vh 25% 5vh 25%;
        z-index: 0;
        background: linear-gradient(90deg, rgba(0, 0, 0, .9), rgba(0, 0, 0, .9));
    }
    body.digital-penmanship-bg{  
        background-image: url('./img/works/DigitalPenmanship/KIBO.jpg');
        background-position: center right;
        background-repeat: no-repeat;
        background-size: 100vw auto;
    }
}