:root {
    /* 背景 */
    --bg-color: #14181b;
    /* ベースカラー */
    --base-color: #21282a;
    /* サブカラー */
    --sub-color: #364146;
    /* テキストカラー */
    --txt-color: #FFF;
    /* サブテキストカラー */
    --sub-txt-color: #bcbcbc;
    /* アクセントカラー */
    --accent-color: #f9a390;
}


/*
各種アニメーション設定
*/

/* view-transition フェードイン */
@keyframes fadein {
    from {opacity: 0;}
    to   {opacity: 1;}
}
/* view-transition フェードアウト */
@keyframes fadeout {
    from {opacity: 1;}
    to   {opacity: 0;}
}

/* ユーザーアイコンポップアップ */
@keyframes popUp {
0%   { transform: translateY(110px); opacity: 0; }
60%  { transform: translateY(-10px); opacity: 1; }
100% { transform: translateY(0px); opacity: 1; }
}


/*
view-transition有効化
*/
@view-transition {
    navigation: auto;
}

/* nav グループだけアニメーションなしにする */
::view-transition-old(nav),
::view-transition-new(nav) {
    animation: none;
}

/* 全要素共通でフェードインアウト */
::view-transition-old(*) {
    animation: 0.25s linear both fadeout;
}
::view-transition-new(*) {
    animation: 0.25s linear both fadein;
}

body{
    font-family: "BIZ UDPGothic", "Meiryo", "游ゴシック Medium", "Yu Gothic Medium", "游ゴシック体", YuGothic, "游ゴシック", "Yu Gothic", "Hiragino Sans", "Hiragino Kaku Gothic ProN", sans-serif;
    margin: 0;
    padding: 0;
    background: var(--bg-color);
}

/* ホーム */

