body {
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #808080;
    font-family: 'Dancing Script', cursive;
    overflow: hidden;
}

.container {
    text-align: center;
}

.black-box {
    display: inline-block;
    background-color: #000000;
    width: 1px; /* アニメーションでサイズを制御 */
    height: 1px; /* アニメーションでサイズを制御 */
    position: absolute;
    left: 50%;
    top: 50%;
    transform-origin: center center;
    z-index: 0; /* ★ここに注目: テキストの下に配置されるように */
    animation: coverAndShrink 2s ease-in-out forwards;
}
.portfolio-text {
    color: #00000050;
    font-size: 10vw;
    font-weight: 700;
    position: relative;
    line-height: 1;
    z-index: 1; /* ★ここに注目: テキストが黒い四角の上に表示されるように */
}
@keyframes coverAndShrink {
    0% {
        transform: translate(-50%, -50%) scale(800) rotate(0deg); /* 初期は画面全体を覆う */
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(0.8) rotate(360deg); /* 最終的な縮小サイズと回転 */
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .portfolio-text {
        font-size: 15vw;
    }
}

@media (max-width: 480px) {
    .portfolio-text {
        font-size: 20vw;
    }
}