body {
    --mainColor: #222;
    --subColor: #aaa;
    --fontColor: #fff;
    --bgColor: #111;
    --shadowColor: #aaa5;
    --subShadowColor: #0005;

    background-color: var(--bgColor);
    color: var(--fontColor);
    
    margin: 0px;
    -webkit-text-size-adjust: 100%;

    font-weight: 200;

    transition: all 1.0s;
}

a {
    text-decoration: none;
    color: inherit;
}

header {
    display: flex;
    align-items: center;

    position: sticky;
    box-sizing: border-box;

    width: 100%;
    height: 80px;
    padding: 10px 20px;

    background-color: var(--mainColor);
}

header nav {
    margin-left: auto;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 6px;
}

nav li a {
    display: inline-block;
    text-decoration: none;
    color: var(--fontColor);
    position: relative;
    transition: 0.5s;
    padding: 4px 10px;

    &::before{
        content: '';
        position: absolute;
        left: 0;
        bottom: 0;
        border-bottom: solid 1px;
        border-color: var(--mainColor);
        width: 0px; 
        transition: inherit;
    }

    &:hover {
        transform: translate(-3px, -2px);
        box-shadow: 4px 4px 1px var(--shadowColor);
        &::before{
            width: 100%;
            border-color: var(--fontColor);
        }
    }

}


main {
    width: calc(20% + 400px);
    max-width: 100% ;
    margin: 0 auto; 
}

main section {
    display: grid;
    margin: 40px;
    padding: 20px 10px;
    place-items: center;
}

h1 {
    margin: 10px 0;
    font-size: 30px;
    font-weight: 400;
    letter-spacing: 1px;
}

h2, p {
    margin: -0.18em 10px 0;
}

p {
    font-size: 12px;
}




section.profile > div.icon {

    display: grid;
    place-items: center;
    
    width: 90px;
    height: 90px;
    border-radius: 1000px;
    box-shadow: 1px 1px 20px var(--shadowColor);

    transition: 0.5s ease-in-out;

    &::before {
        content: "";
        display: block;
        width: 100%;
        height: 50px;
        mask: url("../img/Sei2423_icon.svg") no-repeat center / contain;
        background-color: var(--fontColor);
        transition: inherit;
    }

    &:hover{
        background-color: var(--fontColor);
        box-shadow: 1px 1px 20px var(--subShadowColor);

        &::before {
            background-color: var(--mainColor);
        }
    }
}

main section:not(.profile){
    background-color: var(--mainColor);
    border-radius: 5px;
    box-shadow: 0 0 7px var(--shadowColor);
    grid-template-columns: 80px 1fr 50px;
    grid-template-rows: 40px 20px;
    gap: 4px 20px;
    transition: all 1.0s, box-shadow 0.3s, transform 0.3s;

    &:not(:has(div.icon)) {
        grid-template-columns: 1fr 60px;
    }

    & > :not(div.icon) {
        justify-self: start;
        grid-column: 2 / 3;
    }

    &:hover {
        transform: translate(-1px, -1px);
        box-shadow: 1px 1px 11px var(--shadowColor);
        background-color: var(--subColor);
        color: var(--mainColor);

        & > div.icon::before {
            border-color: var(--mainColor);
        }
    }

    &:active {
        transition: 0s;
        transform: translate(1px, 1px) !important;
        box-shadow: inset 1px 1px 11px var(--mainColor);
    }
}


div.icon {
    width: 60px;
    aspect-ratio: 1 / 1;
    display: grid;
    grid-row: 1 / 3;
    transition: 1.0s;

    &::before {
        content: "";
        display: block;
        width: calc(100% + 20px);
        height: calc(100% - 6px);
        margin: auto 0;
        transition: 1.0s;
        border-right: var(--subColor) 1px solid;
    }
}

div.icon.qiita {
        background: url(../img/qiita_white.png) no-repeat center / 100% auto;
}
section:hover div.icon.qiita {
    background: url(../img/qiita.png) no-repeat center / 100% auto;
}

div.icon.twitter {
        background: url(../img/twitter_white.svg) no-repeat center / 100% auto;
}
section:hover div.icon.twitter {
    background: url(../img/twitter.svg) no-repeat center / 100% auto;
}

div.icon.github {
        background: url(../img/github_white.svg) no-repeat center / 100% auto;
}
section:hover div.icon.github {
    background: url(../img/github.svg) no-repeat center / 100% auto;
}

div.icon.arrow {
    grid-column: 3 / 4;
    place-items: center;
    position: relative;
}

div.icon.arrow::before {
    content: "";
    display: block;
    position: relative;
    left: 5px;
    width: 12px;
    height: 12px;
    border-top: 2px solid var(--fontColor);
    border-right: 2px solid  var(--fontColor);
    transform: translateX(-50%) rotate(45deg);
}
