body {
    margin: 0;
    line-height: 1.7;
    font-family: var(--font-body);
}
h1, h2, h3 {
    font-family: var(--font-heading);
}
.top {
    height: 100vh;
    position: relative;

    h1 {
        position: absolute;
        bottom: 0;
        right: 0;
        display: block;
        width: 100%;
        text-align: right;
        padding: 10px 20px;
        background-color: rgba(255, 255, 255, 0.9);

        @media (max-width: 768px) {
            font-size: 1em;
        }
    }
}

img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

main {
    margin: 40px 0;
}

button {
    background-color: transparent;
    border: none;
    cursor: pointer;
    outline: none;
    padding: 0;
    appearance: none;
}

a {
    color: var(--link-color);
}

/* --- What's new --- */
.news-wrap {
    display: flex;
    gap: 25px;
    align-items: center;
    justify-content: center;
    padding: 25px;
    margin-bottom: 40px;

    h2 {
        color: var(--n-h-color);
    }

    @media (max-width: 768px) {
        flex-direction: column;
        gap: 0;
    }
}

.news {
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    padding: 0 10px;
    height: 70px;
    display: flex;
    flex-direction: column;
    max-width: 400px;
    scroll-snap-stop: always;

    &::-webkit-scrollbar {
        width: 5px;
        background-color: #fff;
    }

    &::-webkit-scrollbar-thumb {
        background: var(--n-scrollbar);
    }

    &::-webkit-scrollbar-track {
        background-color: var(--n-scrollbar-bg);
    }
}


.date {
    color: var(--date-color);
    font-size: 0.8em;
}

.news-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 70px;
    flex-shrink: 0;
    scroll-snap-align: start;
    box-sizing: border-box;
    scroll-snap-stop: always;
    flex-shrink: 0;
}

/* --- gallery --- */
.gallery {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    padding: 25px;
    max-width: 1200px;
    margin: 0 auto;
    gap: 10px;
    background-color: var(--g-bg-color);

    @media (max-width: 768px) {
        grid-template-columns: 1fr 1fr;
    }
}

.work-item {
    overflow: hidden;

    img {
        aspect-ratio: 1 / 1;
        object-fit: cover;
        transform: scale(1);
        transition: transform 0.3s ease;

        &:hover {
            transform: scale(1.05);
        }
    }
}

.gallery-section {
    max-width: 1200px;
    margin: 0 auto;
}

.filter {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.filter::-webkit-scrollbar {
    display: none;
}

.filter-btn {
    display: block;
    padding: 8px 20px;
    border: 1px solid var(--g-btn-bg-color);
    border-bottom: none;
    background-color: var(--g-btn-color);
    color: var(--g-btn-bg-color);
    cursor: pointer;
    flex-shrink: 0;
    white-space: nowrap;
    position: relative;
    transition: background-color 0.2s, color 0.2s;

    margin-right: -1px;

    &:hover {
        background-color: color-mix(in srgb, var(--g-btn-bg-color) 15%, transparent);
    }

    &.active {
        background-color: var(--g-bg-color);
        color: var(--g-btn-color);
        border-bottom: 1px solid var(--g-bg-color);
        z-index: 1;
    }
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 32px 0;
}

.page-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #ccc;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    font-size: 12px;
    color: #333;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-btn:hover:not(:disabled) {
    background: #333;
    color: #fff;
    border-color: #333;
}

.page-btn:disabled {
    opacity: 0.25;
    cursor: default;
}

.page-count {
    font-size: 13px;
    color: #888;
    letter-spacing: 0.1em;
    min-width: 48px;
    text-align: center;
}

/* --- profile --- */
.profile-wrap {
    padding: 25px;
    max-width: 1200px;
    margin: 0 auto;

    h2 {
        text-align: center;
    }
}

.profile {
    display: flex;
    justify-content: center;

    @media (max-width: 768px) {
        flex-direction: column-reverse;
        align-items: center;
    }
}

.info {
    padding: 25px;
    width: 300px;
    box-sizing: border-box;
    background-color: var(--p-bg-color);
    transform: translate(10px, 20px);

    @media (max-width: 768px) {
        transform: translate(0);
    }
}

.image {
    width: 300px;
    height: 300px;
    border: 10px solid var(--p-img-border);
    z-index: 10;

    img {
        height: 100%;
        object-fit: cover;
        object-position: center;
    }
}

.name {
    font-size: 1.2em;
    font-weight: bold;
    margin-top: 0;
}

.sns-link {
    display: block;
    height: 25px;

    &:hover {
        opacity: 0.7;
    }

    img {
        width: auto;
        height: 25px;
        display: block;
    }
}

.sns {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.cta-link {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 250px;
    height: 50px;
    border: 1px solid;
    text-decoration: none;
    color: var(--p-btn-color);
    background-color: var(--p-btn-bg-color);
    border: 2px solid var(--p-btn-bg-color);
    transition: all 0.3s;

    &:hover {
        color: var(--p-btn-bg-color);
        background-color: var(--p-btn-color);
        border: 2px solid var(--p-btn-bg-color);
    }
}

.cta-wrap {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 25px;
    flex-wrap: wrap;
    max-width: 600px;
    margin: 0 auto;
}


/*footer*/
footer {
    color: var(--f-color);
    background-color: var(--f-bg-color);
    text-align: center;
    padding: 10px;

    .template {
        font-size: 0.8em;
    }
}




/* フェード */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;

    &.is-visible {
        opacity: 1;
        transform: translateY(0);
    }
}


@keyframes fadeInItem {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gallery-item.fade-in-item {
    animation: fadeInItem 0.4s ease both;
}