.home{

    /* view-transition 設定 */
    .logo svg {
        view-transition-name: logo;
    }


    /* 以下は後ほどmaskによる処理に置き換え予定 */
    svg{
        path{
            fill: var(--txt-color) !important;
            transition: fill 0.25s linear;
        }
        rect{
            fill: var(--txt-color) !important;
            transition: fill 0.25s linear;
        }
    }

    .product_box{
        a:hover{
            svg{
                path{
                    fill: inherit !important;
                }
                rect{
                    fill: inherit !important;
                }
            }
        }
    }


    /* タイトルボックス */
    .title{
        border-radius: 24px;
        position: fixed;
        top: 15px;
        left: 100px;
        width: 38%;
        height: calc(100svh - 30px);

        display: flex;
        align-items: center;
        justify-content: space-around;
        flex-direction: column;
    }

    /* タイトルロゴ */
    .logo{
        padding: 10%;
        margin: 30px auto;
        width: 60%;
        text-align: center;
        background: url(../title_back.png) 50% 50% no-repeat;
        background-size: contain;
    }

    /* プロフィール */
    .about{
        border-radius: 200px;
        background: var(--sub-color);
        display: flex;
        width: 65%;
        align-items: center;
        position: relative;
        justify-content: space-between;

        &:hover{
            .thumb_box img{
                animation: popUp 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
            }
        }
    }

    /* プロフィール左 */
    .left{
        width: 25%;
    }
    /* プロフィール右 */
    .right{
        width: 70%;
    }
    .left:after {
        content: "";
        width: 100%;
        height: auto;
        background: var(--txt-color);
        display: block;
        border-radius: 113px;
        border: 2px solid var(--sub-color);
        margin-bottom: 0px;
        aspect-ratio: 1 / 1;
        box-sizing: border-box;
    }

    /* プロフィール左内-ユーザーアイコンボックス */
    .thumb_box{
        width: 25%;
        aspect-ratio: 1/1.3;
        border-top-left-radius: 0;
        border-top-right-radius: 0;
        border-bottom-left-radius: 200px;
        border-bottom-right-radius: 200px;
        overflow: hidden;
        margin: 0 auto 0px auto;
        padding: 25px 0 0 0;
        position: absolute;
        bottom: 2px;

        img{
            width: 100%;
        }
    }


    /* メインコンテンツ */
    .wrapper{
        width: calc(62% - 125px);
        box-sizing: border-box;
        margin-top: 15px;
        margin-bottom: 15px;
        margin-left: calc(38% + 115px);
        padding: 15px 28px;
        height: calc(100svh - 30px);
        background: var(--sub-color);
        border-radius: 24px;
        display: grid;
        justify-content: space-around;
        grid-template-columns: 32% 32% 32%;
        grid-template-rows: 36px 1fr 36px 27% 27%;
        gap: 12px;
        grid-template-areas: 
                    "product product product"
                    "cont_01 cont_01 cont_02"
                    "posts   posts   posts"
                    "cont_03 cont_04 cont_05"
                    "cont_06 cont_07 cont_08";
    }

    .wrapper::before{
        content: "// CONTENTS //";
        display: block;
        position: fixed;
        top: 48%;
        left: calc(38% + 27px);
        color: var(--sub-txt-color);
        border-radius: 24px;
        background: var(--bg-color);
        text-align: center;
        padding: 12px 20px;
        transform: rotateZ(270deg);
        font-size: 12px;
        line-height: 12px;
        font-feature-settings: "palt" 1;
        word-break: auto-phrase;
        letter-spacing: 1px;
        text-box-trim: trim-both;
    }



    .product,.posts{
        position: relative;
        &::after{
            content: "";
            position: absolute;
            top: 50%;
            left: 0;
            width: 100%;
            height: 1px;
            background: var(--sub-txt-color);
            z-index: 0;
        }

        h3{
            display: inline-block;
            border-radius: 100px;
            background: var(--sub-color);
            color: var(--sub-txt-color);
            font-size: 16px;
            font-weight: bold;
            font-style: italic;
            margin: 0 15px 0 0;
            padding: 4px 15px;
            line-height: 16px;
            position: relative;
            z-index: 1;

            &:after{
                content: "//";
                display: inline;
                font-size: 18px;
                margin-left: 6px;
                color: var(--accent-color);
            }
        }
    }
    /* PRODUCTSタイトル */
    .product{
        grid-area: product;
        display: flex;
        align-items: center;
        justify-content: flex-end;
    }
    /* POSTSタイトル */
    .posts{
        grid-area: posts;
        display: flex;
        align-items: center;
        justify-content: flex-end;
    }

    .timeline {
        height: 100%;
    }


    .product_box{
        grid-area: cont_01;
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: clamp(1rem, 1.2vw, 2rem);

        a{
            display: flex;
            justify-content: center;
            color: var(--txt-color);
            text-decoration: none;
            line-height: 155%;
            height: 100%;
        }

    }

    .half{
        width: 50%;
        color: var(--txt-color);
        text-align: center;
    }

    .product_title{
        color: var(--txt-color);
        text-align: center;
        font-size: 1em;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        svg{
            position: relative;
            z-index: 1;
            display: block;
            margin: 0;
            width: 20%;
            aspect-ratio: 91 / 67;
        }
        p{
            position: relative;
            z-index: 2;
            margin: 12px 0 24px;
        }
        div.icon{
            position: relative;
            z-index: 2;
            font-style: normal;
            font-size:12px;
            display: flex;
            justify-content: center;
            flex-direction: row-reverse;
            align-items: center;
            padding-left:1rem;
        }
    }

    .bst{
        background: url("../bg_sky.webp") 50% 100% no-repeat;
        background-size: contain;
        position: relative;

        &::after{
            content:"";
            width:100%;
            height:100%;
            background: var(--base-color);
            transition: opacity 0.25s linear;
            opacity: 1;
            position: absolute;
            z-index: 0;
        }

        &:hover::after{
            opacity: 0;
        }
    }

    .oracle{
        background: url("../oracle.webp") 50% 50% no-repeat;
        background-size: cover;
        position: relative;
        width: 100%;

        &::after{
            content:"";
            width:100%;
            height:100%;
            background: var(--base-color);
            transition: opacity 0.25s linear;
            opacity: 1;
            position: absolute;
            z-index: 0;
        }

        &:hover::after{
            opacity: 0.5;
        }


    }

    .product_box + .product_box{
        grid-area: cont_02;
        display: flex;
        justify-content: center;
        align-items: center;
        svg{
            width: 60%;
            margin-bottom: 12px;
            aspect-ratio: 129 / 95;
        }
    }
    .post_box:nth-child(5){
        grid-area: cont_03;
    }
    .post_box:nth-child(6){
        grid-area: cont_04;
    }
    .post_box:nth-child(7){
        grid-area: cont_05;
    }
    .post_box:nth-child(8){
        grid-area: cont_06;
    }
    .post_box:nth-child(9){
        grid-area: cont_07;
    }
    .post_box:nth-child(10){
        grid-area: cont_08;
    }

}





