* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


body {
    font-family: 'Ubuntu', 'Helvetica Neue', 'Sawarabi Gothic', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
    color: white;
    min-height: 100vh;
    overflow-x: hidden;
}

.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.video-background video {
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

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

.vhs-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url(assets/yokojima.png);
    z-index: 1;
}

.intro { position: relative; min-height: 100%; }
.intro-content { position: absolute; left: var(--side-gap-3vw); bottom: 3vh; }
.name {
    font-size: 4rem;
    font-weight: 600;
    margin-bottom: 10px;
    letter-spacing: 1px;
}
/* オーバーレイ */
.content-overlay {
    position: fixed;
    top: 1.5vh;
    left: 1vw;
    width: 98vw;
    height: 97vh;
    border-radius: 12px;
    background: transparent;
    border: 1px solid #ffffff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    z-index: 10;
    pointer-events: auto;
    padding: 40px calc(var(--side-gap) - var(--overlay-offset-left));
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

.content-overlay::-webkit-scrollbar { width: 0; height: 0; }
.content-overlay { scrollbar-width: none; -ms-overflow-style: none; }

/* Quick Nav*/
.quick-nav { position: sticky; top: 0px; width: 100%; display: flex; justify-content: flex-end; z-index: 20; transform: translateY(-12px) translateX(4vw);}
.quick-nav-box { display: flex; gap: 14px; align-items: center; padding: 16px 20px; border: 1px solid #ffffff; border-radius: 8px; background: transparent; }
.quick-nav-box a { color: #ffffff; text-decoration: none; font-size: 1.5em; line-height: 1; padding: 4px 6px; }
.quick-nav-box a:hover { text-decoration: underline; }

.profile {
    position: relative;
    text-align: left;
    width: 100%;
    margin-bottom: 40px;
}

.hidden-element {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
    pointer-events: none;
}

.hidden-element.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.profile-icon {
    width: 150px;
    height: 150px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.profile-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.name {
    font-size: 5rem;
    font-weight: 600;
    text-align: left;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.title {
    font-size: 2rem;
    text-align: left;
    opacity: 1;
    margin-bottom: 30px;
}

.affiliation {
    margin-bottom: 30px;
    padding: 0px;
}

.affiliation p {
    font-size: 1.3rem;
    text-align: left;
    margin: 0px 0;
    opacity: 0.9;
}

.social-links {
    width: 50%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.social-link {
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(5px);
}

/* 左右にテキストを分けるSNSリンク用 */
.social-link--split {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}
.social-link--split .social-left { font-weight: 600; }
.social-link--split .social-right { opacity: 0.9; }



.section-title {
    font-size: 3rem;
    font-weight: 300;
    margin-bottom: 40px;
    letter-spacing: 3px;
}

/* PROFILE */
.profile-section { margin: 20vh 0; }
.profile-name {font-size: 24px;}
.profile-content { display: flex; gap: 32px; align-items: center; flex-wrap: wrap; }
.profile-photo { width: 300px; height:300px; border-radius: 0%; overflow: hidden; border: 3px solid rgba(255,255,255,0.3); }
.profile-photo img { width: 100%; height: 100%; object-fit: cover; }
.profile-text { max-width: 800px; line-height: 1.8; opacity: 0.95; font-size: 18px;}

/* kugiri */
:root {
    --divider-width: 115%; 
    --side-gap: 6vw;
    --overlay-offset-left: 1vw;
}

.content-overlay > .profile-section,
.content-overlay > .works,
.content-overlay > .contact-section {
    padding-top: 200px;
    margin-top: 40px;
    position: relative;
}

.content-overlay > .profile-section::before,
.content-overlay > .works::before,
.content-overlay > .contact-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: var(--divider-width);
    border-top: 1px solid rgba(255, 255, 255, 0.7);
    transform: translateX(-50%);
}

.contactlink { margin-top: 30px; }
.contact-button {
    color: white;
    text-decoration: none;
    letter-spacing: 0.3rem;
    padding: 10px 40px;
    background: rgba(255, 255, 255, 0.116);
    border: solid 1px #ffffff;
    border-radius: 100px;
    transition: all 0.3s ease;
    display: inline-block;
}

.contact-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05, 1.05);
}

/* Contact */
.contact-section { margin: 20vh 0; }
.contact-content { max-width: 800px; line-height: 1.8; opacity: 0.95; }

/* Works */
.works-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 30px;
}

.work-item {
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.6s ease;
}

.work-item.hidden-element {
    opacity: 0;
    transform: translateY(30px);
}

.work-item.hidden-element.visible {
    opacity: 1;
    transform: translateY(0);
}

.work-item:hover {
    transform: translateY(-10px);
}

.work-link { display: block; color: inherit; text-decoration: none; }

.work-icon {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
    position: relative;
}

.work-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.work-item:hover .work-icon img {
    transform: scale(1.1);
}

.work-info {
    margin-bottom: 10px;
    text-align: left;
}

.work-year {
    display: block;
    font-size: 0.85rem;
    opacity: 0.7;
    margin-bottom: 5px;
}

.work-title {
    display: block;
    font-size: 1.2rem;
    font-weight: 500;
}

.work-meta { margin-top: 2px; }
.work-desc { font-size: 0.8rem; opacity: 0.9; margin: 6px 0 8px; color: #ffffffc7;}
.work-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.work-tags span {
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
}


/* contact */
.mailform {
    font-size: 1.5rem;
    margin-bottom: 20px;
}

/* モーダル */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.popup-overlay.active {
    display: flex;
    opacity: 1;
}

.popup-content {
    background: rgba(30, 30, 30, 0.95);
    border-radius: 15px;
    max-width: 700px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.popup-overlay.active .popup-content {
    transform: scale(1);
}

.popup-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.popup-close:hover {
    opacity: 1;
}

.popup-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 15px 15px 0 0;
}

.popup-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popup-details {
    padding: 30px;
}

.popup-details h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.popup-details #popup-year {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-bottom: 20px;
}

.popup-details #popup-description {
    line-height: 1.8;
    margin-bottom: 20px;
    opacity: 0.9;
}

#popup-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

#popup-tags span {
    background: rgba(255, 255, 255, 0.1);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
}

