html,
body {
    margin: 0;
    padding: 0;
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #000000;
    color: #ffffff;
}

body {
    font-family:
        "Hiragino Kaku Gothic ProN",
        "Hiragino Sans",
        "Yu Gothic",
        "YuGothic",
        "Noto Sans JP",
        Meiryo,
        sans-serif;
}


.main-content {
    padding: 40px 40px 60px;

}

main {
    padding-top: 0;
    flex: 1;
}

.visually-hidden {
    position: absolute;
    left: -9999px;
}

.nav a.active {
    opacity: 0.6;
    pointer-events: none;
}

.header {
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    padding: 40px 40px;
    z-index: 100;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 30px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.logo a {
    color: #fff;
    text-decoration: none;
}

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

.nav a {
    color: #fff;
    text-decoration: none;
    font-size: 20px;
    letter-spacing: 0.1em;
}

.nav a:hover {
    opacity: 0.6;
}



.portfolio-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    margin-top: 60px;
}


.tag {
    border: 1px solid #ffffff;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 12px;
}

.portfolio-item h3 {
    margin-top: 16px;
    margin-bottom: 6px;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
}

.main-thisandthat {
    padding: 0;
}

.portfolio-container,
.thisandthat {
    max-width: 1200px;
    /* PC時の最大幅 */
    margin: 0 auto;
    /* 中央寄せ */
}



.portfolio-item img {
    width: 100%;
    display: block;
    border-radius: 4px;
}

.portfolio-info {
    display: flex;
    justify-content: flex-start;
    gap: 8px;
    margin-top: 6px;
    font-size: 14px;
    color: #999;
    flex-wrap: wrap;

}

.portfolio-item h3 {
    font-weight: 500;
    line-height: 1.4;
}



.portfolio-img {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
}

.portfolio-img img {
    width: 100%;
    display: block;
    transition: 0.4s;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);

}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);

    display: flex;
    align-items: center;
    justify-content: center;

    opacity: 0;
    transition: 0.3s;
}

.portfolio-overlay span {
    color: #fff;
    font-size: 14px;
    letter-spacing: 0.1em;
    transform: translateY(10px);
    transition: 0.3s;
}

.portfolio-item {
    display: flex;
    flex-direction: column;
    transition: 0.3s;
}

.portfolio-item:hover {
    transform: translateY(-6px);
}

.portfolio-overlay span {
    transform: translateY(0);
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}


.portfolio-item:hover img {
    transform: scale(1.06);
}



.thisandthat {
    width: 100vw;
    /* ビューポートいっぱい */
    max-width: 100%;
    /* max-width を外す */
    margin: 0;
    /* 中央寄せを解除 */
    background-color: #fff;
    padding: 60px 0;
    /* 上下だけ余白 */
    text-align: center;
    overflow: hidden;
    /* 横スクロール非表示 */
}

.thisandthat h3 {
    max-width: 800px;
    /* タイトル幅を制限 */
    margin: 0 auto 40px;
    /* 中央揃え */
    color: #000;
    margin-bottom: 80px;
    letter-spacing: 0.1em;
}

.thisandthat img {
    width: 200px;
    /* 画像サイズ調整 */
    height: auto;
    display: inline-block;
}

.images-wrapper {
    overflow: hidden;
    width: 100%;
}


.images-track {
    display: flex;
    gap: 30px;
    width: max-content;
    animation: scroll 45s linear infinite;
    will-change: transform;
}

.images-track img {
    width: 120px;
    flex-shrink: 0;
}

@keyframes scroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%) translateY(3px);
    }
}

.images-track img {
    width: 120px;
    flex-shrink: 0;
    filter: grayscale(100%);
    transition: 0.4s;
}

.images-track img:hover {
    filter: grayscale(0%);
    transform: scale(1.05);
}



.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.modal-content {
    background: #fff;
    color: #000;
    padding: 40px;
    max-width: 700px;
    width: 90%;
    max-height: 80vh;
    overflow: auto;
    position: relative;
    border-radius: 6px;

}

.modal-content img {
    width: 100%;
    margin-top: 20px;
    border-radius: 4px;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 30px;
    cursor: pointer;
    color: #000;
}

.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.filter-buttons button {
    background: none;
    border: 1px solid #444;
    color: #fff;
    padding: 6px 16px;
    cursor: pointer;
    letter-spacing: 0.08em;
    transition: 0.3s;

}

.filter-buttons button:hover {
    background: #fff;
    color: #000;
}

.filter-buttons button,
.portfolio-info span {
    border: 1px solid #444;
    border-radius: 999px;
    padding: 5px 14px;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.filter-buttons button.active {
    background: #fff;
    color: #000;
    border-color: #fff;
}

.site-footer {
    color: #fff;
    display: flex;
    justify-content: center;
    letter-spacing: 0.08em;
    align-items: center;
}

.footer-spacer {
    height: 30px;
    background: #000000;
    ;
}

.sp-text {
    display: none;
}

@media (max-width:768px) {
    .main {
        padding: 80px 20px 40px;
        /* SP用に左右少し広め */
    }


    .nav {
        display: none;
    }

    .works-tag {
        font-size: 18px;
    }

    .pc-text {
        display: none;
    }

    .sp-text {
        display: inline;
    }

    .main-thisandthat {
        padding: 30px 20px;
    }

    .footer-inner {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .to-top {
        margin-top: 20px;
    }


}