/* アイコン設定 */

.icon::before {
    font-style: normal;
    font-weight: normal;
    display: inline-block;
    -webkit-font-smoothing: antialiased;
    font-family: "Material Symbols Rounded" !important;

    font-variation-settings:
    'FILL' 0,
    'wght' 200,
    'GRAD' 0,
    'opsz' 32;
    transition: font-variation-settings 0.25s ease;
}

.icon:hover::before,.act .icon::before {
    font-variation-settings:
    'FILL' 1,
    'wght' 200,
    'GRAD' 0,
    'opsz' 32;
}

/* homeからcontactまでは後ほど置き換え予定 */

.icon.icon_home::before {
    content: "home";
    width:32px;
    height:32px;
    overflow: hidden;
    font-size:32px;
    line-height: 32px;
    display: block;
    padding: 6px 10px;
    margin: auto auto 6px;
}

.icon.icon_posts::before {
    content: "sticky_note_2";
    width:32px;
    height:32px;
    overflow: hidden;
    font-size:32px;
    line-height: 32px;
    display: block;
    padding: 6px 10px;
    margin: auto auto 6px;
}

.icon.icon_bookmarks::before {
    content: "bookmarks";
    width:32px;
    height:32px;
    overflow: hidden;
    font-size:32px;
    line-height: 32px;
    display: block;
    padding: 6px 10px;
    margin: auto auto 6px;
}

.icon.icon_contact::before {
    content: "mail";
    width:32px;
    height:32px;
    overflow: hidden;
    font-size:32px;
    line-height: 32px;
    display: block;
    padding: 6px 10px;
    margin: auto auto 6px;
}



.icon.icon_date::before {
    content: "edit_calendar";
    width:16px;
    height:16px;
    overflow: hidden;
    font-size: 16px;
    line-height: 16px;
    margin-right: 5px;
    vertical-align: middle;
}

.icon.icon_new_tab::before {
    content: "open_in_new";
    width:16px;
    height:16px;
    overflow: hidden;
    font-size: 16px;
    line-height: 16px;
    margin-left: 5px;
    vertical-align: middle;
}