.popup-link {
    display: inline-block;
    color: white;
    text-decoration: none;
    padding: 12px 30px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    transition: background 0.3s ease;
}

.popup-link:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Work detail page */
.work-detail {
    display: grid;
    grid-template-columns: 3fr 7fr;
    width: 100%;
    margin: 0;
}
.work-detail-left {
    grid-column: 1;
    position: sticky;
    top: 48px; /* below back link */
    align-self: start;
    height: fit-content;
    display: flex;
    flex-direction: column;
    margin-top: 60vh; /* initial position near bottom-left */
}
.work-back {
    display: flex;
    color: #fff;
    opacity: 0.8;
    text-decoration: none;
    position: sticky;
    top: 2px;
    align-self: start;
    margin: 0;
    z-index: 20;
}
.work-back:hover { opacity: 1; }
.work-detail { padding-top: 2px; }
.work-detail-header { margin-bottom: 20px; }
.work-detail-year { display: inline-block; font-size: 0.95rem; opacity: 0.7; margin-right: 8px; }
.work-detail-title { display: inline-block; font-size: 1.6rem; font-weight: 600; }
.work-detail-media { grid-column: 2; width: 100%; border-radius: 10px; overflow: hidden; text-align: center; margin: 10px 0 20px; }
.work-detail-media img { width: 70%; height: auto; display: block; align-items: center; margin: auto; padding: 10px;}
.work-detail-media .image-pair { display: flex; gap: 10px; justify-content: center; align-items: flex-start; }
.work-detail-media .image-pair img { width: calc(34%); height: auto; display: block; margin: 0; padding: 5px; }
.work-detail-body { line-height: 1.8; opacity: 0.95; }
.work-detail-desc { margin-bottom: 16px; }
.work-detail-desc a,
.work-detail-desc a:visited { color: inherit; }
.work-detail-desc a:hover { opacity: 0.9; }
.work-detail-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.work-detail-tags span { background: rgba(255,255,255,0.1); padding: 6px 12px; border-radius: 999px; font-size: 0.85rem; }

/* link button */
.detail-link-button {
    display: inline-block;
    color: white;
    text-decoration: none;
    padding: 5px 25px;
    background: rgba(255, 255, 255, 0);
    border: 1px solid #ffffff;
    border-radius: 999px;
    transition: all 0.3s ease;
    margin-top: 12px;
}
.detail-link-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

/* 個別スタイル */
.scbuil { width: 70%; height: auto; display: block; align-items: center; margin: auto; padding: 10px;}
.scbuil2 { width: 90%; height: auto; display: block; align-items: center; margin: auto; padding: 10px;}
.scbuil3 { width: 50%; height: auto; display: block; align-items: center; margin: auto; padding: 10px;}


/* レスポンシブ */
@media (max-width: 1200px) {
    .works-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .work-detail { grid-template-columns: 1fr; }
    .work-detail-left { position: static; top: auto; }
    .work-detail-media { grid-column: 1; }
    .work-detail-media .image-pair { flex-wrap: wrap; }
    .work-detail-media .image-pair img { width: 48%; }
    .work-detail-left { margin-top: 0; }
    .sidebar {
        width: 250px;
        min-width: 250px;
        padding: 40px 20px;
    }

    .main-content {
        margin-left: 250px;
        padding: 40px 30px;
    }

    .works-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .profile-icon {
        width: 120px;
        height: 120px;
    }

    .name {
        font-size: 3rem;
    }
    
    .title {
        font-size: 1.5rem;
    }

    .content-overlay {
    position: fixed;
    top: 1.5vh;
    left: 1vw;
    width: 97vw;
    height: 97vh;
    border-radius: 12px;
    background: transparent;
    border: 1px solid #ffffff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    z-index: 10;
    pointer-events: auto;
    padding: 40px calc(var(--side-gap) - var(--overlay-offset-left));
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}
}

@media (max-width: 700px) {
    .container {
        flex-direction: column;
    }

    /* Quick Nav: shrink and prevent overflow on phones */
    .quick-nav { transform: none; overflow-x: auto; }
    .quick-nav-box { gap: 8px; padding: 8px 10px; border-radius: 6px; }
    .quick-nav-box a { font-size: 1rem; padding: 3px 4px; }

    .sidebar {
        position: relative;
        width: 100%;
        min-width: 100%;
        height: auto;
        padding: 40px 20px;
    }

    .main-content {
        margin-left: 0;
        padding: 40px 20px;
    }

    .works-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .content-overlay {
    position: fixed;
    top: 1.5vh;
    left: 1vw;
    width: 97vw;
    height: 97vh;
    border-radius: 12px;
    background: transparent;
    border: 1px solid #ffffff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    z-index: 10;
    pointer-events: auto;
    padding: 26px calc(var(--side-gap) - var(--overlay-offset-left));
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}
}

@media (max-width: 480px) {
    /* Further tighten quick-nav on very small screens */
    .quick-nav-box { gap: 6px; padding: 6px 8px; }
    .quick-nav-box a { font-size: 0.75rem; }

    .works-grid {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }

    .section-title {
        font-size: 1.8rem;
    }
}