/* グローバルナビゲーション */
.nav{
    view-transition-name: nav;
    position: fixed;
    top: 15px;
    left: 5px;
    width: 80px;
    height: calc(100svh - 30px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;

    .icon{
        padding: 0px 10px 6px;
        border-radius: 6px;
        display: flex;
        flex-direction: column;
        svg{
            display: block;
            margin: auto auto 6px;
            width:32px;
            height:32px;
            padding: 6px 10px;
        }
    }
}

.navi_list{
    display: flex;
    gap: 20px;
    list-style: none;
    flex-direction: column;
    width: 80px;
    margin: 0;
    padding: 0;

    li{
        width: 100%;
        color: var(--txt-color);
        font-size: 14px;
        margin: 0;
        cursor: pointer;
        text-align: center;
        a{
            text-decoration: none;
            color: var(--txt-color);
            display: flex;
            flex-direction: column;
            gap: 5px;
        }
    }
}

/* アクティブラベル */
.nav_act_label{
    view-transition-name: act_label;
    width: 80px;
    height:44px;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
    background: var(--base-color);
    border-radius: 12px;
    pointer-events: none;
    z-index: -1;
    transform: translateY(0);
    transition: transform 0.25s ease;
}



/* ダークモード トグルボタン */
.toggle-button {
    position: absolute;
    bottom: 30px;
    left: 15px;
    width: 50px;
    height: 30px;
    z-index: 1000;
}

.toggle-txt {
    text-align: center;
    font-size: 0.687rem;
    color: var(--txt-color);
    margin: 10px auto;
}

.toggle-input {
    display: none
}

.toggle-label {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 30px;
    cursor: pointer;
    transition: background 0.3s;
    background: rgba(150,150,150,0.4)
}

.toggle-label::after {
    content: "";
    position: absolute;
    width: 26px;
    height: 26px;
    background-color: #fff;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: all 0.3s;
    background: rgb(240,240,240) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="rgb(10,10,10)" viewBox="0 0 256 256"><path d="M120,40V32a8,8,0,0,1,16,0v8a8,8,0,0,1-16,0Zm72,88a64,64,0,1,1-64-64A64.07,64.07,0,0,1,192,128Zm-16,0a48,48,0,1,0-48,48A48.05,48.05,0,0,0,176,128ZM58.34,69.66A8,8,0,0,0,69.66,58.34l-8-8A8,8,0,0,0,50.34,61.66Zm0,116.68-8,8a8,8,0,0,0,11.32,11.32l8-8a8,8,0,0,0-11.32-11.32ZM192,72a8,8,0,0,0,5.66-2.34l8-8a8,8,0,0,0-11.32-11.32l-8,8A8,8,0,0,0,192,72Zm5.66,114.34a8,8,0,0,0-11.32,11.32l8,8a8,8,0,0,0,11.32-11.32ZM40,120H32a8,8,0,0,0,0,16h8a8,8,0,0,0,0-16Zm88,88a8,8,0,0,0-8,8v8a8,8,0,0,0,16,0v-8A8,8,0,0,0,128,208Zm96-88h-8a8,8,0,0,0,0,16h8a8,8,0,0,0,0-16Z"></path></svg>') 50% 50% no-repeat
}

.toggle-input:checked + .toggle-label {
    background: rgba(175,175,175,0.3)
}

.toggle-input:checked + .toggle-label::after {
    transform: translateX(20px);
    background: rgb(10,10,10) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="rgb(240,240,240)" viewBox="0 0 256 256"><path d="M233.54,142.23a8,8,0,0,0-8-2,88.08,88.08,0,0,1-109.8-109.8,8,8,0,0,0-10-10,104.84,104.84,0,0,0-52.91,37A104,104,0,0,0,136,224a103.09,103.09,0,0,0,62.52-20.88,104.84,104.84,0,0,0,37-52.91A8,8,0,0,0,233.54,142.23ZM188.9,190.34A88,88,0,0,1,65.66,67.11a89,89,0,0,1,31.4-26A106,106,0,0,0,96,56,104.11,104.11,0,0,0,200,160a106,106,0,0,0,14.92-1.06A89,89,0,0,1,188.9,190.34Z"></path></svg>') 50% 50% no-repeat
}



/* 透明度 */
.opacity_07{
    opacity: 0.7;
    transition: opacity 0.25s linear;
    &:hover{
        opacity: 1;
    }
}

.card{
    overflow: hidden;
    border-radius: 18px;
    background: var(--base-color);
    width: 100%;
    height: 100%;
    box-shadow: inset 0 0 2px 1px #1c1c1c;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--txt-color);
}




.post_box{
    a{
        display: grid;
        justify-content: center;
        padding: 0;
        color: var(--txt-color);
        text-decoration: none;
        line-height: 155%;
        grid-template-rows: 28% minmax(28%, max-content) 1fr;
        width: 100%;
        height: 100%;
        grid-template-columns: 1fr;
        justify-items: center;
        align-items: end;
        gap: 5px;

        ul{
            margin: 0;
            list-style: none;
            padding: 0;
            display: flex;
            gap: 5px;
            font-size: 12px;
            li{
                padding: 4px 8px;
                background: var(--sub-color);
                color: var(--sub-txt-color);
                text-box-trim: trim-both;
            }
        }

        strong{
            padding: 0 20px 0;
            font-feature-settings: "palt" 1;
            word-break: auto-phrase;
            text-align: center;
            overflow: hidden;
            height: 100%;
        }
        em{
            padding: 0 20px 1svh;
            width: 100%;
            box-sizing: border-box;
            display: block;
            text-align: right;
            font-style: normal;
            font-size: 0.75rem;
        }
    }
}



@media (max-width: 1024px), (orientation: portrait) {

    nav{
        display: none;
    }

    .title{
        grid-area: title;
        position: static;
        width: auto;
        height: 50svh;
        display: flex;
        align-items: center;
        justify-content: space-around;
        flex-direction: row;
        padding: 0 5vw;
        gap: 5vw;
        .logo{
            width: 40%;
            text-align: center;
            padding: 50px;
        }
    }
    .about{
        width: 50%;
    }

    .wrapper{
        width: calc(100% - 15px);
        margin-left: 0;
        padding: 15px;
        height: auto;
        grid-template-columns: 50% 50%;
        grid-template-rows:  1fr 36px auto auto 36px auto auto auto;
        gap: 12px;
        grid-template-areas: 
                    "title   title"
                    "product product"
                    "cont_01 cont_01"
                    "cont_02 cont_02"
                    "posts   posts"
                    "cont_03 cont_04"
                    "cont_05 cont_06"
                    "cont_07 cont_08";
    }

}

